-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix/no bidirectional consumer connection #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the 3 examples and they run. I did not test if the bug was solved as I am not too deep into the optmization model and do not know what to look for. If this solves your problem, I am fine with it.
However, the different handling for different cases is now somehow hard-coded within the if-else statements. I do not understand the code that much that I could come up with an idea, but this may be worth thinking.
To make the code more readable and maintainable, it would certainly help to refactor it in a way that avoids the nested if else statements in optimization_dhs_nodes.py
Thank you for reviewing!
The reason is that it should be possible to have the option of using bidirectional pipelines, which means a bidirectional flow in solph, or not. If not, two pipelines in each direction are created. Maybe, this if else statment is not needed, because in solph a bidirecitonal flow directly sets the
Yes, thats a good idea. I refactored the |
Bug: If the setting
bidirectional_pipes=True
is selected, also the connecting line to the building was created as bidirectional.This only matters if a source or a storage is added at the consumers.
This PR fixes the issue.