Each simulated day, demand D = 100 units must be covered by six suppliers split across three regions. Diversification d ∈ [0,1] blends a concentrated allocation (all weight on one primary supplier) with an even split across all six:
weight_i(d) = (1-d)·[i = primary] + d·(1/6)
supplied = D · Σ weight_i over suppliers currently NOT disrupted
shortfall = D - supplied
Two independent hazard processes remove suppliers from the network — matching real procurement risk: an idiosyncratic per-supplier failure (quality issue, insolvency) and a correlated regional disaster that knocks out every supplier in one region at once:
P(supplier fails) = p_base · risk_climate (per day, independent)
P(region disaster) = p_region · risk_climate (per day, hits both suppliers in a region)
outage duration = 3–10 simulated days
Contingency layers absorb the shortfall in order: safety-stock buffer first, then — if emergency sourcing is enabled — a spot-market purchase covering 60% of what remains, at 3× unit cost. Whatever is still missing is a real stockout and drags the rolling service level down:
shortfall -= min(shortfall, buffer); buffer -= that amount
if reactive: shortfall -= 0.6 · shortfall (spot-market, 3× cost)
served = D - shortfall
service level = EMA(served / D, α = 0.1)
cost/unit(d) = base · (1 + 0.4·d) // diversification loses bulk discount
- Diversification — spreads exposure across suppliers/regions but raises the per-unit purchase cost (smaller contracts, less leverage).
- Buffer target — days of average demand held in reserve; it is topped up automatically whenever supply exceeds demand, at a small daily holding cost.
- Risk climate — scales both hazard probabilities, simulating a calmer or more volatile world (geopolitics, weather, financial stress).
- Emergency sourcing — a reactive contingency plan: expensive, only partially effective, but keeps some shortfall from becoming a real stockout.
The moving spheres are shipment flow, colour-coded by region and routed with probability proportional to each supplier's current allocation weight — a disrupted supplier stops receiving traffic immediately.