Sensitivity analysis of a linear constraint: confusing results
I have a model consisting of linear inequalities (maximising an objective), and for a particular constraint I am insterested in both the value of c.Pi and c.SARHSUp.
Initially, the RHS of the constraint is = 0. This yields:
c.Pi = 42.21 (shadow price/dual value)
c.SARHSUp = 0 (upper limit for changing the RHS such that current solution remains basic)
c.CBasic = -1
When I increase the RHS of this constraint by 1, however, the objective increases by 0.4248
c.Pi = 0.4248
c.SARHSUp = 6767.48
c.CBasic = -1
Increasing the RHS again by 1, does approximately improve the objective with the shadow price. In addition, sensitivity results remain the same, and the constraint remains non-basic.
My two questions:
Why does the model indicate that the constraint is not basic (while the inequality actually holds with equality in every case). However, after increasing the RHS to a number > 0, the sensitivity results look valid. This feels like a contradiction, why is it not?
It seems that the 'second' shadow price also holds approximately for the case when RHS = 0. Why does gurobi give me output that is in contrast with the results?
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Bjorn,
I am not sure I understand your confusion about the basis status. A constraint that is tight, has a zero slack variable, and is hence non-basic.
Could you maybe share a (minimal) reproducible example showing what you mean?
Thanks,
Matthias0
Post is closed for comments.
Comments
2 comments