Calculate capacity reserve and label whether the reserve is stable, watched, or tight.

Capacity Reserve Reliability Report

capacity_reserve.lua
local demand = 
local capacity = 100
local reserve = capacity - demand
local reserve_status = "tight"

if reserve >= 20 then
  reserve_status = "stable"
elseif reserve >= 10 then
  reserve_status = "watch"
end

print("demand=" .. demand .. " reserve=" .. reserve .. " status=" .. reserve_status)
local demand = 
local capacity = 100
local reserve = capacity - demand
local reserve_status = "tight"

if reserve >= 20 then
  reserve_status = "stable"
elseif reserve >= 10 then
  reserve_status = "watch"
end

print("demand=" .. demand .. " reserve=" .. reserve .. " status=" .. reserve_status)
local demand = 
local capacity = 100
local reserve = capacity - demand
local reserve_status = "tight"

if reserve >= 20 then
  reserve_status = "stable"
elseif reserve >= 10 then
  reserve_status = "watch"
end

print("demand=" .. demand .. " reserve=" .. reserve .. " status=" .. reserve_status)
reserve report Fixed capacity and demand values can produce a replay-friendly reserve label before any scheduler acts on it.