As a supplier, setting avocado prices requires a delicate trade-off — too high and you lose customers, too low and you lose profit. This project builds a full data science pipeline that answers:
"What is the optimal price and supply quantity for avocados across 8 US regions to maximize net revenue, accounting for demand elasticity, wastage, and transportation costs?"
Data: Real sales data (2015–2022) from the Hass Avocado Board — 6,804 rows across 8 US regions.
Stage 1: DESCRIPTIVE
│
├── EDA: price trends, regional demand, seasonality
└── Correlation analysis across regions & years
│
▼
Stage 2: PREDICTIVE
│
├── Regression model: Demand = f(price, region, year, seasonality)
└── R² ≈ 0.90 — captures price elasticity & regional variation
│
▼
Stage 3: PRESCRIPTIVE
│
├── Non-convex MILP in Gurobi
├── Objective: Maximize revenue - wastage cost - transport cost
└── Output: Optimal price & allocation per region
| Metric | Value |
|---|---|
| Optimal Net Revenue | $33.09M |
| Demand Model R² | ≈ 0.90 |
| Revenue Improvement | ~35% vs. historical benchmarks |
| Regions Optimized | 8 US regions |
| Data Points | 6,804 rows (2015–2022) |
Optimal Pricing by Region:
| Region | Actual Price | Optimal Price |
|---|---|---|
| West | $0.83 | $2.00 |
| SouthCentral | $0.65 | $1.92 |
| Northeast | $1.04 | $1.90 |
| Southeast | $0.82 | $1.66 |
| Great Lakes | $0.80 | $1.53 |
| Component | Detail |
|---|---|
| Predictive Model | Regression (price elasticity + seasonality + region) |
| Prescriptive Model | Non-convex MILP via Gurobi |
| Objective | Maximize revenue − wastage − transportation cost |
| Constraints | Supply limits, demand satisfaction, allocation bounds |
| Zero Wastage | Optimal solution achieves zero wastage across all regions |
📦 Price-Optimization-Predictive-Prescriptive/
├── Price_Optimization_Avocado_Gurobi.ipynb # Full pipeline: EDA + regression + MILP
├── README.md
└── LICENSE
pip install gurobipy pandas numpy scikit-learn matplotlib seabornGurobi Academic License required. Available free via Gurobi Academic Program.
Open Price_Optimization_Avocado_Gurobi.ipynb — all outputs and visualizations are pre-computed.
Price Elasticity · Demand Forecasting · Descriptive Analytics · Predictive Modelling · Prescriptive Analytics · Non-convex Optimization · MILP · Revenue Maximization · Supply Chain
Gurobi Modeling Examples — Price Optimization
Dhruv Kumar Sahu M.Tech, Industrial & Management Engineering — IIT Kanpur GATE 2024 AIR 33 | LinkedIn · GitHub