[Scip] Deleting a SCIP variable

Kati Wolter wolter at zib.de
Wed Aug 13 14:39:43 MEST 2008


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().

I hope this solves your problem.

Best regards,
Kati



E. van der Veen schrieb:
> Does anyone know how I should/could delete variables in 
> SCIP?
> I'm trying to do a Branch-and-Price implementation with 
> SCIP, however, I have some difficulties deleting created 
> (priced) variables. During the branching process it is 
> quite possible some of the variables/columns created in 
> parent nodes are no longer valid in the child nodes, due 
> to branching decisions (see * below for an explanation of 
> this), and hence I think it is best to remove these 
> variables from the SCIP instance, to keep the SCIP 
> instance as small as possible. Furthermore, when these 
> variables are not removed they are possibly included in 
> the solution where this is not allowed.
>
> During the creation of the variable I made the variables 
> removable, by setting the property 'removable' to 'true'. 
> To delete the variable I tried using the function 
> SCIPdelVar(). When I checked whether the variable is 
> deleted with SCIPvarIsDeleted() it does return 'true'. 
> However, when I look at the solution obtained the variable 
> is still present in the objective function and also in the 
> constraints. The latter I kind of expected, because this 
> is mentioned in the comment of the SCIPdelVar() function. 
> However, I do not understand why the variable still 
> appears in the objective function.
> Is there another way of deleting variables, should I use 
> another function instead of SCIPdelVar() (I searched for 
> another SCIP function which could possibly do the job, but 
> was unable to find one). Or am I overlooking something 
> with using the SCIPdelVar() function?
>
> Thanks in advance for any help you can provide.
> Best regards,
> Egbert van der Veen
>
> --
>
> * Suppose we have a rostering problem and Variables 
> represent shifts. Suppose somewhere in the branching 
> process it is decided that shifts are not allowed to last 
> longer than 8 hours. Then all previously created shifts 
> which violate this condition should not be used anymore 
> (in this node). When these shifts (i.e. variables 
> corresponding to them) are not deleted from the model you 
> can end up with a solution in which they are used, which 
> you of course do not want.
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>   



More information about the Scip mailing list