Closed grgmiller closed 1 year ago
@grgmiller could you provide a minimal example that reproduces the error? I'm curious how you're specifying the solver option.
I will try and create an example, but for a bit more context, I am using the MATCH model, which uses pyomo. The model reads solver options from a text file, if specified. In this case, however, I am not specifying any solver options, so there should not be any options passed to the solver by the MATCH model.
This is the solve function in MATCH: https://github.com/pencleanenergy/MATCH-model/blob/4c4122a91601e126280fec7db93d8e7d5dde6a03/match_model/solve.py#L837
Pyomo adds -printingOptions all
in both pyomo/solvers/plugins/solvers/CBCplugin.py
and pyomo/contrib/appsi/solvers/cbc.py
. My question is where are you getting CBC from? "20221228" does not match the (historical?) CBC versioning scheme: the most recent [as of a couple months ago] release was 2.10.4 if you built all of coin-binary, or 2.10.8 if you worked things to just build cbc.
I am downloading the cbc standalone executable from https://ampl.com/products/solvers/open-source-solvers/, which is where the cbc github page points to https://github.com/coin-or/Cbc
Got it. That is not a general build of CBC: that is CBC compiled against the ASL (i.e., it is CBC for AMPL). You should be able to use that through Pyomo's "nl" interface using the solver name asl:cbc
.
Ah thank you @jsiirola that seems to have fixed the issue.
Summary
When attempting to solve a model using the CBC solver, I am getting an error about the
-printingOptions
option being invalid. I'm not sure if this option was removed in the newest version of CBC and if I need to try using an older version of CBC for this to work?Error Message
Information on your system
Pyomo version: 6.4.0 Python version: 3.10.8 Operating system: Windows 10 How Pyomo was installed (PyPI, conda, source): conda Solver (if applicable): cbc v20221228
Additional information