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

Capacity Reserve Reliability Report

CapacityReserveReliabilityReport.java
public class CapacityReserveReliabilityReport {
    public static void main(String[] args) {
        int demand = ;
        int capacity = 100;
        int reserve = capacity - demand;
        String reserveStatus = "tight";

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

        System.out.println("demand=" + demand + " reserve=" + reserve + " status=" + reserveStatus);
    }
}
public class CapacityReserveReliabilityReport {
    public static void main(String[] args) {
        int demand = ;
        int capacity = 100;
        int reserve = capacity - demand;
        String reserveStatus = "tight";

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

        System.out.println("demand=" + demand + " reserve=" + reserve + " status=" + reserveStatus);
    }
}
public class CapacityReserveReliabilityReport {
    public static void main(String[] args) {
        int demand = ;
        int capacity = 100;
        int reserve = capacity - demand;
        String reserveStatus = "tight";

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

        System.out.println("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.