[Cbc] How to get the ''Lower bound''?

John Forrest john.forrest at fastercoin.com
Thu Oct 4 14:10:58 EDT 2012


Alexis,

It is a minor bug.  A copy of the model is made to work on and not all 
information is copied back from that model to cbcSolver.

Luckily it is easy to get at this copy.  If you are basing your code on 
driver4.cpp then you would add

     printf("Best possible is %g\n",model->getBestPossibleObjValue());

after line 83 (after case 5:)

Hope that works for you.

John Forrest



On 04/10/12 18:11, Alexis Guigue wrote:
> Hi all,
>
> I am calling CBC in my C++ program, i.e., callCbc("-solve -quit", 
> cbcSolver);
> where cbcSolver is an instance of CbcModel.
>
> I have a time limit that I have specified, i.e., 
> cbcSolver.setMaximumSeconds(OptiVariables::dMaxRunTime);
>
> Time limit is reached in some cases and the output looks like
>
> Objective value : .....
> Lower bound    : ......
> Gap                    : ......
>
> My understanding is that Objective value is the objective value of the 
> best integer solution obtained
> so far and that Lower bound is that  the best integer solution that 
> could be hoped for considering the cuts, etc..
> and Gap is just the gap between the two.
>
> Now, if my understanding is correct, how do I retrieve within my 
> program the Lower bound. I tried
> to call cbcSolver.getBestPossibleObjValue(); but it seems to give 
> Objective value instead.
>
> Help??
>
> Thanks
>
> Cheers
>
> Alexis
>



More information about the Cbc mailing list