[Coin-discuss] Cplex use termination code "abandoned" if presolve determines that problem is infeasible or unbounded.
Ted Ralphs
tkr2 at lehigh.edu
Wed May 14 10:19:46 EDT 2003
Tommy,
I have run into this problem with CPLEX before. The problem is that if the LP is
found infeasible during presolve, this has to be detected by checking the
termination code after optimizing---this information is not available through
the CPXgetstat() function later because the LP is never actually solved. An ugly
workaround that will get you going for now is to check for the this condition in
OSI's solve routines and if it is detected, then turn off presolve and force
CPLEX to solve the problem again. This should correctly set the problem status
and everything should work fine. For example, try adding something like the
following few lines to the end of resolve():
int term = CPXdualopt(env_, lp);
if (term == CPXERR_PRESLV_INForUNBD){
int err = CPXsetintparam(env_, CPX_PARAM_PREIND, CPX_OFF);
checkCPXerror( err, "CPXsetintparam", "resolve");
term = CPXdualopt(env_, lp);
err = CPXsetintparam(env_, CPX_PARAM_PREIND, CPX_ON);
checkCPXerror( err, "CPXsetintparam", "resolve");
}
and something similar in initialSolve(). This should get you going. A longer
term fix is probably needed, though.
Ted
--
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2
More information about the Coin-discuss
mailing list