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

How print constraints?

回答済み

コメント

3件のコメント

  • 正式なコメント
    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.
  • Gwyneth Butera
    • Gurobi Staff

    Hi,

    There is no built-in print function for Gurobi objects. Thus, you can only print the actual expression by rebuilding it on your own by using functions for a linear expression to get the coefficients and variables of the left-hand side and the attributes of linear constraints to get the sense and the right-hand side.

    A different and the most convenient way would be to use the write() function to write an LP file and subsequently work with this LP file.

    Best regards,
    Gwyneth

    0
  • Tanmoy Das
    • Gurobi-versary
    • Investigator
    • Collaborator

    you can write the model, then print the written model (possibly in rlp or lp format) in Jupyter Lab (or whatever IDE you are using)

    0

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