🚧 Add environment maneuverability
This commit is contained in:
@@ -39,7 +39,7 @@ LEVEL_HIGH = 2.7 # m — high-level switch threshold
|
||||
class PumpStationEnv(PlantEnv):
|
||||
"""Closed-loop tank + pump physics over the pump_node layout."""
|
||||
|
||||
TICK_MS = 9.0 # overrides PlantEnv TICK_MS
|
||||
TICK_MS = 10.0 # overrides PlantEnv TICK_MS
|
||||
|
||||
def __init__(self, *args, stop_after_ms: float | None = None, **kw):
|
||||
super().__init__(*args, **kw)
|
||||
@@ -49,7 +49,7 @@ class PumpStationEnv(PlantEnv):
|
||||
def model(self, state: PlantState, dt_s: float) -> dict[str, object]:
|
||||
dt_h = dt_s / 3600.0
|
||||
# what the PLC currently commands (master side: DO/AO)
|
||||
pump_running = bool(state.by_code("DO0.0"))
|
||||
pump_running = bool(state.by_code("DI0.0"))
|
||||
|
||||
# speed setpoint from AO0.0, normalized over its display range
|
||||
ao_lo, ao_hi = state.channel_range("AO0.0")
|
||||
|
||||
Reference in New Issue
Block a user