Improve generator control and status displays
This commit is contained in:
@@ -206,6 +206,30 @@ def test_generator_spools_and_powers_pumps():
|
||||
assert state.primary_loop.mass_flow_rate > 0.0
|
||||
|
||||
|
||||
def test_generator_manual_mode_allows_single_unit_and_stop():
|
||||
reactor = Reactor.default()
|
||||
state = reactor.initial_state()
|
||||
reactor.shutdown = False
|
||||
reactor.control.manual_control = True
|
||||
reactor.control.rod_fraction = 0.95
|
||||
reactor.generator_auto = False
|
||||
reactor.primary_pump_units = [True, False]
|
||||
reactor.secondary_pump_units = [False, False]
|
||||
|
||||
reactor.step(state, dt=1.0, command=ReactorCommand(generator_units={1: True}, primary_pumps={1: True}))
|
||||
assert state.generators[0].starting or state.generators[0].running
|
||||
|
||||
for _ in range(15):
|
||||
reactor.step(state, dt=1.0)
|
||||
|
||||
assert state.generators[0].running is True
|
||||
reactor.step(state, dt=1.0, command=ReactorCommand(generator_units={1: False}))
|
||||
for _ in range(5):
|
||||
reactor.step(state, dt=1.0)
|
||||
assert state.generators[0].running is False
|
||||
assert state.generators[1].running is False
|
||||
|
||||
|
||||
def test_meltdown_triggers_shutdown():
|
||||
reactor = Reactor.default()
|
||||
state = reactor.initial_state()
|
||||
|
||||
Reference in New Issue
Block a user