same model running twice using 48 and 32 threads, the first is infeasible and the other is feasible
AnsweredHi
I have run an MIP model twice using 48 and 32 threads. I set "LazyConstraints=1" because I will use the callback to exclude some feasible solution.
my code:
from gurobipy import *
def mycallback(model, where):
if where == GRB.Callback.MIPSOL:
# Adding some lazy constraints
pass
# The number of threads, 48 or 32
Threads = 48
m = read('model.lp')
# Set the number of threads
m.setParam("Threads", Threads)
# Set LazyConstraints = 1
m.setParam("LazyConstraints", 1)
m.optimize(mycallback)
if m.Status == 2:
print("Find Solution")
m.write('solution_%i_cores.sol' %Threads)
elif m.Status == 3:
print("the model is infeasible")
else:
print("Unkown Error")
The 48-thread run gave "Model is infeasible", however the 32-thread run gave a feasible solution.
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?. -
the MIP model: https://www.dropbox.com/s/l7t6cyqmfcusiom/model.lp?dl=0
0 -
Hi,
I created a ticket on this issue. Please proceed in the ticket.
Best regards,
Jaromił1 -
This has been fixed in Gurobi 9.1, which is now available for download. Thanks for reporting the issue!
0
Post is closed for comments.
Comments
4 comments