Skip to main content

Gurobi produces different result when .mps file contains objective offset




  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    A constant in the objective function can drastically change the relative MIPGap. Especially if the objective value jumps from very big to very small (in absolute values). Moreover, the addition of an objective constant may change the solution path, see Is Gurobi Optimizer deterministic?

    If the rest of your model is well scaled and the objective constant is the only very big value, I would recommend to remove this constant from the objective and solve without it. You can always just add it after the optimization process has finished.

  • Aisec Nory
    First Question
    First Comment

    Jaromił Najman Thank you for the reply. I get it now.


Please sign in to leave a comment.