[Cbc] Logging intermediate solutions

John Forrest john.forrest at fastercoin.com
Tue Feb 28 04:05:32 EST 2012


Probably easiest to use Cbc/examples/driver4.cpp which acts like the 
standard executable.  If you look for ::event, you will see that that 
prints solution every time.  As it is, it has a drawback if 
preprocessing has been done.

driver4.cpp prints variables in preprocessed model.  To fix that you 
need to use originalColumns() from the CglPreProcess object which did 
preprocessing.  Normally this will be the global variable 
cbcPreProcessPointer.

John Forrest



On 27/02/12 19:13, acw at ascent.com wrote:
> Is there a command-line option to make the standard Cbc executable log 
> intermediate solutions as they are found?  Using default settings, the 
> _fact_ that a solution has been found is logged, but we would like it 
> to log the solution itself (printing the values of all nonzero 
> variables).
>
> The reason we want this is that we have a different sort of solver 
> running in parallel with Cbc, and we would like to be able to feed it 
> "hints" as the solution process proceeds.
>
> Our solution so far has been to actually modify the Cbc main driver 
> loop, in the source, to log store each solution as it is found.  But 
> it is risky and inconvenient having to repeat this source-surgery 
> every time a new and improved version of Cbc appears.  It would be a 
> stabler solution to just interact with Cbc through the command-line 
> interface.
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20120228/ef7a876b/attachment.html>


More information about the Cbc mailing list