Originally posted by: EdKlotz
>
> Dear All,
>
> as far as i know the relative gap for a MIP solution should be non-negative by definition. However, i get the following results using Cplex 12.1.
>
> - getStatus()==OPTIMAL
> - getCplexStatus()==OPTIMAL
> - getObjValue()<getBestObjValue() which should, again, not be i think
> - getMIPRelativeGap()<0
>
> In some sense these results are consistent.
>
> Up to now i thought, that
> - getObjValue() delivers the objective value of the best feasible solution found
> - getBestObjValue() delivers the best lower bound (talking about minimization problems)
> - getMIPRelativeGap()=(getObjValue()-getBestObjValue())/getBestObjValue()...(this actually holds in my case).
>
> Am i mistaken at some point?
> If not, is it a know problem?
> Any solutions to that?
>
> Thanks in advance,
> Dirk
Assuming you are minimizing, everything you said is true, under
perfect arithmetic. However, if your model is ill conditioned,
then a negative mipgap is possible in finite precision.
Can you reproduce this with interactive CPLEX and a SAV file of the model in question? In other words, add a call to IloCplex::exportModel after the solve() call that yielded the above results. Then, start up interactive CPLEX, read in the SAV file, and solve (using any non default parameter settings that you used in your program if they are essential to reproducing the behavior). Check the solution quality, and
also check the problem statistics to see if the model has mixtures of large and small numbers that might lead to ill conditioning.
#CPLEXOptimizers#DecisionOptimization