Skip to main content

Retrieve relative gap and dual objective value

Awaiting user input

Comments

3 comments

  • Mario Ruthmair
    Gurobi Staff Gurobi Staff

    Hi Jake,

    (1) There are only solution quality attributes related to the model, not to particular variables or constraints. They give you the maximal violations over the whole solution:

    • BoundVio, ConstrVio, ConstrResidual give you the primal violations
    • DualVio, DualResidual give you the dual violations
    • ComplVio gives you the complementarity of the current primal/dual solution pair (which should be zero)
    • MaxVio is the maximum over all the above.

    (2) You can query the dual objective value via model attribute ObjBound.

    Best regards,
    Mario

    1
  • jake roth
    Gurobi-versary
    Curious
    Conversationalist

    Thanks Mario! When I query this field for an LP solved with barrier, I find that I obtain an error (1005: DATA_NOT_AVAILABLE) though the optimal objective is nonzero and the solver terminates successfully with the correct solution. Is there a field/attribute that contains the final dual residual value from the barrier log?

    0
  • Mario Ruthmair
    Gurobi Staff Gurobi Staff

    I just solved an LP with barrier and was able to query successfully the attribute "DualResidual" after the optimization finished. Could it be that your final state was not "Optimal"?

     

    1

Please sign in to leave a comment.