I am currently using the cbc
solver with Pyomo
opt = SolverFactory('cbc')
opt.solve(model)
How can more options for Cbc be used, such that what we run using Pyomo is similar to:
cbc -cuts off -strong 0 -preprocess off -heuristic off -solve
Operations Research Stack Exchange is a question and answer site for operations research and analytics professionals, educators, and students. It only takes a minute to sign up.
Sign up to join this communityYou can use opt.options['Solver parameter to change']='value'
. The following is part of the code that I tried and the generated output:
opt.options['heuristics'] = 'off'
opt.options['preprocess'] = 'off'
opt.options['loglevel'] = 50
Pyomo's output:
command line - ampl cbc heuristics off preprocess off loglevel 50 heuristics off preprocess off loglevel 50 -solve -quit (default strategy 1)
Option for heuristicsOnOff changed from on to off
Option for preprocess changed from sos to off
The list of options for cbc can be found here.