[Cbc] Missing event CbcEvent::solution when LP relaxation is integral

Sebastian Niemann sebastian.niemann at inform-software.com
Thu May 16 15:30:17 EDT 2013


Thanks John, that should do the trick.

We are currently using 2.7.1 but will probably be switching to one of 
the future releases so that we'll get this and other fixes.
For now we are also catching CbcEvent::endSearch and check for a best 
solution in this case.

Cheers,
Sebastian

On 16.05.2013 16:06, John Forrest wrote:
> Sebastian,
>
> I have added (in trunk)
>
>              if (eventHandler) {
>               // we are stopping anyway so no need to test return code
>               eventHandler->event(CbcEventHandler::solution);
>             }
> after setBestSolution
>
> Is that what you wanted?
>
> John Forrest
> On 16/05/13 14:48, Sebastian Niemann wrote:
>> Hi all,
>>
>> we are using a custom event handler (which we derive from
>> CbcEventHandler and pass in via passInEventHandler()) to get notified
>> as soon as a new solution is found. For this, in the event handler
>> method ::event(CbcEvent whichEvent) we check if whichEvent is either
>> CbcEvent::solution or CbcEvent::heuristicSolution.
>>
>> While events are getting fired for the majority of solutions (e.g.
>> those found by heuristics, strong branching etc.) it seems as if the
>> CbcEvent::solution event is missing in case the LP relaxation of a
>> node is already integral (line 3898 in trunk/Cbc/src/CbcModel.cpp).
>> This may lead to situations in which model.getBestSolution() returns
>> an optimal integer solution although neither CbcEvent::solution nor
>> CbcEvent::heuristicSolution have ever been fired, e.g. when the root
>> LP relaxation is integral.
>>
>> Cheers,
>> Sebastian
>> _______________________________________________
>> 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