Skip to content

PEP: Global Pyomo Config File #3534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mrmundt opened this issue Mar 24, 2025 · 2 comments
Open

PEP: Global Pyomo Config File #3534

mrmundt opened this issue Mar 24, 2025 · 2 comments

Comments

@mrmundt
Copy link
Contributor

mrmundt commented Mar 24, 2025

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

@mrmundt
Copy link
Contributor Author

mrmundt commented Mar 24, 2025

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?

@emma58
Copy link
Contributor

emma58 commented Mar 24, 2025

This is a good thing to do! Regarding your questions:

  • The default Var domain is Reals, with lb and ub both None.
  • The default Param domain is currently Any, though that's deprecated--the plan is for it to be Reals. And the default value is None. (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...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants