Skip to main content

Gurobi Multiprocessing

Ongoing

Comments

3 comments

  • Official comment
    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 why not try our AI Gurobot?.
  • Matthias Miltenberger
    • Gurobi Staff

    Hi Sanjeev,

    It's not entirely clear to me what you are asking for. If the scenarios are to be run iteratively then they cannot be run parallel.

    You might be interested in Gurobi's multi-scenario feature: Multiple Scenarios (gurobi.com)

    Concerning your original question: It is not possible to share the same model across multiple seeds. You should always open a separate environment for each new thread.

    Cheers,
    Matthias

    0
  • Sanjeev Bhurtyal
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you Matthias for your comment. I am implementing Benders Decomposition algorithm. I need to solve sub problem 9 times in each iteration till the stopping criteria is met. Solving subproblem for s=1 is independent of solving sub problem for s=2. Following is my code snippet.

    Start

    mdlSP = gurobipy.model('Model')

    r=1

    for s in range(1,10):

        mdlSP.setAttr("RHS",constraint,newvalue[r,s])

         model.update()

         model.optimize()

    Check for stopping criteria

    r=r+1

    End

    Thanks,

    Sanjeev 

     

     

    0

Post is closed for comments.