[SCIP] Creating a new Branching Rule in SCIP

Ambros Gleixner gleixner at zib.de
Thu May 28 07:59:16 CEST 2020


Hi Matheus,

You can type "display branching" in the SCIP shell to get an overview or 
look at

    https://www.scipopt.org/doc/html/PARAMETERS.php

The highest priority of a branching rule is 10000 (relpscost), so 100000 
would activate your rule.

Best,
Ambros


Am 27.05.20 um 23:48 schrieb Matheus Ota:
> Hi,
> 
> I think I implemented correctly a branching rule that inherits from 
> ObjBranchRule, but I don't know what value I should assign for the 
> priority. I tried 1000 and it was not being called, I tried 100000 and 
> it was called ok. Just to be sure, where can I find the priority values 
> of the other branching rules used by SCIP?
> 
> Thanks,
> Matheus
> 
> Em ter., 26 de mai. de 2020 às 12:24, Matheus Ota <matheusota at gmail.com 
> <mailto:matheusota at gmail.com>> escreveu:
> 
>     Hi Leon,
> 
>     Thanks for your detailed answer! Yes, I want to query if the lower
>     bound of the variable equals the upper bound, and what is this value.
> 
>     Thanks again,
>     Matheus
> 
>     Em ter., 26 de mai. de 2020 às 04:57, Leon Eifler <eifler at zib.de
>     <mailto:eifler at zib.de>> escreveu:
> 
>         Hello Matheus,
> 
>         everything you want to achieve can be implemented in a branching
>         rule. I
>         don't think there is a benefit of doing this in a constraint
>         handler. In
>         your branching rule you can create to child nodes and add all bound
>         changes that you want to do for S and T to those child nodes.
> 
>          > Also, in order to select the sets S and T I also need to know
>         all the
>          > variables already fixed to 0 and to 1. Is there any way of
>         doing this?
>          > Should I store all the variables fixed in each branching in a
>         data
>          > structure? Or there is an easier way of just checking if the
>         variable
>          > is already fixed or not?
> 
>         You can get all fractional variables by calling
>         SCIPgetLPBranchCands (or
>         do you think of fixed as in local lower bound equals local upper
>         bound?)
> 
>          > Also, my idea for branching is not enough to separate all
>         fractional
>          > solutions. So when it is not possible to use my branching, I
>         want SCIP
>          > to use the branching it normally uses (I guess it is strong
>          > branching). Could anyone that knows about this give me some
>         help here?
> 
>         You do not have to do anything here. If you give your branching
>         rule a
>         high priority it will get called first. Just ensure that your
>         branching
>         rule sets the result pointer to SCIP_DIDNOTFIND or SCIP_DIDNOTRUN
>         (whichever makes more sense) if it does not find a branching.
>         Then the
>         branching rule with the next hightest priority will get called.
> 
>         Best,
>         Leon
> 
> 
>         _______________________________________________
>         Scip mailing list
>         Scip at zib.de <mailto:Scip at zib.de>
>         https://listserv.zib.de/mailman/listinfo/scip
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 

-- 
Ambros Gleixner, Research Group Mathematical Optimization Methods at 
Zuse Institute Berlin, http://www.zib.de/gleixner


More information about the Scip mailing list