Defense Resource Stockpiling
Two-Stage Stochastic Program · Newsvendor
How many EMP grenades to stockpile for an invasion of uncertain intensity? Order too few and emergency resupply costs are devastating. Order too many and unused munitions are wasted. The newsvendor model gives an exact closed-form solution via the critical ratio.
The Scenario
Uncertain Demand
Before the invasion timeline is known, you must decide how many EMP grenades to stockpile. If demand exceeds your stockpile, emergency procurement costs q⁺ = 25 per unit (5× normal). If demand is lower, surplus units are wasted at q⁻ = 5 per unit (disposal cost). Base procurement costs c = 10 per unit. Demand follows a Normal distribution with known mean and standard deviation. The newsvendor model gives the exact optimal stockpile via the critical ratio.
| Defense Domain | OR Element | Symbol | Example |
|---|---|---|---|
| EMP grenades ordered | First-stage decision | x | 119 units |
| Invasion intensity | Random demand | ξ ~ N(μ,σ) | N(100, 20) |
| Emergency resupply | Shortage penalty | q⁺ | 25 per unit |
| Wasted stockpile | Surplus penalty | q⁻ | 5 per unit |
| Base procurement | Unit cost | c | 10 per unit |
| Optimal stockpile | Newsvendor solution | x* = F⁻¹(CR) | 119.3 |
Two-Stage Stochastic Program:
MINIMIZE c·x + Eξ[Q(x,ξ)]
where Q(x,ξ) = miny { q⁺·y⁺ + q⁻·y⁻ }
s.t. y⁺ - y⁻ = ξ - x // recourse: shortage or surplus
y⁺, y⁻ ≥ 0
Newsvendor Optimal Solution:
x* = F⁻¹( q⁺ / (q⁺ + q⁻) ) // inverse CDF at critical ratio
Critical Ratio: CR = q⁺ / (q⁺ + q⁻)
// “stock more when shortage is expensive relative to surplus”
// CR → 1: stockpile heavily (shortage devastating)
// CR → 0: stockpile minimally (surplus expensive)
For ξ ~ Normal(μ,σ):
x* = μ + σ · Φ⁻¹(CR)
// Φ⁻¹ = standard normal inverse CDF (probit function)
Interactive Solver
Newsvendor Calculator
★★★ Exact (closed-form)Newsvendor with Normal Demand
References
Published Birge, J.R. & Louveaux, F.V. (2011). Introduction to Stochastic Programming, 2nd ed. Springer. — Standard reference for two-stage stochastic programs and newsvendor.
Published Shapiro, A., Dentcheva, D., & Ruszczyński, A. (2014). Lectures on Stochastic Programming, 2nd ed. SIAM. — Rigorous treatment of recourse models and risk measures.
Preparing for First Contact
We do recommend the Hungarian algorithm. It works on any planet.
Educational Fiction Disclaimer
This is a fictional educational scenario.
- All data is entirely fictional
- No military applications intended
- The author advocates for peace