[Scip] sepasol never executed

Marc Pfetsch pfetsch at mathematik.tu-darmstadt.de
Thu Jun 20 21:40:23 MEST 2013


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
>


More information about the Scip mailing list