How do I specify the algorithm used to solve my model in pyomo?
AnsweredI want to designate the algorithm used (https://www.gurobi.com/documentation/9.1/refman/method.html#parameter:Method), but I am not sure where I specify this parameter. I think that it should be included somewhere in these two lines of code:
solver = po.SolverFactory('gurobi')
result = solver.solve(model, tee = True)
All syntax combinations that I have tried have caused errors.
1

You can specify solver parameters in the solver object's options dictionary:
solver.options['Method'] = 1
This is covered in the Sending Options to the Solver section of the Pyomo documentation.
0
Please sign in to leave a comment.
Comments
1 comment