[Coin-discuss] Strange termination
Matthias Koeppe
mkoeppe+coin at merkur.math.uni-magdeburg.de
Fri Jun 24 12:25:02 EDT 2005
Kasper Bonne Rasmussen <s992293 at imm.dtu.dk> writes:
> On Fri, 17 Jun 2005, Jean-Sebastien Roy wrote:
>> Mr Rasmussen, could you try with the presolve disabled and see if the
>> status returned is correct ?
>>
>> If it does, does the following patch fixes the status in all cases ?
>
> It compiles okay (with CPX_MIP_INForUNBD changed to CPXMIP_INForUNBD), but
> it does not solve the problem. The status is still CPXMIP_INForUNBD
> (119) after the second solve.
In my code (not related to COIN-OR), I use the following technique to
handle CPXMIP_INForUNBD.
{
int save_preind;
int save_relaxpreind;
(void) CPXgetintparam(env, CPX_PARAM_PREIND, &save_preind);
(void) CPXgetintparam(env, CPX_PARAM_RELAXPREIND, &save_relaxpreind);
/* "infeasible or unbounded" -- but we need to know which!
So turn off the presolver for this problem and try again. */
(void) CPXsetintparam(env, CPX_PARAM_PREIND, CPX_OFF);
(void) CPXsetintparam(env, CPX_PARAM_RELAXPREIND, CPX_OFF);
/* In CPLEX 9, this is a way to discard the presolve information: */
{
int objsen = CPXgetobjsen(env, lp);
CPXchgobjsen(env, lp, -objsen);
CPXchgobjsen(env, lp, objsen);
}
cpxstat = CPXmipopt(env, lp);
(void) CPXsetintparam(env, CPX_PARAM_PREIND, save_preind);
(void) CPXsetintparam(env, CPX_PARAM_RELAXPREIND, save_relaxpreind);
}
Regards
--
Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe
More information about the Coin-discuss
mailing list