RC in Simplex Method
AnsweredHello. How do I get the reduced cost of the slack variable in the specified inequality constraint after the model has been solved to optimality and a basic solution is available. Excuse me, are there any related attributes in gurobi?
0
-
Official comment
This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Cong,
You can't directly query the reduced cost of the slack variables but they are related to dual values.
If a constraint sense is:
- "=" then there is no slack variable
- "<" then the reduced cost of the slack variable is the negative of the constraint dual value
- ">" then the reduced cost of the slack variable is the constraint dual value
The dual values can be obtained using the Pi attribute of constraints. Note that reduced costs and dual values are only available for continuous models.
- Riley
0 -
Hi Riley,
Your explanation is too clear, which makes me suddenly enlightened!
Thank you very much for your help.
Best Wishes,
- Cong
0
Post is closed for comments.
Comments
3 comments