Skip to main content

RHS Value

Awaiting user input


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

    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.).


Please sign in to leave a comment.