-
Couldn't load subscription status.
- Fork 20
More updates for n:m support - battery pool's power formula #730
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
Conversation
b4ae13c to
f7d4078
Compare
0e714d9 to
751463d
Compare
| component_graph.predecessors(bat_id), | ||
| ) | ||
| ) | ||
| for bat_id in component_ids |
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.
in a setup with 1 inverter and 2 batteries, there will be 2 frozensets with the same inverter. that would lead to 2x power reporting, no?
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.
Good catch. Added a test to catch this and fixed it, too
| for idx, comp in enumerate( | ||
| inverter for inverters in battery_inverters for inverter in inverters | ||
| ): |
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.
maybe the inverter ids can be collected into a set before enumerating, to deduplicate?
| for idx, comp in enumerate( | |
| inverter for inverters in battery_inverters for inverter in inverters | |
| ): | |
| for idx, comp in enumerate( | |
| set(inverter for inverters in battery_inverters for inverter in inverters) | |
| ): |
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 made battery_inverters directly to a frozenset instead
…rters Signed-off-by: Mathias L. Baumann <[email protected]>
| component_graph = connection_manager.get().component_graph | ||
|
|
||
| battery_inverters = list( | ||
| battery_inverters = frozenset( |
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.
was this supposed to go into a different commit?
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.
fixed >:|
Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
This specifically focuses on the power forumla for the battery pool.
refs #501