[Cbc] Solution callbacks

John Forrest john.forrest at fastercoin.com
Thu Oct 8 10:34:15 EDT 2015


Gleb,

On 08/10/15 05:56, Gleb Belov wrote:
> Hi, what is currently good way to have a solution callback in Cbc? the 
> interrupt example shows 2 ways, don't know which is right.
>

It is the event handling code you would be using.
> Moreover, it says that the solution would be given for the 
> preprocessed model. Is it possible to produce one for the original? 

At present no.  In principle not difficult.  First the callback function 
would have to be modified to get passed the CglPreProcess object - 
easy.  Then in event handler you could make a copy of object and 
postsolve (you need a copy as postsolve deletes data).
> Is it possible to call other functions from inside, such as number of 
> nodes, dual bound?

Yes - you have CbcModel * model_ so things like that are available (or 
could easily be made available)

>
> Thanks
>

John Forrest



More information about the Cbc mailing list