I have a continuous model with a linear objective function with a minimization sense.
My expectation of duality would be that given:
total = 0
for c in rm.getConstrs():
total += c.RHS * c.Pi
"total" would be equal to the objective value, if strong duality holds, or at least less than the objective value, if weak duality holds.
print(total - rm.ObjVal)
Which has me pretty confused. The Objective value of my model is:
Optimal objective 1.099028532e+07
I'm optimizing with default parameters. Is Gurobi maybe not updating the dual values to the final value after finishing optimization? And if this is the case, can I force this update? Or am I missing something else entirely?
Please sign in to leave a comment.