Let auto rod control clear shutdown and adjust rods
This commit is contained in:
@@ -171,6 +171,8 @@ class Reactor:
|
||||
if command:
|
||||
overrides = self._apply_command(command, state)
|
||||
rod_fraction = overrides.get("rod_fraction", rod_fraction)
|
||||
if not self.shutdown and not self.control.manual_control:
|
||||
rod_fraction = self.control.update_rods(state.core, dt)
|
||||
|
||||
decay_power, decay_neutron_source, decay_products, decay_particles = self.fuel.decay_reaction_effects(
|
||||
state.core
|
||||
@@ -476,6 +478,8 @@ class Reactor:
|
||||
self.control.set_power_setpoint(command.power_setpoint)
|
||||
if command.rod_manual is not None:
|
||||
self.control.set_manual_mode(command.rod_manual)
|
||||
if command.rod_manual is False and not self.meltdown:
|
||||
self.shutdown = False
|
||||
if command.rod_position is not None:
|
||||
self.control.set_manual_mode(True)
|
||||
overrides["rod_fraction"] = self.control.set_rods(command.rod_position)
|
||||
@@ -505,6 +509,10 @@ class Reactor:
|
||||
overrides["coolant_demand"] = max(0.0, min(1.0, command.coolant_demand))
|
||||
for component in command.maintenance_components:
|
||||
self._toggle_maintenance(component)
|
||||
if not self.meltdown and not command.scram:
|
||||
rod_target = overrides.get("rod_fraction", self.control.rod_fraction)
|
||||
if rod_target < 0.95:
|
||||
self.shutdown = False
|
||||
return overrides
|
||||
|
||||
def _set_primary_pump(self, active: bool) -> None:
|
||||
|
||||
Reference in New Issue
Block a user