[Cbc] Determining feasibility when a model times out

Stefan Vigerske stefan at math.hu-berlin.de
Tue Jun 28 17:46:56 EDT 2011


Hi,

I agree with Lou.
If you still want to use Cbc via Osi, then you can get to the CbcModel 
via OsiCbc::getModelPtr() and call the status methods from there.
You can then call isNodeLimitReached(), isSecondsLimitReached(), and get 
the dual bound via getBestPossibleObjValue().
Comparing the latter with getObjValue() should be most reliable for 
seeing whether Cbc finished with a proven optimal solution or how far it 
may still be away.

Stefan

> Troy,
>
>> Using the OSI interface to CBC,
>
> 	This is your mistake  :-)   Seriously, Osi is just not set up to
> provide the kind of control necessary for a MIP solver. If you want to
> do anything more than run the solver to completion, you're better off to
> use Cbc directly.
>
> 	There are a few folks out there who are more fond of OsiCbc. One of
> them may be able to offer more helpful advice.
>
> 						Lou
>
>   if I call setMaximumSeconds and
>> branchAndBound() terminates due to that limit, how do I distinguish
>> between it finishing with a feasible (but possibly suboptimal)
>> solution and finishing with an infeasible solution?  I see methods
>> like isProvenOptimal and isProvenPrimalInfeasible, but nothing like
>> isFeasible.
>>
>> I could loop over all of the integer variables and check if they are
>> within tolerance of integer values, but it seems that there should be
>> a method that does that (and does not risk me using the wrong
>> tolerance or getting a different rounding error).
>>
>> Is there something I am missing?
>>
>> Troy
>>
>>
>> _______________________________________________ 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