[Scip] how to see the changes in variables domain after adding any new cutting plane

Gerald Gamrath gamrath at zib.de
Wed Nov 14 11:53:48 MET 2012


Dear Ahmad,

if a cut contains only one variable, SCIP will automatically convert it
to a bound change of the variable and apply this locally. If your cuts
have two or more variables, they should not influence the bounds of
variables (at least I think so).

If you want to get all bound changes that were applied at a node, you
can do this somehow like this:

>    SCIP_DOMCHG* domchg;
>    SCIP_BOUNDCHG* boundchg;
>    SCIP_VAR** boundchgvars;
>    SCIP_Real* newbounds;
>    SCIP_BOUNDTYPE* boundtypes;
>    int nboundchanges;
>
>    domchg = SCIPnodeGetDomchg(SCIPgetCurrentNode(scip));
>    nboundchanges = SCIPdomchgGetNBoundchgs(domchg);
>
>    for( i = 0; i < nboundchanges; ++i )
>    {
>       boundchg = SCIPdomchgGetBoundchg(domchg, i);
>
>       boundchgvars[i] = SCIPboundchgGetVar(boundchg);
>       newbounds[i] = SCIPboundchgGetNewbound(boundchg);
>       boundtypes[i] = SCIPboundchgGetBoundtype(boundchg);
>
>       /* ignore branching bound changes */
>       if( SCIPboundchgGetBoundchgtype(boundchg) !=
> SCIP_BOUNDCHGTYPE_BRANCHING )
>       {
>          ...
>       }
>    }
However, there might also be added also some global bounds, so this is
not necessarily all bounds that changed. Alternatively, you could use
the event handler system of SCIP and catch all the bound change events
that might happen in between.

Anyway, if you want to do this for your own cuts, the easiest thing is
probably to just look at your cuts whether they only contain one
variable, otherwise, there should be no bound changes. What do you need
this information for?

Best,
Gerald

Am 13.11.2012 15:25, schrieb Ambros Gleixner:
> Dear Ahmad,
>
> to answer your question, could you clarify how you expect the addition 
> of a cut to lead to domain reductions without resolving the LP or 
> applying propagation?
>
> Best regards,
> Ambros
>
>
>
>
> Am 13.11.2012 01:00, schrieb Ahmad Moradi:
>> hi all,
>>
>> After adding one cut to SCIP's underlying LP, is there any way to see what
>> are the resulting changes in variables domain? (possibly before re-
>> presolving/optimizing the new LP)
>>
>> bests,
>> Ahmad
>>
>>
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> http://listserv.zib.de/mailman/listinfo/scip
>>



More information about the Scip mailing list