[Scip] Branching using SCIP solely as a CP Solver

Timo Berthold berthold at zib.de
Fri Nov 18 14:06:07 MET 2011


Hi Alexander.

If you use SCIPcreateChild() (instead of SCIPbranchVarVal()) to manually
create the branching nodes, you can explicitly set a node selection
priority. You then have to change the bounds of the branching variable
accordingly in the children nodes, using SCIPchgVarUbNode() and
SCIPchgVarLbNode(), see http://scip.zib.de/doc/html/BRANCH.html .
Note that this allows to create n-ary branches, e.g., one for each value
in the domain; if this is of any interest to you.

Cheers
Timo


> Hi again,
>
> now i'm trying to implement a branching rule based on fixed values
> depending on the variable names.
> Though, i want to select the first variable from the candidates (which i
> can get with SCIPgetPseudoBranchCands()), check its name and then select
> a value s based on its name. Based on this value i will apply the
> function SCIPbranchVarVal() to create three
> child nodes (x <= s-1, x == s and x >= s+1).
>
> How can i tell SCIP that it should first analyze the node x == s?
> Is there a possibility to set a branching priority for this node?
>
> Best Regards,
> Alexander Schnell
>
>
>
>
>
> On Tue, 2011-11-15 at 16:22 -0500, Stefan Heinz wrote:
>> Hi Alexander,
>>
>> On 11/15/2011 10:30 AM, Alexander Schnell wrote:
>> > Hi all,
>> >
>> > i'm using SCIP solely as a CP Solver by setting the corresponding
>> > emphasis.
>> >
>> > The decision variables of my problem are integer.
>> >
>> > How could i add a branching rule
>> > which at first branches on the variable with the shortest
>> > lower bound and then starts by selecting the smallest value in the
>> > respective domain?
>> Such a branching rule does not exist in SCIP.
>> > Do i have to implement a branching rule myself or is this
>> > already included in SCIP?
>> Yes you have to implement that rule. This is, however, not so hard. Just
>> follow the instruction:
>>
>> http://scip.zib.de/doc/html/BRANCH.html
>>
>> Basically, you only need to implement the method:
>>
>> http://scip.zib.de/doc/html/BRANCH.html#BRANCHEXECPS
>>
>> in case of a CP search.
>>
>> To get the information you need you use the method
>> SCIPgetPseudoBranchCands()
>>
>> http://scip.zib.de/doc/html/scip_8h.html#acb6423287e73b4c01172b888b615d5d6
>>
>> to get all integer which are not fixed yet. Using the function
>> SCIPvarGetLbLocal() and SCIPvarGetUbLocal() you get access to the
>> (local) variable bounds.
>>
>> Best Stefan
>> > Best regards,
>> >
>> > Alexander Schnell
>> >
>> >
>> >
>> > _______________________________________________
>> > Scip mailing list
>> > Scip at zib.de
>> > http://listserv.zib.de/mailman/listinfo/scip
>>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>



More information about the Scip mailing list