Skip to main content

[HELP] Sensitivity analysis

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    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?.
  • Jaromił Najman
    • Gurobi Staff

    RC is a variable attribute and Pi is a constraint attribute. Thus, you have to access those via the particular objects, see getAttr() and Python Attribute Examples.

    0
  • Evans Etrue Howard
    • Gurobi-versary
    • First Comment
    • First Question
     
    I tried and I still got this error message
     
    print(mo.getAttr("Pi", mo.getConstrs()))
     
    ---------------------------------------------------------------------------
    GurobiError                               Traceback (most recent call last)
    <ipython-input-57-aeeada5b4371> in <module>
    ----> 1 print(mo.getAttr("Pi", mo.getConstrs()))
    
    src\gurobipy\model.pxi in gurobipy.Model.getAttr()
    
    src\gurobipy\attrutil.pxi in gurobipy.__gettypedattrlist()
    
    GurobiError: Unable to retrieve attribute 'Pi'
    0
  • Jaromił Najman
    • Gurobi Staff

    The Pi attribute is only available for continuous problems, cf. the documentation. For MIPs, see How do I retrieve the (dual) Pi values for a MIP problem?

    0

Post is closed for comments.