[SCIP] implicit integer variables and custom branching

Gerald Gamrath gamrath at zib.de
Tue Apr 25 20:11:44 CEST 2017


Dear Georg,

did you check the FAQ entry about implicit integer variables: 
http://scip.zib.de/doc/html/FAQ.php#implicitinteger ?

In some parts of the code, SCIP will treat these variables as integer, 
which includes cuts, but also primal heuristics. If they don't 
necessarily get an integral value if declared continuous, they do not 
fit the definition of implicit integer.

About branching: branching rules are called with decreasing priority. If 
a branching rule did not perform branching, nor any other restrictions 
like adding constraints or bound changed, it should return 
SCIP_DIDNOTFIND (or SCIP_DIDNOTRUN if it did not even try to perform 
branching based on some abort criterion). So, if you implement your own, 
Ryan-Foster-based, branching rule and give it the highest priority, you 
could just check first if default branching should still be performed 
and just return in that case.
There is a problem with this, however: the branching rules are supposed 
to enforce that integer variables get an integral value. Thus, if all 
integer variables already have an integral value, branching rules won't 
be called. What you actually want to have in order to enforce some 
restrictions on your continuous master variables (e.g., that they 
represent an integer solution in the original formulation) is a 
constraint handler. This constraint handler should check the feasibility 
of the LP solution w.r.t. your restrictions in its ENFOLP callback and 
can then perform branching right away. If you give it a negative 
enforcement priority, you also make sure that it is called after the 
enforcement of the integrality constraint handler and only if that one 
did not perform a branching, so you are only called if all integer 
variables have an integral value.

Best,
Gerald

Am 23.04.2017 um 20:51 schrieb Georg Brandstätter:
> Dear SCIP developers,
>
> I have two questions that I hope you can help me with:
>
> 1) How exactly are continuous and implicit integer variables treated 
> differently?
>
> I'm currently working with a branch-and-price model where the priced 
> variables are continuous. If I leave them continuous, the optimal 
> solution I find is fractional. Changing them to implicit integer gives 
> me an integral solution (with the same objective value) instead.
> Is this because of some cuts that are added by SCIP, or is there 
> something else I'm missing?
>
>
> 2) Is there a way to use standard SCIP branching on fractional integer 
> variables together with an additional custom branching rule?
>
> I'd like to use Ryan-Foster-style branching in the aforementioned B&P 
> model. However, I also have integer variables in my master problem and 
> I'd like to only use my custom branching rule if all these master 
> variables are already integral. Is there an easy way to do that?
>
> I'm using the object-oriented C++ interface, in case that makes a 
> difference.
>
>
> Thank you,
> Georg
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list