[Cbc] Reporting progress

John Forrest john.forrest at fastercoin.com
Mon Sep 8 06:28:38 EDT 2014


Christian,

Not sure what to say about 1) - I would have thought it was very 
dependant on model.

On 2) I attach an example driver - you might want to check if it is an 
LP before passing in event handler (derived from ClpEventHandler).  This 
example uses passed in handler for initial solve and then goes back to 
default handler.

John

On 05/09/14 16:20, Christian Schmidt wrote:
> Hi,
>
> how can we report the progress of solving in Cbc?
>
> 1) For MIP I've registered an CbcEventHandler and calculate the gap from
>
> double ub = getModel()->getObjValue()
> double lb = getModel()->getBestPossibleObjValue()
> double gap = fabs(ub - lb) / (lb != 0 ? fabs(lb) : fabs(ub))
>
> I could use 1 - min(gap, 1) as a progress measure. But typically the gap decreases exponentially or polynomially, so e.g.
>
> progress = 1 - pow(gap, 1.0 / 3)
>
> seems to be more "smooth". Are there any other ideas?
>
> 2) What would I do for big LPs? The CbcEventHandler will not be called... Any ideas here?
>
>
> Best regards,
>
> Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: driver5.cpp
Type: text/x-c++src
Size: 11177 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20140908/89d826ac/attachment.bin>


More information about the Cbc mailing list