[Scip] Fixing of a variable is carried to another branch

Stefan Vigerske stefan at math.hu-berlin.de
Mon Apr 11 18:03:39 MEST 2011


Hi,

> I am currently doing a branch and price algorithm in SCIP, using it as a framework. My pricing is done by dynamic programming and my branching rule is implemented by binary variables used by the DP algorithm.
>
> There is however some strange behavior at the moment. It seems that one variable that is correctly fixed to zero in one branch is also fixed in another branch where it should not be fixed! The fixing is done by a call to SCIPchgVarUbNode(scip,NULL,...) (the version without Node yields the same result). The most likely reason is that I have made a mistake, but have not been able to locate it after xxxx attempts. I do, however, not call the fixing of the variable from anywhere else. Also the variable is fixed before entering the second node (for which is invalid). The global bound on the variable is correctly set to infinity in all the nodes. The dirty trick of just changing the UB to 1 yields an assertion failure (which is understandable, since this could invalidate the branch if not used carefully).

There is a nice debugging mechanism in SCIP.
If you have an optimal solution and you want to check whether it is 
cutoff somewhere, then setting the filename of this solution in debug.h 
in SCIP_DEBUG_SOLUTION can be helpful. This mechanism does not always 
work, but it helped me often. And you should disable plugins (esp. 
heuristics) that use subscips.

> Therefore I have some small (stupid) questions:
>
> 1) Is there some way SCIP would carry the fixing of the variable from one branch off the tree to another? I.e. should I manually tell SCIP to "restart" the LP when going from one restrictive branch to a another.

No, local bound changes are automatically reverted when walking in the tree.

> 2) Could SCIP, after having started pricing etc., find itself in the stage of SCIP_STAGE_PROBLEM or SCIP_STAGE_TRANSFORMING? (by the scip.c line 08832 this could change the upper bound. This should, I think, be reflected in the SCIPgetVarUbGlobal, which it is not).

During solve, the stage should not change to SCIP_STAGE_PROBLEM.

> 3) Once a node Is created could the address of SCIP_NODE* ever be reused? E.g. if the branch containing the node was fully explored or cutoff. In my implementation the branching decision is identified by the pricer according to the SCIP_NODE* (maybe not the best idea I ever had, but adding local variables are not possible).

Well, there is no mechanism that prevents that freed memory is not used 
again.
I think the node number (SCIPnodeGetNumber()) should be unique, you may 
better use this one as identifier.

Stefan

> I should mention that I do NOT load the default plugins, "only" the heuristics and the Bfs node selector.
>
> Regards,
>
> Tue Christensen,
> Aarhus University, Denmark
>
>
>
>
> --
> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and privileged material.
>
> Any review, retransmission, dissemination or other use of,or taking of any action in reliance upon, this informationby persons or entities other than the intended recipientis prohibited.
>
> If you received this in error, please contact the sender and delete the material from any computer.
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip


-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan


More information about the Scip mailing list