[SCIP] Custom Branching / SCIPcreateChild

Ambros Gleixner gleixner at zib.de
Sun Oct 25 20:38:46 CET 2020


Dear Jonas,


Am 22.10.20 um 15:02 schrieb Jonas Charfreitag:
> Dear All,
> 
> following the very helpful documentation on your website [1] I'm trying
> to implement some custom branching rules, that branch on general
> constraints. As described in the "Further information" section, I'm
> making use of the functions SCIPcreateChild() and SCIPaddConsNode(). For
> the createChild function two values "a node selection priority for each
> node and an estimate for the objective value of the best feasible
> solution contained in the subtree" have to be supplied. For this the
> documentation suggests to make use of the functions
> "SCIPcalcNodeselPriority()" and "SCIPcalcChildEstimate()", but as far as
> I can see, those only work for branching on single variables.

Yes, that's correct.


> Therefore I have the following questions: Are those values "only"
> relevant for the node selection?

Yes, I think so.


> If so, if I e.g. always create nodes
> with priority 0, do I have to expect any negative side effects, apart
> from the node selection becoming somewhat random?

No, that should be fine.  In branch_multaggr.c (maybe a good example for 
you to look at), the priorities are also set to constant 1.


> Or is there an easy
> way for me to calculate the priority/estimate, when branching on general
> constraints?

For the estimate of the objective value of the optimal subtree solution: 
I think this is an open and non-trivial question and will depend on the 
branching strategy you implement.  But the code will also be correct if 
you give a dummy estimate.

Best,
Ambros


> Many thanks in advance
> Jonas
> 
> [1]: https://www.scipopt.org/doc/html/BRANCH.php
> 


More information about the Scip mailing list