[Cbc] How to decide with variable to branch ?

Haroldo Gambini Santos haroldo.santos at gmail.com
Thu Dec 22 16:57:33 EST 2011


Hi Forrest,

Put a printf inside betterBranch  and  bestBranch  in my class derived
from CbcBranchDecision   and   set   cbcMode->setBranching method for an
object of this class but after solving (many nodes processes) it appears
that this was never called since I got no output from the expected
messages. What I am missing ?


On 21-12-2011 06:20, John Forrest wrote:
> Haroldo,
>
>
> You want betterBranch.  bestBranch was older and is only called if 
> there are no dynamic pseudo costs etc etc.
>
> You may also want to derive from CbcSimpleIntegerDynamicPseudoCost to 
> give yourself even more control.
>
> John
>
> On 20/12/11 19:06, Haroldo Gambini Santos wrote:
>> Dear All,
>>
>> I would like to insert a code in my solver (built using cbc) to 
>> decide which variable to branch and the direction.
>>
>> What should I do ? Write a callback ? To specialize some class ?
>>
>> Tried to create a class derived from
>> CbcBranchDecision, override the method  bestBranch  and call 
>> cbcModel->cbcBranchingMethod for this class but apparently this 
>> method was not even called (put a printf inside to check).
>>
>> Regards,
>>
>> Haroldo
>>
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/cbc
>>
>>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc



More information about the Cbc mailing list