Skip to content
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

Remove side effect of import watertap #1348

Closed
bknueven opened this issue Mar 29, 2024 · 0 comments · Fixed by #1353
Closed

Remove side effect of import watertap #1348

bknueven opened this issue Mar 29, 2024 · 0 comments · Fixed by #1353
Assignees
Labels
1.0 Hard requirement for the 1.0 release Priority:High High Priority Issue or PR spring-cleaning

Comments

@bknueven
Copy link
Contributor

Importing watertap executes the following lines of code:

## reconfigure IDAES to use the ipopt-watertap solver
import idaes
_default_solver_config_value = idaes.cfg.get("default_solver")
_idaes_default_solver = _default_solver_config_value._default
_default_solver_config_value.set_default_value("ipopt-watertap")
if not _default_solver_config_value._userSet:
_default_solver_config_value.reset()

which changes the behavior of the get_solver method in IDAES.

We should remove this side effect for downstream projects so they can explicitly specify the solver. One idea is to implement our own get_solver method so it is explicit which default set of options you are getting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Hard requirement for the 1.0 release Priority:High High Priority Issue or PR spring-cleaning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants