[Coin-lpsolver] basisIsAvailable()

Matthew Saltzman mjs at ces.clemson.edu
Thu Nov 10 09:56:09 EST 2005


On Wed, 9 Nov 2005, Francois Margot wrote:

>
>
> 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.

CPXgetstat() returns a status code, one of about 35 altogether (although 
not all make sense for LP) describing how the solver call terminated.  It 
won't tell you (except by inference) whether the solution on record has a 
basis, but CPXgetstat() and CPXsolninfo() should always be in sync.

In CPLEX, it is possible to have a solution even if the algorithm 
terminates abnormally, which is why both bits need to be checked.

I believe that almost any change to a problem in CPLEX results in 
invalidation of the solution (but doesn't throw it away).  Reoptimizing 
afterward would be cheap if the current solution is still optimal.

>
> 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?

Of course, what that means is algorithm dependent.

>
> Francois
>
>

-- 
 		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs



More information about the Clp mailing list