Skip to main content

GRB.MAXIMISE identifies lower objective function values than GRB.MINIMIZE. How can this be avoided?




  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Gaurav,

    One way to check what is happening here is to create and solve a fixed model where the upper bound and lower bound of each variable is fixed to the value of the variable in the solution with the objective value -1084.  If the fixed model is infeasible, you can inspect the infeasibility, for example, by running the computeIIS method.

    Please take a look at this article for more details: How do I diagnose a suboptimal objective value returned as optimal by Gurobi?

    Best regards,

  • Gaurav Malik
    First Question

    Hi Simranjit

    Thank you very much for your reply. However, if GRB.MAXIMISE is able to identify the -1050 and -1084 as sub-optimal solutions then I do not understand why would the fixed model (fixed for the variable values corresponding to -1084 case) return an infeasible model.

    I have another issue. I tried retrieving the variable values for suboptimal solutions of the maximisation problem using the SolNumber parameter. During the solution process Gurobi prints that it was able to find 4 solutions: -416K, -433K, -433K and -433K. However, when I set the Solution Number to 3 and retrieve the Obj Value, by using PoolObjVal, it still returns -416K instead of -433K. What could be wrong?




Please sign in to leave a comment.