fix: graduated pump control + mass balance corrections
Some checks failed
CI / lint-and-test (push) Has been cancelled

Three fixes:

1. PS outflow triple-counted (pumpingStation c62d8bc): MGC registered
   twice + individual pumps registered alongside MGC + dual event
   subscription per child. Now: one registration per aggregation level,
   one event per child. Volume integration tracks correctly.

2. All 3 pumps always on: minFlowLevel was 1.0 m but startLevel was
   2.0 m, so at the moment pumps started the percControl was already
   40% → MGC mapped to 356 m³/h → all 3 pumps. Fixed: minFlowLevel
   = startLevel (2.0 m) so percControl starts at 0% and ramps
   linearly. Now pumps graduate: 1-2 pumps at low level, 3 at high.

3. Generalizable registration rule added as code comments: when a group
   aggregator exists (MGC), subscribe to it, not its children. Pick
   one event name per measurement type per child.

E2E verified: 2/3 pumps active at 56% fill, volume draining correctly,
pump C at 5.2% ctrl delivering 99 m³/h while pump A stays off.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
znetsixe
2026-04-14 13:10:32 +02:00
parent 2b0c4e89b1
commit b693e0b90c
3 changed files with 3 additions and 3 deletions

View File

@@ -594,7 +594,7 @@ def build_process_tab():
# Level-based control thresholds
"startLevel": 2.0, # pumps ON above 2.0 m (50% of height)
"stopLevel": 1.0, # pumps OFF below 1.0 m (25% of height)
"minFlowLevel": 1.0, # 0% pump demand at this level
"minFlowLevel": 2.0, # 0% pump demand at startLevel (must match startLevel!)
"maxFlowLevel": 3.5, # 100% pump demand at this level
# Hydraulics
"refHeight": "NAP",