">
Monte Carlo stress test of shopper flow, lane coverage, promotion pressure, and inventory fragility using the observed supermarket CSVs as the calibration baseline.
A frame-by-frame canvas animation of this scenario, side-by-side under contrasting operating policies.
The supermarket is stable under current observed demand, but its resilience is asymmetric: most of the shopper journey is driven by shopping time, while the actual operational breakpoints come from short bursts in queueing, manager approvals, and promotion-triggered stockouts. Under stress, the system degrades first in the 18:00-20:00 window, especially if staffing is trimmed and replenishment remains fragile.
The first layer stays close to the CSVs. It separates shopper dwell time from queue time, highlights where promotions coincide with inventory pain, and surfaces which transaction patterns create the sharpest service spikes.
| Metric | Observed value | Interpretation |
|---|---|---|
| Pre-checkout time | 34.2 min avg / 59.7 min p90 | What the shopper experiences from entering the store until checkout begins. |
| Queue proxy | 1.6 min | Operational queueing is materially smaller than total dwell time. |
| Manager approvals | 9.7% of observed transactions | Low-frequency but high-disruption flow that can stall individual lanes. |
| Promo-stockout overlap | 48.1% | Evidence that demand generation and replenishment readiness are not fully synchronized. |
The model replays the full 21-day operating pattern with stochastic arrivals, empirical shopping-time samples, bootstrap service times, lane scheduling by hour, promotion amplification, and stockout-induced basket erosion. Three levers are stressed in a full-factorial design.
| Best-performing scenarios | Avg pre-checkout [min] | Abandon [%] | Revenue | Lost sales |
|---|---|---|---|---|
| Current Coverage / Surge Event / Resilient Replenishment | 35.1 | 2.3 | $168743 | $6444 |
| Current Coverage / Surge Event / Current Replenishment | 35.2 | 2.4 | $167392 | $7337 |
| Lean Ops / Surge Event / Resilient Replenishment | 35.1 | 2.4 | $167774 | $6792 |
| Lean Ops / Surge Event / Current Replenishment | 35.2 | 2.4 | $167710 | $7286 |
| Current Coverage / Surge Event / Fragile Replenishment | 35.4 | 2.4 | $164458 | $7986 |
| Peak Flex / Surge Event / Current Replenishment | 35.3 | 2.4 | $167226 | $7276 |
| Highest-risk scenarios | Avg pre-checkout [min] | Abandon [%] | Queue p90 [min] | Lost sales |
|---|---|---|---|---|
| Current Coverage / Observed Demand / Fragile Replenishment | 32.8 | 3.4 | 0.0 | $5099 |
| Peak Flex / Observed Demand / Resilient Replenishment | 32.5 | 3.3 | 0.0 | $4578 |
| Peak Flex / Observed Demand / Current Replenishment | 32.5 | 3.3 | 0.0 | $4882 |
| Lean Ops / Observed Demand / Resilient Replenishment | 32.6 | 3.3 | 0.0 | $4560 |
| Current Coverage / Observed Demand / Current Replenishment | 32.7 | 3.3 | 0.0 | $4872 |
Under current demand, front-end capacity is usually adequate. Under stress, the dominant system breaks are more targeted than a generic labor shortage.
The actions below follow the evidence chain from the observed data and the stress model: stop value leakage first, then protect the evening peak, then remove avoidable service variability.
| Action | What to change | Expected effect |
|---|---|---|
| Promotion gating with inventory guardrails | Do not release high-intensity promotions unless the promoted department has minimum on-hand cover or same-day replenishment certainty. | Attacks the observed 48.1% promo-stockout overlap directly. |
| Peak-flex lanes, not blanket overstaffing | Open one extra traditional lane plus full self-checkout availability in the true stress windows: 12:00-13:00 and 18:00-20:00. | Under surge conditions this improves average pre-checkout time from 35.5 min to 35.0 min in the resilient case. |
| Reduce supervisor friction | Move approvals to mobile overrides or pre-clear high-frequency exception classes outside the evening peak. | A small number of approval-dependent baskets creates lane-level instability disproportionate to its share of traffic. |
| Increase quick-trip self-checkout capture | Use signage and basket-size nudges to route low-item shoppers earlier in the journey. | The baseline self-checkout share is only 21.7%, leaving headroom to unload staffed lanes without changing basket economics. |
The most robust scenario in this run set is Current Coverage / Surge Event / Resilient Replenishment, which holds abandonment to 2.3% while preserving $168743 in period revenue.
| KPI | Definition |
|---|---|
| Pre-checkout time | Store entry to checkout service start. Includes shopping time and queue wait. |
| Queue wait | Time between joining the front-end queue and starting checkout service. |
| Service level | Share of completed shoppers whose queue wait stays at or below 5 minutes. |
| Lost sales - abandonment | Revenue lost when a shopper leaves before checkout service begins. |
| Lost sales - stockout | Basket value removed because unavailable inventory blocks intended purchases. |
| Utilization | Busy lane minutes divided by scheduled lane-available minutes for each checkout type. |
The report is grounded in the five CSV files under 08_supermarket_test/data. No external market data was injected; scenario stressors are controlled Monte Carlo perturbations applied on top of the observed operating pattern.
| Source | Role in model |
|---|---|
| customer_purchases_sample.csv | Shopper entry times, purchase mix, basket values, and abandonment history. |
| checkouts_by_hour.csv | Hourly lane availability, queue proxies, throughput, and sales. |
| employees_shift.csv | Context for front-end staffing tapering and operational structure. |
| promotions.csv | Promotion timing, department targeting, and traffic-lift assumptions. |
| inventory_events.csv | Stockout timing, duration, department hotspots, and root causes. |