[Cbc] Determining feasibility when a model times out

Ted Ralphs ted at lehigh.edu
Thu Jun 30 12:08:38 EDT 2011


I agree with Matt. The design of Osi works fine for calling MILP
solvers. It is not a perfect fit and there are ways in which Osi could
have been designed a bit differently to better support calling MILP
solvers directly. However, I don't see any  reason OsiCbc can't
support post-solution queries the way many of the other OsiXxx
implementations do when solving an MILP.

For Troy's question, something like getColSolution() or getObjValue()
should work, in principle, to determine if a feasible solution has
been found, but it looks to me like these are just pass-throughs to
the interface of the LP solver (Clp) and so might not return the
desired information. It is on my TODO list to look at this, but it
might take some time.

Cheers,

Ted

 and I believe we should support calling Cbc through Osi as best we can.

On Tue, Jun 28, 2011 at 5:51 PM, Matthew Galati
<matthew.galati at gmail.com> wrote:
> Just my 2-cents, but dropping to Cbc instead of supporting what is needed at
> OsiCbc defeats the purpose of OSI. OsiXxx should at least support LP and
> MILP solvers.
>
> If the long term plan is really to just support LP solvers, than let's call
> it OSILP or something more appropriate.
>
> Matt
>
>
>
> On Tue, Jun 28, 2011 at 5:46 PM, Stefan Vigerske <stefan at math.hu-berlin.de>
> wrote:
>>
>> 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
>> >
>>
>> _______________________________________________
>> 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
>
>



-- 
Dr. Ted Ralphs
Associate Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted




More information about the Cbc mailing list