mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2025-07-26 03:22:51 +00:00
#567 detect and report ramping in max burn and burn rate modes
This commit is contained in:
@ -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,
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user