メインコンテンツへスキップ

Suppress constraint output in Python

回答済み

コメント

2件のコメント

  • 正式なコメント
    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.
  • Simon Bowly
    • 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

投稿コメントは受け付けていません。