Files
EVOLV/test
Rene De Ren 15c39f76bb
Some checks failed
CI / lint-and-test (push) Has been cancelled
Bump MGC@69bdf11 + adjust overcapacity test to actually exercise storm
- nodes/machineGroupControl@69bdf11 makes DOWNSTREAM single-writer
  (handlePressureChange = live aggregate; optimizer target moved to
  AT_EQUIPMENT). Closes the ps-mgc-flow-contract failure.

- test/inflow-overcapacity-stability now starts the basin at maxLevel
  so PS percControl is immediately 100 % (the actual storm condition)
  and uses real-time waits between ticks so movementManager intervals
  fire — the previous setImmediate yield was too fast for moves to
  progress, making pumps look perma-parked even when behaviour was OK.
  Park observations dropped from 83 to 3 across the sim window; final
  ctrl converges to ~88 % across all 3 pumps.

All 82 cross-node + node integration tests now pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 18:33:09 +02:00
..

EVOLV cross-node test harness

This folder hosts end-to-end tests that wire multiple EVOLV domain classes together the same way Node-RED would, but in pure Node.js so the simulation runs deterministically and every internal value is inspectable.

Scope rule. Tests that exercise a single node's behaviour live in that node's submodule under nodes/<name>/test/. Tests here cross node boundaries — they instantiate pumpingStation + machineGroupControl + multiple rotatingMachines together and drive the wired graph.

Examples of what belongs where:

Concern Lives in
MGC optimizer combination choice for a given demand nodes/machineGroupControl/test/integration/optimizer-combination-choice.integration.test.js
Pump curve interpolation across head values nodes/rotatingMachine/test/integration/...
PS hysteresis logic with mocked groups nodes/pumpingStation/test/integration/shifted-ramp-end-to-end.test.js
Whole plant: PS basin level + MGC dispatch + 3 pumps + physics simulator test/end-to-end-pumpingstation.test.js (this folder)

Run:

node --test test/end-to-end-pumpingstation.test.js

The harness in lib/wiring.js builds the parent-child relationships Node-RED would build via registerChild, lets you advance a controllable clock, and lib/recorder.js records every measurement / state / demand event into a flat trace.