
After studying this material, a student should:
Know the scientific domains powering large-scale fulfillment systems Understand how optimization and forecasting interact in real-world logistics Be able to recognize, formulate, and reason about fulfillment problems using appropriate scientific tools
The Core Question:
How do you move hundreds of millions of packages daily β efficiently, cheaply, and on time?
Think of Amazon's network as a giant puzzle with:
| Piece | Question |
|---|---|
| Warehouses (Fulfillment Centers) | Which one ships your order? |
| Trucks | Which route? Which load? |
| Labor | How many workers are needed? |
| Promises | Can we guarantee delivery by Tuesday? |
Key Insight: No human can solve this manually at scale. This requires mathematical optimization + machine learning.
Optimization means finding the best possible decision among millions of options, subject to constraints.
Formal Definition:
Minimize (or Maximize): Objective Function
Subject to: Constraints
Concept: Optimize a linear objective with linear constraints.
Simple Example:
Minimize: 2x + 3y β cost function
Subject to:
x + y β₯ 100 β must ship 100 orders
x β€ 80 β warehouse A capacity
y β€ 60 β warehouse B capacity
x, y β₯ 0
In Fulfillment: Allocate orders across warehouses to minimize shipping cost while respecting capacity.
Concept: Like LP, but some variables must be whole numbers (integers).
Why needed?
Example:
x β {0, 1} β Is warehouse A used? Yes or No
y β integers β How many trucks dispatched?
Challenge: MIP problems are NP-hard β they get exponentially harder as scale grows. This is why decomposition methods matter.
Concept: Break one massive problem into smaller, solvable subproblems.
Analogy:
Instead of solving one impossible 10,000-piece puzzle, break it into 100 manageable 100-piece puzzles, then connect the solutions.
Common Approach β Lagrangian Relaxation:
In Fulfillment: Decompose the global network problem by region, then coordinate solutions.
Concept: Real problems have competing goals β you can't optimize everything simultaneously.
Fulfillment Tradeoffs:
COST ββββββββββββββ SPEED
Low cost = slower shipping
Fast shipping = higher cost
Pareto Frontier: The set of solutions where you cannot improve one objective without worsening another.
Speed
β
| * β Pareto optimal solutions
| *
|*
+----------β Cost (lower is better)
Practical Meaning: Leadership uses the Pareto frontier to choose which tradeoff fits business needs today.
Concept: Choosing the best combination from a discrete set of options.
Key Problem Types:
| Problem | Fulfillment Application |
|---|---|
| Assignment Problem | Which order goes to which warehouse? |
| Scheduling | When does each truck depart? |
| Network Flow | How do packages route through the network? |
Network Flow Example:
[Warehouse A] ββ5 unitsβββ [Hub 1] ββ3 unitsβββ [Customer Zone X]
[Warehouse B] ββ3 unitsβββ [Hub 1]
[Hub 1] ββ2 unitsβββ [Customer Zone Y]
Goal: Maximize flow, minimize cost, respect capacity on each edge.
You cannot optimize what you cannot predict.
Before assigning orders to warehouses, you need to know:
Concept: Predicting future values based on historical patterns over time.
Structure of a Time Series:
Demand
β
| /\ /\
| / \ / \ β Seasonal pattern
| / \ / \
| / \/ \___
+βββββββββββββββββββ Time
Mon Tue Wed Thu Fri
Components:
| Component | Description | Example |
|---|---|---|
| Trend | Long-term direction | Growing order volume year-over-year |
| Seasonality | Repeating patterns | More orders on weekends, peaks in December |
| Noise | Random variation | Unpredictable daily fluctuations |
Concept: Improve forecasts by incorporating external signals.
Examples in Fulfillment:
Base Forecast + Context = Better Forecast
Base: 10,000 orders tomorrow
+ Weather: Snowstorm predicted β +15% online orders
+ Sales event: Prime Day β +200% orders
+ Day of week: Monday β -5% orders
= Adjusted Forecast: ~22,000 orders
Why this matters: Without context, you under-staff warehouses during storms or over-staff during slow periods.
Concept: Instead of one number, produce a distribution of possible outcomes.
Point Forecast vs. Probabilistic Forecast:
Point Forecast: "Tomorrow: 10,000 orders"
Probabilistic: "Tomorrow:
10% chance: < 8,000 orders
50% chance: ~10,000 orders β median
90% chance: < 13,000 orders"
Why uncertainty matters:
Concept: Large-scale neural networks (transformers) trained on massive time-series datasets.
Advantage over classical methods:
Classical vs. GenAI Forecasting:
| Aspect | Classical (ARIMA, ETS) | GenAI Models |
|---|---|---|
| Scale | One series at a time | Millions simultaneously |
| Context | Limited | Rich (text, weather, events) |
| Uncertainty | Parametric assumptions | Learned distributions |
| Data needed | Small | Large |
Concept: Understanding why something happened, not just what happened.
Correlation vs. Causation in Fulfillment:
Observation: "Orders spike when we send emails"
Correlation: Email β More orders?
Causal Question: Would orders have spiked anyway (holiday)?
What is the TRUE effect of the email?
Spatiotemporal Causal Modeling:
Offline Policy Evaluation:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DAILY CYCLE β
β β
β 1. FORECAST β
β "We expect 2M orders tomorrow in Europe" β
β β β
β 2. UNCERTAINTY QUANTIFICATION β
β "Range: 1.8M β 2.4M with 90% confidence" β
β β β
β 3. OPTIMIZATION β
β "Given this demand, assign orders to β
β warehouses, allocate trucks, schedule labor" β
β β β
β 4. MULTI-OBJECTIVE TRADEOFF β
β "Show leadership cost vs. speed options" β
β β β
β 5. DECISION + EXECUTION β
β "Ship millions of packages" β
β β β
β 6. FEEDBACK LOOP β
β "Actual data improves next forecast" β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Step 1: WHITEBOARD
Define: What are we optimizing?
What are the constraints?
What data do we have?
Step 2: PROTOTYPE (Python)
- Build small-scale version
- Use real data samples
- Validate logic
Step 3: EXPERIMENT
- Test against production-scale data
- Measure performance vs. baseline
- Iterate on model
Step 4: COMMUNICATE
- Present Pareto frontiers to operations leaders
- Translate math into business decisions
Step 5: PRODUCTION
- Collaborate with engineers
- Deploy system serving millions of orders
| Tool | Purpose |
|---|---|
| Python | Prototyping, data analysis |
| Optimization Solvers (Gurobi, CPLEX) | Solve LP/MIP problems |
| ML Frameworks (PyTorch, TensorFlow) | Build forecasting models |
| Decomposition Algorithms | Scale optimization to real size |
| Statistical Methods | Uncertainty quantification |
QUERY-AWARE INDEX PRUNING FOR RETRIEVAL UNDER BUDGET CONSTRAINTS
(Applied to Fulfillment Optimization)
βββ OPTIMIZATION
β βββ Linear Programming (LP)
β βββ Mixed Integer Programming (MIP)
β βββ Decomposition Methods
β βββ Combinatorial Optimization
β β βββ Assignment Problems
β β βββ Scheduling
β β βββ Network Flows
β βββ Multi-Objective Optimization
β βββ Pareto Frontier Analysis
β
βββ MACHINE LEARNING / FORECASTING
βββ Time-Series Forecasting
β βββ Trend, Seasonality, Noise
β βββ Contextual Features
βββ Probabilistic Forecasting
β βββ Uncertainty Quantification
βββ Generative AI for Forecasting
βββ Causal Inference
βββ Spatiotemporal Modeling
βββ Offline Policy Evaluation
Test your understanding:
Why can't you use LP alone for truck assignment problems? (Hint: Think about integer constraints)
What is the Pareto frontier and why does leadership care about it?
What is the difference between a point forecast and a probabilistic forecast? When would you use each?
Why is causal inference important before deploying a new routing policy?
How do forecasting and optimization connect in the daily fulfillment cycle?
π‘ Core Takeaway: Large-scale fulfillment optimization is the art of making mathematically optimal decisions under uncertainty, at massive scale, in real time β combining the rigor of operations research with the adaptability of modern machine learning.