[Coin-lpsolver] basisIsAvailable()

Francois Margot fmargot at andrew.cmu.edu
Wed Nov 9 18:24:29 EST 2005



On Wed, 9 Nov 2005, Matthew Saltzman wrote:

> On Wed, 9 Nov 2005, Francois Margot wrote:
>
>> On Tue, 8 Nov 2005, Matthew Saltzman wrote:
>> 
>>> On Tue, 8 Nov 2005, John J Forrest wrote:
>>>

> Well, yeah.  Or at least if there is no solution, return 0 (NULL) instead of 
> &solution[0].  I forget right now what motivated the current architecture. 
> But in fact, desn't isOptimal() tell you that there is a solution available 
> and that it is optimal?
>

If you mean isProvenOptimal(), it seems to indeed do the job for Cplex.
The Cplex doc for getstat (used in isProvenOptimal()) says:

    The routine returns the solution status of the most recent optimization
    performed on the CPLEX problem object.

I thought that if I optimize, get the optimal solution and then modify a
few bounds, getstat would still return CPX_STAT_OPTIMAL, but it is 
apparently not the case.

Do you know the difference between getsat and getsolninfo and are they always
in sync? If they are, we can probably remove the basisIsAvailable()
method from Osi.

For Clp, however, as soon as enableFactorization() is called, the method
isProvenOptimal() returns "false", even if no modification is made.

I must add that the Doxygen doc of OsiSolverInterface could be improved (I 
know, I can do it myself; except that to figure out what is supposed to
be returned by isProvenOptimal() you have to look at solver implementations
and they are not consistant with each other ...). The current doc on
isProvenOptimal() is the terse:

    Is optimality proven?

Francois





More information about the Clp mailing list