Skip to main content

how to set the memory parameter in a Gurobi model using c++?

Answered

Comments

2 comments

  • Elisabeth Rodríguez Heck
    • Gurobi Staff

    Hi Igor,

    Which Gurobi version are you using? In version 9.5 the MemLimit parameter had to be set before starting the environment. If you are using 9.5, your code should be replaced by

    GRBEnv env = GRBEnv(true);
    env.set("LogFile", "Model_DEBUG.log");
    env.set("MemLimit", 8); env.start(); GRBModel model = GRBModel(env);

    But starting from version 10.0 your original snippet should work.

    Elisabeth

    0
  • Igor Melo
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you very much, I'll try this way

    0

Please sign in to leave a comment.