Originally posted by: EdKlotz
Theoretically, the MIP gap can of course never be negative. However, given the finite precision computing environment in which CPLEX operates, in practice it can occur, and the recommendations of Paul and Daniel try to address that. In addition to their recommendations (check the kappastats, turn on numerical emphasis), I would suggest the following tests, which should be done on an exported SAV file with interactive CPLEX so we can take anything GAMS does out of the picture.
1) Check the solution quality of the MIP solution with negative MIP gap (e.g. 'display solution quality' after solving the MIP in interactive CPLEX). If there are significant violations, that could explain the issue.
2) Run with the datacheck parameter set to 2, which will turn on CPLEX's modeling assistance feature, and perhaps point you to the particular aspect of the model that has numerical issues.
3) Run with default settings and see if the negative MIP gap persists. If not, start systematically adding your non default parameter settings until you see which one causes the negative MIP gap to occur.
4) Do a run with presolve turned off. Fundamentally, CPLEX's node log out translates information from the presolved model back to your original model. If something went wrong with this, that could explain it.
5) Add a constraint to the original MIP that the objective must be <= the 1.0305 solution objective value that resulted in the negative MIP gap. Is the resulting model infeasible? If so, run the conflict refiner to get an explanation of the infeasibility, which may shed light on what is happening.
#CPLEXOptimizers#DecisionOptimization