Zero base aux when plant is idle and unpowered

This commit is contained in:
Codex Agent
2025-11-22 23:52:24 +01:00
parent faf603d2c5
commit 98ff4227a1

View File

@@ -205,10 +205,14 @@ class Reactor:
any_units = any(primary_units_active) or any(secondary_units_active) or any(self.turbine_unit_active)
load_present = any_units or (self.consumer and self.consumer.online)
idle_core = state.core.power_output_mw < 1.0 and self.control.rod_fraction >= 0.9
if (self.shutdown and not load_present and idle_core):
aux_base = 0.0
else:
aux_base = constants.BASE_AUX_LOAD_MW
baseline_off = (
(self.shutdown or idle_core)
and not load_present
and state.total_electrical_output() <= 0.01
and sum(primary_units_active) == 0
and sum(secondary_units_active) == 0
)
aux_base = 0.0 if baseline_off else constants.BASE_AUX_LOAD_MW
aux_pump_primary = constants.PUMP_POWER_MW * sum(primary_units_active)
aux_pump_secondary = constants.PUMP_POWER_MW * sum(secondary_units_active)
aux_demand = aux_base + aux_pump_primary + aux_pump_secondary