Skip to main content

RHS Value

Awaiting user input

Comments

2 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Eli Towle
    • Gurobi Staff

    The RHS attribute should capture the exact value of the constraint's right-hand side. Note that Gurobi moves all constants in the constraint over to the right-hand side:

    >>> c = m.addConstr(x + 0.03125 <= 0.0625)
    >>> m.update()
    >>> c.RHS
    0.03125

    Alternatively, is it possible the printed RHS values are formatted to show only one decimal place?

    If neither of those suggestions help, can you please post a few lines of self-contained code that reproduce the behavior you're seeing? It would also be helpful to know where you are running the code (in an interactive shell, Jupyter notebook, IDE, etc.).

    0

Post is closed for comments.