Skip to main content

Why does my optimization model's solution vary in a for-loop, despite the loop parameter not being in the model?

Awaiting user input

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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.
  • Maliheh Aramon
    • Gurobi Staff

     Hi Karl, 

    If the same model is solved with the same parameters on the same hardware, the solution path should not change regardless of how many times you solve it. However, traversing the same solution path does not necessarily mean that Gurobi would stop at the same solution point, If you use a non-deterministic termination criterion such as TimeLimit, the exact point in the search tree where Gurobi stops in each run might differ because the exact number of CPU cycles your machine gives to Gurobi might differ in each run depending on the status of the other processes running on your machine. 

    What termination criteria are you using? In case you are using TimeLimit, you can consider setting the WorkLimit parameter instead which is deterministic.

    Env.alpha = alpha

    What is the Env object here? Is this a Gurobi Environment object?

    Best regards,

    Maliheh

    0

Post is closed for comments.