Retrieve relative gap and dual objective value
Awaiting user inputI am running a barrier method to solve an LP and a QP and would like to retrieve
- final residuals: primal infeasibility, dual infeasibility, relative objective value gap
- final dual objective value
For (1), is this: MaxVio, DualVio, ComplVio?
For (2), is there an attribute for this?
-
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,
Mario1 -
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 -
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.
Comments
3 comments