Skip to main content

RHS Value

Awaiting user input

Comments

1 comment

  • Eli Towle
    Gurobi Staff 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

Please sign in to leave a comment.