cleanup and constants

This commit is contained in:
Mikayla Fischler
2024-04-10 22:16:41 -04:00
parent a6a1a61954
commit dfc1ee6497
4 changed files with 34 additions and 15 deletions

View File

@@ -500,7 +500,7 @@ function facility.new(num_reactors, cooling_conf)
self.saturated = output ~= out_c
-- stop idling early if the output is zero, we are at or above the setpoint, and are not losing charge
_set_idling(not ((out_c == 0) and (error <= 0) and (avg_outflow < avg_inflow)))
_set_idling(not ((out_c == 0) and (error <= 0) and (avg_outflow <= 0)))
-- log.debug(util.sprintf("CHARGE[%f] { CHRG[%f] ERR[%f] INT[%f] => OUT[%f] OUT_C[%f] <= P[%f] I[%f] D[%f] }",
-- runtime, avg_charge, error, integral, output, out_c, P, I, D))