6
$\begingroup$

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
$\endgroup$

1 Answer 1

5
$\begingroup$

You 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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.