Commit 5f8df347 authored by Bowen Wu's avatar Bowen Wu
Browse files

Force cplex threads to be 4

parent c1575ddc
......@@ -67,10 +67,14 @@ class CplexSolver(Solver):
model.set_warning_stream(None)
model.set_error_stream(None)
model.set_log_stream(None)
ps = model.create_parameter_set()
ps.add(model.parameters.threads, 4) # somehow 32 threads is very slow
if self.timeout:
ps = model.create_parameter_set()
ps.add(model.parameters.timelimit, MAX_TIME_LIMIT)
model.set_parameter_set(ps)
model.set_parameter_set(ps)
with VerbosePrint(self.verbose):
model.read(mps_file)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment