[SCIP] Creating a new Branching Rule in SCIP

Matheus Ota matheusota at gmail.com
Wed May 27 23:48:22 CEST 2020


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>
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>
> 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
>> https://listserv.zib.de/mailman/listinfo/scip
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20200527/d2821639/attachment.html>


More information about the Scip mailing list