Improve reactor controls, reactions, and maintenance UI
This commit is contained in:
@@ -27,7 +27,8 @@ class ControlSystem:
|
||||
if self.manual_control:
|
||||
return self.rod_fraction
|
||||
error = (state.power_output_mw - self.setpoint_mw) / self.setpoint_mw
|
||||
adjustment = -error * 0.3
|
||||
# When power is low (negative error) withdraw rods; when high, insert them.
|
||||
adjustment = error * 0.2
|
||||
adjustment = clamp(adjustment, -constants.CONTROL_ROD_SPEED * dt, constants.CONTROL_ROD_SPEED * dt)
|
||||
previous = self.rod_fraction
|
||||
self.rod_fraction = clamp(self.rod_fraction + adjustment, 0.0, 0.95)
|
||||
|
||||
Reference in New Issue
Block a user