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

Capacity Reserve Reliability Report

capacity_reserve.js
const demand = 72;
const capacity = 100;
const reserve = capacity - demand;
let reserveStatus = "tight";

if (reserve >= 20) {
    reserveStatus = "stable";
} else if (reserve >= 10) {
    reserveStatus = "watch";
}

console.log(`demand=${demand} reserve=${reserve} status=${reserveStatus}`);
reserve report Fixed capacity and demand values can produce a replay-friendly reserve label before any scheduler acts on it.