Skip to main content

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

Answered

Comments

1 comment

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

Please sign in to leave a comment.