Skip to content

Prioritätensteuerung: Gruppe gleichmäßig, einzeln bis max Strom hochregeln - #4032

Merged
LKuemmel merged 6 commits into
openWB:masterfrom
LKuemmel:loadmanagement_prio_list
Oct 1, 2026
Merged

LKuemmel merged 6 commits into
openWB:masterfrom
LKuemmel:loadmanagement_prio_list

Conversation

@LKuemmel

@LKuemmel LKuemmel commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Lastmanagement:

  • 10 kW EVU-Leistung: EV 1
  • 13 kW EVU-Leistung: EV 1, Verbraucher 4
  • 16 kW EVU-Leistung: EV 1, EV 2
  • 24 kW EVU-Leistung: EV 1, EV 2 und EV 3
  • 33 kW EVU-Leistung: EV 1, EV 2 und EV 3
  • 38 kW EVU-Leistung: EV 1, EV 2 und EV 3, Verbraucher 4

Bidi:

  • 10 kW Bezug: EV 1
  • 16 kW Bezug: EV 1, EV 2 und EV 3

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical budget-reset and stale-consumer handling issues remain unresolved.

Review effort: Lite
Findings: 3 High severity · 1 Low severity

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)
Comment thread packages/control/algorithm/algorithm.py Outdated
Comment thread packages/control/algorithm/filter_chargepoints.py Outdated
Comment thread packages/control/algorithm/filter_chargepoints.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity

Open (2)
Resolved since last review (2)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The central bidirectional priority-group behavior lacks regression coverage.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
Resolved since last review (1)

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)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical grouped-allocation and duplicate-processing defects, plus incorrect consumer minimum-current handling, remain unresolved.

Review effort: Lite
Findings: 3 High severity · 1 Low severity

Open (4)

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":
@LKuemmel
LKuemmel marked this pull request as ready for review September 30, 2026 10:43
@LKuemmel
LKuemmel merged commit 95cad0f into openWB:master Oct 1, 2026
1 check passed
@LKuemmel
LKuemmel deleted the loadmanagement_prio_list branch October 1, 2026 09:30
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

Successfully merging this pull request may close these issues.

Berücksichtigung der Einschaltschwelle bei der Prioritätentsteuerung

2 participants