[Scip] Tentative branching not working

nikolaj@crt.umontreal.ca nikolaj at crt.umontreal.ca
Fri Apr 3 15:05:03 MEST 2009


On Wed, April 1, 2009 3:24 am, Tobias Achterberg wrote:
> Hi Nikolaj,
>
>
> nikolaj at crt.umontreal.ca wrote:
>> Thank you very much for your quick answer. Setting initial == TRUE in
>> the SCIPcreateConsLinear() call and fixing parameter
>> constraints/linear/sepafreq = 1 works perfectly. I didn't understand the
>>  setting initial == TRUE in the call.
>
> Actually, one of the two should be enough. I recommend to only use
> initial == TRUE and let constraints/linear/sepafreq stay at its default
> value 0.
>
> The meaning of the 'initial' flag is the following:
>
>
> If the constraint has been added in the problem creation stage (i.e.,
> before you call SCIPsolve()), then its relaxation will be part of the very
> first LP solve at the root node. On the other hand, if 'initial' is FALSE,
> then the constraint will not be part of the very first LP solve. It can
> then only be added by the separation method of the corresponding
> constraint handler (if the sepafreq parameter of the constraint handler
> allows separation at the respective node) or by the constraint handler's
> enforce-LP method.
>
> If the constraint is added during the solving process (for example by a
> branching procedure), then setting 'initial' to TRUE means to add the
> constraint's relaxation to the LP of the node where the constraint was
> added before the node LP relaxation is solved. If the 'initial' flag is
> FALSE, then the relaxation of the constraint is not added to the LP,
> and it can only be added via the separation or enforce-LP methods of the
> constraint handler. Again, the execution of the separation method depends
> on the 'sepafreq' parameter op the constraint handler.
>
>
> I hope that this explains what has happened...
>
>
>
> Best,
>
>
> Tobias
Hi Tobias,

Your clarification is very clear, thank you very much. Now I understand
perfectly the meaning of setting 'initial' to TRUE.

Indeed, just setting 'initial' to TRUE is sufficient. Actually, using
constraints/linear/sepafreq = 1 gives me a strange (to me) result :
while I'm not using the knapsack constraint (I'm not using
SCIPincludeDefaultPlugins(scip_) nor SCIPincludeConshdlrKnapsack(scip_)),
for some graphs, scip is aborting with this message :

 src/scip/cons_knapsack.c:2120: SCIPseparateRelaxedKnapsack: Assertion `0
<= SCIPvarGetProbindex(var) && SCIPvarGetProbindex(var) < nbinvars'
failed.

Is this normal ? If I don't use the setting constraints/linear/sepafreq =
1, no problem arises.

Best regards,

Nikolaj

PS: I'm using
SCIPincludeConshdlrLinear(scip_)
SCIPincludeConshdlrIntegral(scip_)
SCIPincludeNodeselBfs(scip_)
SCIPincludeHeurActconsdiving(scip_)
SCIPincludeDispDefault(scip_)
and a presolver and a branching rule of my own.






More information about the Scip mailing list