[Scip] Deleting a SCIP variable

Tobias Achterberg achterberg at zib.de
Wed Aug 13 14:58:15 MEST 2008



Kati Wolter wrote:
> Dear Egbert (and all who are interested),
> 
> sorry for the late reply, we have not forgotten your question. The 
> answer is:
> 
> 1. Currently, it is not possible to delete variables during solving. We 
> are working on it.
> 
> 2. The solution to your problem is not to remove the variable but to fix 
> it to zero (if zero is a feasible value), by using SCIPfixVar().

To be a little more specific, in your branching rule you should create the child nodes as 
usual (for example with SCIPbranchVar() or by explicit calls to SCIPcreateChild(), 
SCIPchgVarLbNode() and the like), and then call SCIPvarChgUbNode() to fix all variables to 
zero that are no longer valid in the child node.

An alternative is to add a constraint handler which implements the "max length of shifts = 
k  =>  x_i = 0  for i being a shift of length > k" implication. This constraint handler 
would then, in its domain propagation method, fix all the variables to zero that are not 
allowed due to the current branching decisions.


Best, Tobias


More information about the Scip mailing list