How to generate sensitivity analysis report in detail
AnsweredHi,
I have used gurobi to solve my problem. Now I want to generate sensitivity report for the objective function. I found excel solver generates a very well detailed and organised report. On the similar lines how do I generate the reports using Gurobi (python).
Regards,
Vaibhav
-
Official comment
Please find below the object attributes you need to query:
- var.x: Value in the current solution.
- var.RC: Reduced cost.
- var.obj: Linear objective coefficient.
- var.SAObjUp: Objective coefficient sensitivity information. Note that this is not given as an increase to the current coefficient in the objective.
- var.SAObjLow: Objective coefficient sensitivity information. Note that this is not given as a decrease to the current coefficient in the objective.
- constr.slack: Slack in the current solution.
- constr.pi: Dual value (also known as the shadow price).
- constr.RHS: Right-hand side value.
- constr.SARHSUp: Right-hand side (RHS) sensitivity information. Note that this is not given as an increase to the current RHS.
- constr.SARHSLow: Right-hand side (RHS) sensitivity information. Note that this is not given as a decrease to the current RHS.
For more information, kindly refer to the section called Attributes of our reference manual.
-
How do you get SAObjUp and SAObjLow in R? The only sensitivity analysis values I can find are pi and rc.
0 -
A sensitivity analysis package in the GUROBI TOOLs github hub would be a fantastic thing to add! This would make teaching introductory courses with gurobi much easier.
Perhaps also a function to dualize an LP. That'd be nice.
0 -
Hi Robert!
Gurobi 9.5 can actually compute the dual LP by simply specifying the DUA format or DLP format when calling Model.write().
A sensitivity analysis package could indeed be interesting. Did you already find our example sensitivity.py?
Cheers,
Matthias0 -
Thanks! I didn't know about this functionality. That's very helpful.
0
Please sign in to leave a comment.
Comments
6 comments