[PEP]: Global Pyomo Config File
Summary
We have been having discussions in our weekly dev calls about introducing a "global config file" feature that would allow users to save their preferred/default configurations.
Rationale
We do not currently have any feature to allow users to "save" their common configuration options. We think this would be a quality of life update.
Description
Users can make their own configuration file and pass it into Pyomo, which will use any option in the config file rather than built-in defaults (e.g., could change the default solver to ipopt or sense to maximize; can pass in options that they regularly prefer such as tee=True).
Additional information
It would also make sense as part of this to create a doc page that contains a list of pre-defined defaults such as:
- Default solver: glpk (really? why?)
- Sets: ordered = True
- Objectives: sense = minimize
- Suffixes: LOCAL; FLOAT
- Expressions: algebraic form string representation
- What are the defaults for var domains and bounds? They aren't documented at all
- Ditto for Params / Constraints / SOS: is there anything important to note about defaults here?
This is a good thing to do! Regarding your questions:
- The default
Vardomain isReals, with lb and ub bothNone. - The default
Paramdomain is currentlyAny, though that's deprecated--the plan is for it to beReals. And the default value isNone. (For the record, we deprecated in 5.6.9 and said we were going to make the change in or after 6.0, so we could actually do it...)