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

Problems with ipopt as solver #254

Open
SimonRubenDrauz opened this issue Dec 1, 2021 · 2 comments
Open

Problems with ipopt as solver #254

SimonRubenDrauz opened this issue Dec 1, 2021 · 2 comments

Comments

@SimonRubenDrauz
Copy link

SimonRubenDrauz commented Dec 1, 2021

Hi there,

currently I am trying to get egret running with ipopt and have some problems due to some packages version incompatibilities I guess. First of all, I tried to use ipopt, but when trying to import it I get following message:

import ipopt
..\anaconda3\envs\phd\lib\site-packages\ipopt_init_.py:13: FutureWarning: The module has been renamed to 'cyipopt' from 'ipopt'. Please import using 'import cyipopt' and remove all uses of 'import ipopt' in your code as this will be deprecated in a future release.
warnings.warn(msg, FutureWarning)

Therefore, I don't use ipopt, but cyipopt instead. Thus, when I call acopf.solve_acopf I set the solver equals to "cyipopt". When I try to run my code then, I get the following message:

AttributeError: 'PyomoCyIpoptSolver' object has no attribute 'name'

The error is raised in solver_interface.py. I debugged into it and checked the solver. The solver doesn't seem to have a name. Calling 'solver.__ dict __' in the debug mode I get:

'solver.__ dict __'
{'config': <pyomo.common.config.ConfigDict object at 0x00000184AA5235E0>}

Do you have any clue what might be the problem here? Is egret sill supporting ipopt?

Here are my package versions:

  • pyomo: 6.2
  • ipopt 3.14.4
  • cyipopt 1.1.0

I am using the Egret main branch.

Thanks in advance. Looking forward hearing from you,

Kind regards,

Simon

@bknueven
Copy link
Collaborator

bknueven commented Dec 1, 2021

Egret is tested with Ipopt, not cyipopt, so we haven't seen this issue. I see two potential resolutions:

  1. We could wrap solver.name in a try/except block. I'm open to this change, and it's straightforward. Setting solver_name to "unknown" shouldn't be an issue for the remainder of the code, as this function just attempts to unify MIP options across Pyomo.
  2. The developers of the PyomoCyIpoptSolver could add a name attribute to their Pyomo solver. This is perhaps a better resolution, as Pyomo solvers generally have a name attribute.

@SimonRubenDrauz
Copy link
Author

Hi,

thanks for the fast reply. Actually, I also checked the config file itself and found out that it contains a name function. Therefore, I did the following:
grafik.

However, even then it is failing and I agree with you that this might be a problem in pyomo. The error is the following:
'ValueError: key 'symbolic_solver_labels' not defined for ConfigDict '' and implicit (undefined) keys are not allowed' which is raised in pyomo\common\config.py.

Thus, I will open an issue in the pyomo repo. If I have news, I get back to you.

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

No branches or pull requests

2 participants