How pmduck486/shelfwise-stock-optimiser works
ShelfWise prepares Walmart M5 data, forecasts store-item demand at several quantiles, converts forecasts into replenishment decisions, and evaluates those decisions through day-by-day replay. Its dashboard presents replay results, day-level decisions, forecast exploration, and LP shadow-price what-ifs. The README documents the end-to-end stages; source excerpts confirm key replay, forecasting, and dashboard wiring. Several forecast and dashboard pages were not sampled, so their internal relationships are limited to documented capabilities.
Main entry points: engine.py Daily replay · store_model.py Newsvendor targets · App.tsx Dashboard application · prepare.py Data preparation
Components 18
Data preparation
- Data preparation
data_prep/prepare.py
Demand forecasting
- Forecast data
forecast/data.py - Feature engineering
forecast/features.py - Quantile models
forecast/model.py - Calibration and freeze
forecast/calibrate.py
Ordering and replay
- Newsvendor targets
replay/store_model.py - Store order ILP
analysis/store_ilp.py - LP shadow prices
analysis/store_ilp.py - Ordering baselines
replay/baselines.py - Daily replay
replay/engine.py - Inventory accounting
optimize/replay.py - Replay checks and KPIs
replay/kpis.py
Results dashboard
- Dashboard data export
dashboard/export_data.py - Dashboard data loading
dashboard/src/lib/data.ts - Dashboard application
dashboard/src/App.tsx - Day decision view
dashboard/src/pages/DayDetail.tsx - Shadow price view
dashboard/src/pages/Shadow.tsx
Other components
- Walmart M5 data
Connections 17
- Walmart M5 data → Data preparation: provides sales
README.md - Data preparation → Forecast data: prepares inputs
forecast/data.py - Forecast data → Feature engineering: supplies sales
forecast/features.py - Feature engineering → Quantile models: feeds features
README.md - Quantile models → Calibration and freeze: calibrates forecasts
README.md - Calibration and freeze → Newsvendor targets: informs targets
README.md - Newsvendor targets → Store order ILP: sets order targets
replay/store_model.py - Store order ILP → LP shadow prices: relaxes cartons
README.md - Newsvendor targets → Daily replay: provides decisions
README.md - Ordering baselines → Daily replay: provides alternatives
replay/engine.py - Daily replay → Inventory accounting: executes decisions
replay/engine.py - Daily replay → Replay checks and KPIs: checks ledger
replay/engine.py - Replay checks and KPIs → Dashboard data export: supplies results
README.md - Dashboard data export → Dashboard data loading: writes dashboard data
README.md - Dashboard data loading → Dashboard application: loads JSON
- Dashboard application → Day decision view: renders page
dashboard/src/App.tsx - Dashboard application → Shadow price view: renders page
dashboard/src/App.tsx