Operational Reliability Reports
Capacity Margin Report
Classify Reserve
Capacity reports are easier to inspect when the margin and label are printed together. This program classifies a fixed capacity against selected demand.
Program
Play the program to choose demand and watch the reserve move from stable to watch to tight.
capacity_margin_report.rs
fn main() {
let demand = ;
let capacity = 100;
let reserve = capacity - demand;
let status = if reserve >= 25 {
"stable"
} else if reserve >= 10 {
"watch"
} else {
"tight"
};
let line = format!("{demand} {reserve} {status}");
println!("{line}");
}
fn main() {
let demand = ;
let capacity = 100;
let reserve = capacity - demand;
let status = if reserve >= 25 {
"stable"
} else if reserve >= 10 {
"watch"
} else {
"tight"
};
let line = format!("{demand} {reserve} {status}");
println!("{line}");
}
fn main() {
let demand = ;
let capacity = 100;
let reserve = capacity - demand;
let status = if reserve >= 25 {
"stable"
} else if reserve >= 10 {
"watch"
} else {
"tight"
};
let line = format!("{demand} {reserve} {status}");
println!("{line}");
}
reserve
`reserve` is derived from capacity minus current demand.
classification
The branch labels the margin as stable, watch, or tight.
deterministic inputs
Capacity is a fixed fixture and demand is the only selector.