Suppress constraint output in Python
AnsweredHi. Could someone please write out a piece of code for me to suppress constraint output in Python. Thank you.

0
-
Official comment
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. -
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,
Simon1
Post is closed for comments.
Comments
2 comments