[GUROBI] nonnegatice reduced costs in fixed MIP

188 views
Skip to first unread message

Francesco Bertoli

unread,
Dec 10, 2015, 11:23:20 PM12/10/15
to Gurobi Optimization
Hi
I'm trying to get the reduced costs for a MIP. I solve the MIP model (called m) to optimality and then used fixed() to copy it. Then I et the reduced costs that are all nonnegative. Which I don't get as the solution is not optimal.
Here's the code, m is the MIP model. All the variables are integers.

m.optimize()
m2 = m.fixed()
m2.optimize()
red_costs = [v.RC for v in m2.getVars()]

all values in red_costs are non negative. Which would imply the fixed solution to be optimal. Except it's not (the LP model has a lower objective value).
What's that I missing?
Thanks to anybody that'll reply


Tobias Achterberg

unread,
Dec 11, 2015, 3:07:21 AM12/11/15
to gur...@googlegroups.com
I assume that you are minimizing your objective. Then, positive reduced costs
mean that the variable are at their lower bounds. But which lower bounds? The
ones in the *fixed* problem. Thus, if your MIP solution has a value of x = 1 for
a variable 0 <= x <= 10, then the fixed problem has bounds 1 <= x <= 1. If x has
positive reduced costs, it just means that the lower bound 1 <= x is tight. But
in the LP relaxation to your MIP (where the bounds are 0 <= x <= 10) it can of
course very well be that for some value 0 <= x < 1 you get a better objective
value as in your fixed problem.

As I said in the other thread, the meaning of the dual solution to the fixed
problem is somewhat questionable.

Tobias
Reply all
Reply to author
Forward
0 new messages