Repository navigation
Prioritätensteuerung: Gruppe gleichmäßig, einzeln bis max Strom hochregeln - #4032
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical budget-reset and stale-consumer handling issues remain unresolved.
Review effort: Lite
Findings: 3
Open (4)
What changed in this PR
Refactors charging control to process priority groups, distributing grouped loads evenly while allowing individual loads to reach their maximum current.
Changes:
- Adds grouped-load filtering and processing.
- Updates charging stages for priority groups.
- Adjusts unit and integration tests.
| File | Summary |
|---|---|
packages/control/algorithm/surplus_controlled.py |
Applies surplus control per group. |
packages/control/algorithm/surplus_controlled_test.py |
Updates grouped-load tests. |
packages/control/algorithm/min_current.py |
Applies minimum current per group. |
packages/control/algorithm/integration_test/instant_charging_test.py |
Updates priority-control expectations. |
packages/control/algorithm/filter_chargepoints.py |
Adds grouped filtering; stale consumers can abort processing, and the return annotation is outdated. |
packages/control/algorithm/filter_chargepoints_test.py |
Adds grouped filtering tests. |
packages/control/algorithm/common.py |
Updates grouped-load reset helpers. |
packages/control/algorithm/bidi_charging.py |
Applies bidirectional charging per group. |
packages/control/algorithm/algorithm.py |
Processes priority groups, but resets surplus and null-point budgets between groups. |
packages/control/algorithm/additional_current.py |
Applies additional current per group. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+44
to
+47
| counter.limit_raw_power_left_to_surplus(self.evu_counter.calc_raw_surplus()) | ||
| if self.evu_counter.data.set.surplus_power_left > 0: | ||
| common.reset_current_to_target_current(grouped_loads) | ||
| self.surplus_controlled.set_surplus_current(grouped_loads) |
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Bidirectional zero-point capacity is reset for every priority group, allowing multiple groups to consume the same adjustment budget.
Review effort: Balanced
Findings: 2
Open (2)
Resolved since last review (2)
Comment on lines
+37
to
+38
| for grouped_loads in group_loads_generator(): | ||
| preferenced_cps = filter_loads_by_chargemodes(grouped_loads, CONSIDERED_CHARGE_MODES_BIDI_DISCHARGE) |
| cp: Chargepoint = preferenced_cps[0] | ||
|
|
||
| counts = self.get_counts(cp) | ||
| counts = self.get_counts(cp) |
Comment on lines
+73
to
+77
| for item in data.data.counter_all_data.data.get.loadmanagement_prios: | ||
| if item["type"] == "group": | ||
| sub_valid_chargemode: List[Load] = [] | ||
| for group_item in item["children"]: | ||
| if group_item["type"] == "vehicle": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Prioritätensteuerung: EV 1, (Gruppe: EV2 und EV3), Verbraucher 4
dreiphasig 11kW, Verbraucher min 6A
Lastmanagement:
Bidi: