[Cbc] How to decide with variable to branch ?
John Forrest
john.forrest at fastercoin.com
Fri Dec 23 05:29:58 EST 2011
Haroldo,
Maybe you have to derive from CbcBranchDynamicDecision - anyway that
works - see attached.
John Forrest
On 22/12/11 21:57, Haroldo Gambini Santos wrote:
> 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
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sampleA.cpp
Type: text/x-c++src
Size: 13508 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20111223/c363b80b/attachment.bin>
More information about the Cbc
mailing list