- Archived 20 pre-refactor pages to wiki/Archive/ with standard banners:
- All 6 architecture/ pages (old _loadConfig/_setupSpecificClass internals,
pre-refactor S88 hierarchy, deployment blueprint)
- All 3 sessions/ logs (Apr-07 + Apr-13 session summaries)
- findings/open-issues-2026-03.md (issues 1-5 all resolved by refactor)
- concepts/generalfunctions-api.md (missing BaseDomain/BaseNodeAdapter)
- concepts/sources-readme.md (empty PDF placeholder, never populated)
- manuals/nodes/rotatingMachine.md + measurement.md (superseded by per-repo wikis)
- Top-level SCHEMA.md, index.md, log.md, metrics.md, overview.md,
knowledge-graph.yaml (all Apr-07 snapshot, pre-refactor)
- Kept wiki/concepts/ domain pages (ASM, PID, pump-affinity, settling, etc.)
- Kept wiki/findings/ proven results (BEP, NCog, curve-non-convexity, stability)
- Kept wiki/manuals/node-red/* (FlowFuse + Node-RED runtime docs, still current)
- Kept wiki/tools/* (utility scripts)
- Updated wiki/Archive.md index with 20 rows
- Fixed wiki/Home.md: Tier 6 was wrongly marked done; corrected to pending;
Tier 9 updated to reflect 2026-05-11 in-progress wave
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.5 KiB
title, created, updated, status, tags
| title | created | updated | status | tags | ||||
|---|---|---|---|---|---|---|---|---|
| Session: Production Hardening rotatingMachine + machineGroupControl | 2026-04-07 | 2026-04-07 | proven |
|
⚠️ ARCHIVED — pre-refactor (Tier 1–4, 2026-05)
This page describes the architecture before the platform refactor. The current page is the per-node wiki on gitea.wbd-rd.nl/RnD or Home.
Kept for historical reference only. Do not update.
2026-04-07 — Production Hardening
Scope
Full code review and hardening of rotatingMachine and machineGroupControl nodes for production readiness.
Key Discoveries
-
Efficiency rounding destroyed NCog/BEP —
Math.round(Q/P * 100) / 100in canonical units (m3/s and W) produces ratios ~1e-6 that all round to 0. All NCog, cog, and BEP calculations were non-functional. Fixed by removing rounding. -
flowmovement unit mismatch — machineGroupControl computed flow in canonical (m3/s) and sent it directly to rotatingMachine which expected output units (m3/h). Every pump stayed at minimum flow. Fixed with
_canonicalToOutputFlow(). -
emergencyStop case mismatch —
"emergencyStop"vs config key"emergencystop". Emergency stop never worked. Fixed to lowercase. -
Curve data anomalies — 3 flow values leaked into power columns in hidrostal-H05K-S03R.json at pressures 1600, 3200, 3300 mbar. Fixed with interpolated values.
-
C5 pump non-convexity — 5 data points per pressure level produces non-convex spline. The marginal-cost refinement loop closes the gap to brute-force optimum from 2.1% to 0.1%.
Changes Made
rotatingMachine (3 files, 7 test files)
- Async input handler, null guards, listener cleanup, tick loop race fix
- showCoG() implementation, efficiency variant fix, curve anomaly detection
- 43 new tests (76 total)
machineGroupControl (1 file, 2 test files)
_canonicalToOutputFlow()on all flowmovement calls- Absolute scaling bug, empty Qd block, empty-machines guards
- Marginal-cost refinement loop in BEP-Gravitation
- Missing flowmovement after startup in equalFlowControl
generalFunctions (1 file)
- 3 curve data fixes in hidrostal-H05K-S03R.json
Verification
- 90 tests passing across both nodes
- machineGroupControl within 0.1% of brute-force global optimum (1000-step search)
- Pump switching stable: 1-2 transitions across full demand range, no hysteresis
- Optimization cost: 0.03-0.15ms per call (0.015% of tick budget)