Supply Chain Analytics Project | Python · pandas · matplotlib
Part of a logistics optimization portfolio by Emmanuel Beristain Guzmán
This tool models optimal inventory replenishment using two foundational supply chain formulas:
- EOQ (Economic Order Quantity) — finds the order size that minimizes total inventory costs
- ROP (Reorder Point) — determines when to trigger a new purchase order
Built to demonstrate applied knowledge of inventory management principles relevant to SAP MM, supply chain consulting, and logistics analytics roles.
| Concept | Formula | Description |
|---|---|---|
| EOQ | √(2DS / H) |
Optimal units per order |
| ROP | d × L + SS |
Inventory level that triggers a new order |
| Safety Stock | Z × σ × √L |
Buffer against demand variability |
| Total Cost | (D/Q)S + (Q/2)H |
Annual ordering + holding cost |
Variables:
D = Annual demand · S = Ordering cost · H = Holding cost/unit/year
d = Daily demand · L = Lead time (days) · Z = Service level z-score · σ = Demand std dev
- ✅ EOQ calculation with cost optimization
- ✅ ROP with configurable safety stock and service level
- ✅ Day-by-day inventory simulation (365 days)
- ✅ Visual charts: inventory level + cost curves
- ✅ CSV exports for further analysis (Excel / SAP-ready format)
- ✅ Console summary report with all KPIs
════════════════════════════════════════════════════
INVENTORY SIMULATOR — EOQ / ROP REPORT
════════════════════════════════════════════════════
Product : Industrial Filter A-200
────────────────────────────────────────────────────
INPUT PARAMETERS
────────────────────────────────────────────────────
Annual demand : 4,800 units/year
Daily demand : 13.2 units/day
Ordering cost : $150.00 per order
Holding cost : $12.00 per unit/year
Lead time : 7 days
Service level : 95%
────────────────────────────────────────────────────
RESULTS
────────────────────────────────────────────────────
EOQ : 346 units per order
Safety stock : 19 units
ROP : 111 units (reorder point)
Orders/year : 13.9 times
Cycle time : 26.3 days between orders
Annual cost : $4,156.92
════════════════════════════════════════════════════
inventory-simulator/
│
├── inventory_simulator.py # Main script — all logic here
├── requirements.txt # Python dependencies
├── README.md
│
└── data/ # Auto-generated on first run
├── inventory_level.png # Chart: stock over 365 days
├── cost_curves.png # Chart: EOQ cost optimization
├── simulation_results.csv
└── kpi_summary.csv
git clone https://github.com/net421/inventory-simulator.git
cd inventory-simulatorpip install -r requirements.txtpython inventory_simulator.pyOpen inventory_simulator.py and edit the params block at the bottom:
params = {
"product_name": "Your Product Name",
"annual_demand": 4800, # units per year
"ordering_cost": 150.0, # $ per order placed
"holding_cost": 12.0, # $ per unit per year
"lead_time_days": 7, # supplier lead time
"service_level": 0.95, # 95% → z-score 1.65
"std_daily_demand": 3.5, # demand variability (std dev)
}This model directly maps to SAP MM functionality:
| This script | SAP MM equivalent |
|---|---|
| EOQ calculation | MRP lot size optimization (EOQM) |
| ROP trigger | Reorder point planning (MRP Type = VB) |
| Safety stock | Safety stock field in material master (MR21) |
| Lead time | Planned delivery time in purchasing info record |
| Annual cost | Inventory valuation & cost center reporting |
Understanding this logic is foundational for configuring MRP parameters in SAP and for supply chain consulting engagements.
Inventory Level (365 days)
Shows stock depletion, ROP trigger points, and order replenishment cycles.
EOQ Cost Curves
Visualizes the trade-off between ordering frequency and holding cost — the intersection is EOQ.
| Tool | Use |
|---|---|
| Python 3.10+ | Core logic |
| pandas | Simulation data + CSV export |
| matplotlib | Charts |
| numpy | Cost curve calculations |
- Inventory management modeling (EOQ, ROP, Safety Stock)
- Data simulation and time-series generation
- Data visualization for operational KPIs
- Python scripting for logistics automation
- Analytical thinking applied to supply chain optimization
Emmanuel Beristain Guzmán
Logistics Engineer | Supply Chain Analytics | SAP Functional Trainee
📍 México (Remote) · 📧 emmanuel.beristain.guzman@gmail.com
🔗 github.com/net421
Part of a series of supply chain analytics projects. See also: demand forecasting, VRP route optimization, and logistics dashboard.

