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

How do I save file after finished analysis model in Terminal?

回答済み

コメント

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.
  • Jaromił Najman
    • Gurobi Staff

    You can use the write method to write an LP or an MPS file of your model.

    An example input would be

    Gurobi Interactive Shell (mac64), Version 9.5.0
    Copyright (c) 2021, Gurobi Optimization, LLC
    Type "help()" for help

    gurobi> model=Model("test")
    gurobi> x = model.addVar()
    gurobi> model.setObjective(x)
    gurobi> model.write("myLP.lp")

    This writes your current model to an LP file called \(\texttt{myLP}\).

    Best regards,
    Jaromił

    0

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