Hi there,
I want to extract and display the relative optimality gap of the solution found by the solver in GAMS after the solve statement. How do I do that
Note that this is different from specifying optcr before the solve statement
How to get relative optimality gap after the solve statement in GAMS
-
- User
- Posts: 1
- Joined: 3 years ago
Re: How to get relative optimality gap after the solve statement in GAMS
After the solve you have access to `modelname.objest` (dual bound) and the objective value `modelname.objval` now you can calculate the relative gap yourself using your favorite formula. Note that different solvers use different formulas to determine the gap: https://www.gams.com/latest/docs/UG_Gam ... AMSAOoptcr
Hope this helps,
-Michael
Hope this helps,
-Michael