I am solving a multi-objective linear program with a lexicographic order in Gurobi and I set a time limit (c++ program calling the solver).
I want to retrieve the gap for the last objective that was being optimized when the time limit was reached, along with its corresponding objective number. The command GRB_DoubleAttr_MIPGap is yielding the following error
Error code = 10005
Unable to retrieve attribute 'MIPGap'
I cannot find any other alternatives, is it possible to retrieve these two values?
Not all attributes are available when using the multi-objective optimization mode. You will have to query the primal and dual bounds in a callback and manually compute the MIPGap between them.
Here is some more information: How do I query best bound and best objective values in multi-objective optimization?