[Scip] Deleting variables

Gerald Gamrath gamrath at zib.de
Tue Apr 23 10:28:27 MEST 2013


Hi all,

I guess it is not fixed by calling SCIPfreeTranform(), because he wants
to delete original variables. With SCIPdelVar(), these variables are
marked for deletion, but the final deletion is never performed for the
original problem. We could think of adding an interface method that can
be used to trigger the deletion. For now, I would suggest the following:
In SCIPdelVar(), in case SCIP_STAGE_PROBLEM, please add the line
SCIP_CALL( SCIPprobPerformVarDeletions(scip->origprob,
scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->lp,
scip->branchcand) );
after the SCIPprobDelVar() call. Then, the marked variable should be
deleted immediately.

Best,
Gerald

On 23.04.2013 09:54, Ambros Gleixner wrote:
> Hi Jonas,
>
> deleting variables is only difficult during the solution process.  As I 
> understand, you want to delete variables only after finishing one solve. 
>   To do this, you have to call SCIPfreeTransform() to return to the 
> problem creation stage.  Does this solve your problem?
>
> Best regards,
>
> Ambros
>
>
> Am 23.04.2013 08:53, schrieb Jonas Witt:
>> Hi all,
>>
>> I'm having problems with deleting variables. I know you list deleting
>> variables as a known bug on your website, but maybe you can still help me.
>>
>> I use a sub-SCIP and initialize it with some initial variables and
>> constraints. This should work as some kind of pattern. So everytime I
>> use this sub-SCIP, I want to add new variables and constraints to it,
>> solve it and then delete the recently added variables and constraints.
>> So after this solving proccess, the sub-SCIP should only consist of
>> initial variables and constraints.
>>
>> I delete the recently added constraints with SCIPdelCons(). After this
>> deletion the recently added variables do not belong to any constraint of
>> the problem. Then I tried to delete these variables via SCIPdelVar() but
>> failed (the variables still belong to the problem). It is important to
>> really delete these variables and not just fix them to zero.
>>
>> How can I use the sub-SCIP the way I have described it without copying
>> the whole problem?
>>
>> Best regards,
>> Jonas
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> http://listserv.zib.de/mailman/listinfo/scip
>>



More information about the Scip mailing list