Add turbine throttle mapping and back-pressure penalty

This commit is contained in:
Codex Agent
2025-11-23 20:02:03 +01:00
parent 9d4bc17971
commit d6bb0543b6
6 changed files with 38 additions and 8 deletions

View File

@@ -461,6 +461,10 @@ class Reactor:
break
turbine_state = state.turbines[idx]
if idx in active_indices:
# Simple throttle map: reduce throttle when electrical demand is low, open as demand rises.
demand = turbine_state.load_demand_mw
throttle = 0.4 if demand <= 0 else min(1.0, 0.4 + demand / max(1e-6, turbine.rated_output_mw))
turbine.throttle = throttle
turbine.step(state.secondary_loop, turbine_state, steam_power_mw=power_per_unit, dt=dt)
if power_per_unit <= 0.0 and turbine_state.electrical_output_mw < 0.1:
turbine_state.status = "OFF"