Family 7 · OR Problem Family
Inventory & Lot Sizing
Problems of determining the timing and quantity of replenishment decisions over a planning horizon, balancing holding costs, setup costs, and ordering costs under deterministic or stochastic demand.
Economic Order Quantity
A retailer faces constant demand rate D and must decide the order quantity Q to minimize total annual cost, which comprises ordering cost (fixed cost K per order) and holding cost (h per unit per year). The classic EOQ formula Q* = √(2DK/h) yields the optimal trade-off. Extensions handle planned backorders (adjusting the formula by a factor (h+b)/b) and all-units quantity discounts (evaluating the EOQ at each price tier).
Q* = √(2DK / h)
TC* = √(2DKh)
With Planned Backorders Q* = √(2DK/h · (h+b)/b)
| Algorithm | Type | Complexity | Reference |
|---|---|---|---|
| Classic EOQ Formula | Exact | O(1) | Harris (1913) |
| Backorder EOQ Formula | Exact | O(1) | Hadley & Whitin (1963) |
| Discount Evaluation | Exact | O(B log B) | Benton & Park (1996) |
Dynamic Lot Sizing
Given a planning horizon of T periods with time-varying demands dt, ordering costs Kt, and holding costs ht, determine when and how much to order in each period to minimize total cost. The Zero Inventory Ordering (ZIO) property holds at optimality: orders are placed only when inventory reaches zero, reducing the search space from continuous quantities to binary order/no-order decisions per period.
C(i, j) = Ki + ∑k=i+1..j hk−1 · ∑ℓ=k..j dℓ
Flow Balance It = It−1 + xt − dt ≥ 0 ∀ t
| Algorithm | Type | Complexity | Reference |
|---|---|---|---|
| Wagner-Whitin DP | Exact | O(T²) | Wagner & Whitin (1958) |
| Silver-Meal Heuristic | Heuristic | O(T²) worst | Silver & Meal (1973) |
| Part-Period Balancing | Heuristic | O(T²) worst | DeMatteis (1968) |
Wagner-Whitin Lot Sizing
A dedicated implementation of the Wagner-Whitin dynamic programming algorithm for the uncapacitated lot sizing problem. Exploits the ZIO property: at optimality, It−1 · xt = 0 for all t — either inventory entering a period is zero (so we order) or production is zero (we carry inventory). This reduces the search space and enables a clean O(T²) forward DP. The Aggarwal-Park (1993) improvement further reduces complexity to O(T) using the SMAWK technique.
f(0) = 0
ZIO Property It−1 · xt = 0 ∀ t (order only when inventory is zero)
| Algorithm | Type | Complexity | Reference |
|---|---|---|---|
| Wagner-Whitin DP | Exact | O(T²) | Wagner & Whitin (1958) |
Capacitated Lot Sizing
Extends the uncapacitated lot sizing problem with production capacity constraints Ct per period. Decision variables include production quantities xt and binary setup indicators yt. The capacity linking constraint xt ≤ Ct · yt couples the continuous and binary variables, making the problem NP-hard even for constant costs and capacities. The MILP formulation uses 3T variables and is solved via SciPy HiGHS.
s.t. It−1 + xt = dt + It ∀ t (flow balance)
xt ≤ Ct · yt ∀ t (capacity linking)
xt, It ≥ 0, yt ∈ {0, 1}
| Algorithm | Type | Complexity | Reference |
|---|---|---|---|
| MIP (SciPy HiGHS) | Exact | Exponential worst | Standard MILP formulation |
| Greedy Lot-for-Lot | Heuristic | O(T) | Produce exactly dt each period |
| Greedy Forward | Heuristic | O(T²) | Extend production to future periods |
Phase 2: Iterate backward, shifting production to earlier periods with spare capacity when the setup cost saved exceeds the incremental holding cost. This reduces setup frequency while respecting capacity constraints.
Multi-Echelon Inventory Optimization
A serial supply chain with L echelons, where each echelon has holding costs, ordering costs, and lead times. The goal is to set base-stock levels Sℓ at each echelon to minimize total expected holding cost while meeting the target service level at the customer-facing echelon. The cumulative lead time from echelon ℓ to the customer determines the demand variability each echelon must buffer against.
σLℓ = σD · √Lℓ
Sℓ = μD · Lℓ + zSL · σD · √Lℓ
where zSL = Φ−1(SL)
| Algorithm | Type | Complexity | Reference |
|---|---|---|---|
| Echelon Base-Stock | Heuristic | O(L) | Clark & Scarf (1960) |
| Powers-of-Two Policy | Heuristic | O(L log R) | Roundy (1985), ≤ 2% above optimal |
| Greedy Allocation | Heuristic | O(L · n) | Greedy safety stock across echelons |
Safety Stock Optimization
For each of n SKUs with stochastic demand and lead time, compute the safety stock level and reorder point (ROP) to achieve a target cycle service level. The key quantity is the standard deviation of demand during lead time (σDDLT), which accounts for both demand uncertainty and lead-time variability through the convolution of independent random variables.
Safety Stock and Reorder Point SS = z · σDDLT = Φ−1(SL) · σDDLT
ROP = μD · μL + SS
| Algorithm | Type | Complexity | Reference |
|---|---|---|---|
| Analytical SS Formulas | Exact | O(n) | Silver, Pyke & Thomas (2016) |
Vehicle / Container Loading
Given n items with weights wi and volumes vi, and vehicles with weight capacity W and volume capacity V, assign each item to a vehicle to minimize the number of vehicles used. This generalizes 1D bin packing with dual capacity constraints — each assignment must respect both the weight and volume limits simultaneously.
s.t. ∑k xik = 1 ∀ i (each item assigned once)
∑i wi xik ≤ W · yk ∀ k (weight capacity)
∑i vi xik ≤ V · yk ∀ k (volume capacity)
xik ∈ {0,1}, yk ∈ {0,1}
| Algorithm | Type | Complexity | Reference |
|---|---|---|---|
| First-Fit Decreasing (Dual) | Heuristic | O(n²) | Christensen et al. (2017) |