-
Notifications
You must be signed in to change notification settings - Fork 134
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
Make solph work with pyomo >= 0.6 #821
Conversation
The exception can be skipped with (debug=True).
I guess, it is because we use a non-standard way for initalisation. Working on #814, I've found that Pyomo's documentation describes pretty strict RAII where the variables (including limits) are not touched after initalisation. In fact, we iterate over most variables and change them. Depending on the internal optimisation of Pyomo, this might lead to significant performance losses. PS: If this is the reason, the fix at our side would require a lot of refactoring. Still, it would not be API breaking. |
In my tests this works as fast as before. @p-snft I am not sure if there is some more potential to speed up the process, but at least it not works with the actual version of Pyomo as good as before. |
Thanks for solving the issue. Speed is fine for me, again. |
Co-authored-by: Patrik Schönfeldt <[email protected]>
At the moment the use of Pyomo >= 0.6 leads to very high computing times ( up to 100 times longer). @gnn found out, that this is caused by the root logger but only if the logging level is DEBUG. The problem is located in the Model class.
debug=True
:model = solph.Model(energysystem, debug=True)
. This can be done with a small model if the debugging mode is needed. If it was not intended to use the debug-level the level can be changed:This will cause long computing times or an exception :
If the new logger of oemof.tools is released, using the default values will fix the problem
Related issues?
Exclude pyomo version that causes a too long computing time #760
Release/v0.4.3 #766
Things to do:
In the long run we should find out the reason of the problem, because forbidding the logging level is more a workaround than a real solution of the problem. But it is good that it makes it possible to use the actual version of Pyomo.