Compare commits
1 Commits
c62d8bc275
...
e8dd657b4f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8dd657b4f |
@@ -264,15 +264,26 @@ class PumpingStation {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (level > startLevel && direction === 'filling') {
|
// Continuous proportional control: command pumps whenever level is
|
||||||
const percControl = this._scaleLevelToFlowPercent(level);
|
// above stopLevel. The percControl ramp gives:
|
||||||
this.logger.debug(`Controllevel based => Level ${level} control applying to pump : ${percControl}`);
|
// - 0% at minFlowLevel (= startLevel) → pumps barely running
|
||||||
await this._applyMachineLevelControl(percControl);
|
// - linearly up to 100% at maxFlowLevel → all pumps full
|
||||||
// Also forward to machine groups (e.g. MGC) — the level-based
|
// - Below startLevel but above stopLevel: percControl < 0 → clamp
|
||||||
// control originally only addressed direct-child machines, but in
|
// to 0 → MGC turns off pumps (graceful ramp-down instead of a
|
||||||
// a hierarchical topology (PS → MGC → pumps) the machines sit
|
// dead zone where pumps keep running at their last setpoint).
|
||||||
// under MGC and PS.machines is empty.
|
if (level > stopLevel) {
|
||||||
await this._applyMachineGroupLevelControl(percControl);
|
const rawPercControl = this._scaleLevelToFlowPercent(level);
|
||||||
|
const percControl = Math.max(0, rawPercControl);
|
||||||
|
this.logger.debug(`Controllevel based => Level ${level} percControl ${percControl}`);
|
||||||
|
if (percControl > 0) {
|
||||||
|
await this._applyMachineLevelControl(percControl);
|
||||||
|
await this._applyMachineGroupLevelControl(percControl);
|
||||||
|
} else {
|
||||||
|
// Between stopLevel and startLevel with percControl ≤ 0:
|
||||||
|
// tell MGC to scale back to 0 rather than leaving pumps
|
||||||
|
// running at the last commanded setpoint.
|
||||||
|
await this._applyMachineGroupLevelControl(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (level < stopLevel && direction === 'draining') {
|
if (level < stopLevel && direction === 'draining') {
|
||||||
|
|||||||
Reference in New Issue
Block a user