### MIP solution and final solve are different/ Objective of fixed model is different than the reported MIP solution FAQ

Posted:

**Thu Jan 07, 2021 4:57 pm**GAMS MIP solvers (by default) solve the MIP problem and then fixes the discrete variables at the levels returned by the solver and solves the resulting LP to get LP marginals (these marginals can be useful e.g. when interpreted as prices after some investments). The difference in fixed model and the discrete model usually indicates some numerical issue in the model. Even though it is best to reinspect the model in such a case, some options exist, such as, checking if the condition numbers are large by turning on e.g. "mipkappastats = 1" in a cplex.opt, "numericalemphasis 1", "scaind 1", and tightening the integer tolerance "epint 0" that can help one improve the numerics of their model (rather than manually searching for good scaling of your model).

It can also happen that the fixed model is infeasible. In such a case, it is important to understand that the problem is not infeasible just because the fixed problem was reported infeasible. It is merely an indicator for a numerically unstable model and that we failed to acquire good LP duals for the B&B solution. If only primal solution of the model is needed, the Cplex option ''solvefinal 0'' will turn off the solution of the final LP. In that case no duals will be reported.

It can also happen that the fixed model is infeasible. In such a case, it is important to understand that the problem is not infeasible just because the fixed problem was reported infeasible. It is merely an indicator for a numerically unstable model and that we failed to acquire good LP duals for the B&B solution. If only primal solution of the model is needed, the Cplex option ''solvefinal 0'' will turn off the solution of the final LP. In that case no duals will be reported.