[Osi] CPLEX Error 1217: No solution exists
Matthew Galati
magh at lehigh.edu
Mon Jun 2 12:01:02 EDT 2008
Umm... ok, header has pure (=0) but src has it implemented. Bug.
> It looks to me like base implementation is pure virtual
> /// Get objective function value
> virtual double getObjValue() const = 0;
>
>
>
>> CPLEX wipes out all solution information as soon as you make any
>> change to the problem whatsoever. I don't believe that the objective
>> value is one of the things cached in the base class. If you look at
>> the current implementation of getObjVal() in OsiCpx, it tries to get
>> the objective value using CPXgetobjval(). If Cplex reports
>> CPXERR_NO_SOLN, then the function returns 0.0 by default. In the base
>> class, the default implementation of the getObjVal() function computes
>> the objective value on the fly from cached data, which I guess would
>> fix the problem. Try just commenting out the getObjVal() function in
>> OsiCpx or else call the base class implementation from there and see
>> if that does what you need. If that works, we should probably make
>> that change.
>>
>> Cheers,
>>
>> Ted
>>
>>
>>
>> Matthew Galati wrote:
>>
>>> This might be related to an old discussion...
>>>
>>> Using OsiCpx, I do
>>> initialSolve()
>>> getObjValue()
>>> addCols()
>>> getObjValue() --> returns CPLEX Error 1217: No solution exists
>>>
>>> This is just an LP. Earlier issues with caching seem to have to do
>>> with switching from MIP to LP, etc.
>>>
>>> It looks like some attempt to keep cache was already made. Any ideas?
>>> If needed, I can create a driver program to show this issue.
>>>
>>> int err = CPXaddcols(env_,
>>> getLpPtr(OsiCpxSolverInterface::KEEPCACHED_ROW),
>>> numcols, nz, const_cast<double*>(obj),
>>> start, index, elem,
>>> const_cast<double*>(collb),
>>> const_cast<double*>(colub), NULL );
>>>
>>> _______________________________________________
>>> Osi mailing list
>>> Osi at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/osi
>>>
>>
>
>
> _______________________________________________
> Osi mailing list
> Osi at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/osi
>
More information about the Osi
mailing list