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
-
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
Please sign in to leave a comment.
Comments
2 comments