Skip to main content

Suppress constraint output in Python

Answered

Comments

1 comment

  • Simon Bowly
    Gurobi Staff Gurobi Staff

    Hi Prasanna,

    IPython/Jupyter displays the result of the last line of a cell by default - this isn't specific to gurobipy or addConstrs. You can suppress this output by ending the line with a semi-colon

    m.addConstrs(...);

    or by assigning the result to a Python variable:

    constr_3_1 = m.addConstrs(...)

     

    Best regards,
    Simon

    1

Please sign in to leave a comment.