gurobi python parallelization
Answeredi am running gurobi optimize in parallel with concurrent futures threadpoolexecutor with another function. if the other function finishes before the gurobi model optimization, how do i cancel the optimization and retrieve the suboptimal result?
0
-
Official comment
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. -
Hi Tarun,
You can call the terminate function from any thread. This will stop the solver process. You should then retrieve the result from the thread/function that originally created the model to avoid issues with thread-safety.
Kind regards,
Ronald0
Post is closed for comments.
Comments
2 comments