Skip to main content

Multiscenario python returns same solution for each scenario

Ongoing

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff 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 why not try our AI Gurobot?.
  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Olaf,

    Is it possible that you are working on a Compute Server or Cloud? If yes, then you have to call the Model.update() function after setting the scenario to properly update the cached values, i.e.,

    m.Params.ScenarioNumber = s
    m.update()
    # rest of the code

    Best regards,
    Jaromił

    0
  • Olaf de Leeuw
    • Gurobi-versary
    • First Comment
    • First Question

    Yes! Thanks a lot.

    0
  • Matthias Miltenberger
    • Gurobi Staff Gurobi Staff

    Please note that this behavior has been fixed for Gurobi 9.0.3 and adding the update() call is not necessary for that version.

    0

Post is closed for comments.