Skip to main content

How to generate sensitivity analysis report in detail

Answered

Comments

6 comments

  • Official comment
    Juan Orozco
    Gurobi Staff Gurobi Staff

    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.

  • Daniel Mitchell
    Gurobi-versary
    First Comment

    How do you get SAObjUp and SAObjLow in R?  The only sensitivity analysis values I can find are pi and rc.

     

     

    0
  • Eli Towle
    Gurobi Staff Gurobi Staff

    Unfortunately, the SAObjUp and SAObjLow sensitivity attributes are not currently available through the R interface. However, we have logged this as a feature request.

    0
  • Robert Hildebrand
    Gurobi-versary
    Conversationalist
    First Question

    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
  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    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,
    Matthias

    0
  • Robert Hildebrand
    Gurobi-versary
    Conversationalist
    First Question

    Thanks!  I didn't know about this functionality.  That's very helpful. 

     

     

    0

Please sign in to leave a comment.