#567 detect and report ramping in max burn and burn rate modes

This commit is contained in:
Mikayla
2024-11-07 15:01:19 +00:00
parent 91cb51bad9
commit 7fb88becb8
2 changed files with 21 additions and 4 deletions

View File

@ -91,8 +91,8 @@ function facility.new(config)
charge_conversion = 1.0,
time_start = 0.0,
initial_ramp = true,
waiting_on_ramp = false,
waiting_on_stable = false,
waiting_on_ramp = false, -- waiting on auto ramping
waiting_on_stable = false, -- waiting on gen rate stabilization
accumulator = 0.0,
saturated = false,
last_update = 0,

View File

@ -341,9 +341,17 @@ function update.auto_control(ExtChargeIdling)
if state_changed then
self.time_start = now
self.saturated = true
self.waiting_on_ramp = true
self.status_text = { "MONITORED MODE", "running reactors at limit" }
self.status_text = { "MONITORED MODE", "ramping reactors to limit" }
log.info("FAC: MAX_BURN process mode started")
elseif self.waiting_on_ramp then
if all_units_ramped() then
self.waiting_on_ramp = false
self.status_text = { "MONITORED MODE", "running reactors at limit" }
log.info("FAC: MAX_BURN process mode initial ramp completed")
end
end
allocate_burn_rate(self.max_burn_combined, true)
@ -351,8 +359,17 @@ function update.auto_control(ExtChargeIdling)
-- a total aggregate burn rate
if state_changed then
self.time_start = now
self.status_text = { "BURN RATE MODE", "running" }
self.waiting_on_ramp = true
self.status_text = { "BURN RATE MODE", "ramping to target" }
log.info("FAC: BURN_RATE process mode started")
elseif self.waiting_on_ramp then
if all_units_ramped() then
self.waiting_on_ramp = false
self.status_text = { "BURN RATE MODE", "running" }
log.info("FAC: BURN_RATE process mode initial ramp completed")
end
end
local unallocated = allocate_burn_rate(self.burn_target, true)