[Scip] sepasol never executed

Stefan Lörwald stefan.loerwald at gmail.com
Fri Jun 21 08:44:35 MEST 2013


Dear Michael, Marc and Felipe,

thanks for replying and providing valuable information. My intuition about
how SCIP works was wrong again.
The issue here is resolved.

In retrospect, the problem was adding an invalid cut. This itself is not
actually confusing, but it was unexpected in combination with another
constraint. If executed with the other constraint, the result was better
than without it, which should never happen with more constraints. But
actually it was just luck that the invalid cut wasn't generated.

The invalid cut was bad since I used the actual values of variables in the
current LP solution, but the statement only holds for the lower bounds on
them.

I will send another email regarding the design decisions in SCIP in the
near future, since there are a couple of things that work rather unexpected
in my opinion.

Yours,
Stefan

2013/6/21  <michael.winkler at zib.de>:
> Hi Stefan,
>
> if you only want to add rows instead of constraints you also can use the
> SEPALP callback for this purpose. In this callback, you can ask for the LP
> solution values, like Marc decribed and add some cuts with SCIPaddCut().
> This only works if you solve the LP in every node and you also need to set
> your separation frequency of the constraint handler to 1. Note that this
> callback probably will be called more then once in one node.
>
> Best, Michael
>
>
>>
>> Hi Stefan!
>>
>>> What I want to achieve is adding locally valid inequalities at each
>>> branch decision. I thought that there is a SCIP_SOL for every branch,
>>> but maybe I'm mistaken on how SCIP operates.
>>> The inequality can only be added if two upper bounds on variables are
>>> 0, so it can't be added via SCIPcreateConsLinear and SCIPaddCons as
>>> far as I know.
>>>
>>> So basically the question boils down to "how to access the values and
>>> bounds of a local solution and add constraints locally?".
>>
>> The bounds can be accessed via SCIPvarGetLbLocal()/SCIPvarGetUbLocal().
>> For the LP-values you can use SCIPgetSolVal() and use NULL for the
>> solution.
>>
>> For adding local constraint in branching, you need to create a new child
>> node via SCIPcreateChild(). Then you can add local constraints to this
>> node via SCIPaddConsNode(). You can see an example in
>> examples/Binpacking/src/branch_ryanfoster.c or
>> examples/Coloring/src/branch_coloring.c.
>>
>> Best
>>
>> Marc
>>
>>
>>
>>>
>>> 2013/6/18 Marc Pfetsch <pfetsch at mathematik.tu-darmstadt.de>:
>>>>
>>>> Hi Stefan,
>>>>
>>>> sepasol() ist only executed if you explicitly call SCIPseparateSol()
>>>> for
>>>> a given primal solution. This callback is used to generate cuts for
>>>> solutions that do not arise from the usual LP-relaxation, e.g. if you
>>>> have combinatorial dual program or the like.
>>>>
>>>> As one example, you can try the closecuts-separator (by setting
>>>> separating/closecuts/freq = 0). Here, a new solution is generated on
>>>> the
>>>> line segment between the current LP solution and either a primal
>>>> feasible solution or an interior point (see the parameters for
>>>> closecuts). This solution is then passed to SCIPseparateSol(), which
>>>> then generates cuts. In many cases, this generates "stronger" cuts in
>>>> some sense. Note, however, that this also might produce cuts that are
>>>> not violated by the current LP solution and are thus discarded. See
>>>> also
>>>>
>>>> http://scip.zib.de/doc/html_devel/sepa__closecuts_8c.shtml
>>>>
>>>> Best
>>>>
>>>> Marc
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 06/18/2013 01:40 PM, Stefan Lörwald wrote:
>>>>> Dear SCIP community,
>>>>>
>>>>> I've implemented a custom constraint handler based on the Linear
>>>>> Ordering example. I actually only need sepasol, but it's never
>>>>> executed
>>>>> no matter what settings are chosen (SEPAFREQ, SEPAPRIORITY,
>>>>> DELAYSEPA).
>>>>> Going back to the example I've noticed that it's also never executed.
>>>>>
>>>>> Why is the method implemented if it's never used and _how_ to activate
>>>>> the usage?
>>>>>
>>>>> Yours,
>>>>> Stefan
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Scip mailing list
>>>>> Scip at zib.de
>>>>> http://listserv.zib.de/mailman/listinfo/scip
>>>>>
>>>> _______________________________________________
>>>> Scip mailing list
>>>> Scip at zib.de
>>>> http://listserv.zib.de/mailman/listinfo/scip
>>>
>>> _______________________________________________
>>> Scip mailing list
>>> Scip at zib.de
>>> http://listserv.zib.de/mailman/listinfo/scip
>>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> http://listserv.zib.de/mailman/listinfo/scip
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20130621/fa75e701/attachment.html


More information about the Scip mailing list