Multiprocessing produce different results in each run.
Awaiting user inputI used the following code for multiprocessing, but it gives different results in each run. Am I doing something wrong?
import multiprocessing as mp
import gurobipy as gp
def solve_model(input_data):
with gp.Env() as env, gp.Model(env=env) as model:
#read model from LP file
model.optimize()
# retrieve data from model
if __name__ == '__main__':
with mp.Pool() as pool:
pool.map(solve_model, [input_data1, input_data2, input_data3]
0
-
Official comment
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?. -
Hi Sanjeev,
Could you please try posting a minimal reproducible example (MRE)?
Best regards,
Jaromił0
Post is closed for comments.
Comments
2 comments