When cancelling a solution search early, which is not based on a specified rel. MIP gap limit but e.g. via a time limit, is it possible to display the relative MIP gap of the best feasible solution that was found by the solver?
Asked
Active
Viewed 566 times
1 Answers
2
Unfortunately there is no direct API as the definition of relative MIP gap varies across solvers.
You can always pick one formula and recompute it using the two methods on the objective: MPObjective.Value()
and MPObjective.BestBound()
.

Laurent Perron
- 8,594
- 1
- 8
- 22
-
Thank you very much Laurent! This was exactly what I was looking for. – sixflags Oct 04 '21 at 09:03