Stock Analysis · Research

Logistics 2 — Complete Exam Summary TI

Logistics 2 — Complete Exam Summary

Research date 4 Oct 2026
36-month upside
—
Potential return over 36 months
Scorecard
—
Likelihood
—
Tactical advice
—
Price now
—
36-mo target
—
Sector
—

Oct 2, 2026 · @Willem

At a glance

All eight decks are covered below: every concept, formula, step-by-step method and worked example, with the slide answers checked. Numbers marked "(computed here)" are not on the slides but follow directly from slide data — useful for practising.

Lecture Topic Must-know tools
1.2 Forecasting Naive, mean, MA, WMA, exponential smoothing, trend-adjusted ES, seasonal indices, regression, r / r², CFE, MAD, MSE, TS
2 Clustering Euclidean distance, centroid, SSE, k-means, hierarchical (single/complete/average/mean/Ward), Lance–Williams, precision/recall/accuracy
3 & 4 Classification Mean vector, covariance matrix, bivariate normal, conditional probability, total probability, Bayes, full Bayes vs Naive Bayes, pseudo-counts
5 Advanced inventory Continuous vs periodic review, EOQ, reorder point, resource-constrained multi-item EOQ, EPQ, safety stock, periodic (TI) system, newsvendor
7 Mathematical modelling LP vs ILP, knapsack, multi-knapsack, feasibility, big-M, fixed-charge cost, linking constraints, bin packing with time
8 Classical models Set covering, set partitioning, assignment, shortest path (flow formulation), Dijkstra, single-machine scheduling
9 Logistics costs Cumulative curves, headways, rent/waiting/holding cost, transport cost cf + cv·v, EOQ with vmax, handling/motion cost, stochastic effects
10 One-to-one distribution EOQ robustness, lot sizing with variable demand (two special cases), continuous approximation (lot sizing, terminal location)

L1.2 — Forecasting (Reid & Sanders ch. 8)

Forecasting predicts future values (demand, capacity, transport times, external factors like population or income) from past data; in logistics it sizes production/transport capacity, inventory, maintenance and the offer.

Principles

  • Forecasts are rarely perfect (stochasticity).
  • Forecasts rely on data.
  • More accurate for grouped data than for individual items.
  • More accurate for shorter than longer horizons (temperature plot: next-day forecast tracks actuals best, 10-day worst).

Five steps: decide what to forecast → evaluate appropriate data → select and test model → generate forecast → monitor accuracy and change model if needed.

Types of methods

  • Qualitative (subjective): executive opinion, market research, Delphi method (panel of experts).
  • Quantitative (formulas): time series (future follows past patterns; all info is in the history) and causal models (cause-and-effect with leading indicators, e.g. regression).

Time series = pattern + random variation. Patterns: level (horizontal around mean), trend (increasing/decreasing), seasonality (regular repeat within a year), cycle (like seasonal but longer horizon, start/end hard to predict). Random variation cannot be forecast.

Level models

\text{Naive: } F_{t+1} = A_t

\text{Simple mean: } F_{t+1} = \frac{\sum_t A_t}{n}

\text{Moving average: } F_{t+1} = \frac{1}{k}\sum_{i=t-k+1}^{t} A_i

\text{Weighted MA: } F_{t+1} = \sum C_t A_t, \quad \sum C_t = 1

\text{Exponential smoothing: } F_{t+1} = \alpha A_t + (1-\alpha) F_t, \quad 0 \le \alpha \le 1

  • Naive and simple mean suit level patterns.
  • MA drops the oldest and adds the newest point; more responsive to trends than the mean. WMA puts more weight on recent data, so it reacts faster than MA.
  • ES needs only last forecast, last actual and α — very popular. No previous forecast? Use the naive one. Higher α = more weight on the last period (and on its random noise); lower α = smoother.

Worked problem (actuals 300, 315, 290, 345, 320, 360, 375 for periods 1–7):

Method F7 F8
2-period MA (320+360)/2 = 340 (360+375)/2 = 367.5
4-period MA (290+345+320+360)/4 = 328.75 (345+320+360+375)/4 = 350
2-period WMA (0.6 on t−1, 0.4 on t−2) 0.6·360 + 0.4·320 = 344 0.6·375 + 0.4·360 = 369
ES, α = 0.2, F6 = 375 0.2·360 + 0.8·375 = 372 0.2·375 + 0.8·372 = 372.6

(Table computed here.) The slide's ES comparison starts from F2 = 300 (naive): α = 0.2 gives 303, 300, 309, 311, 321, 332 for periods 3–8; α = 0.9 gives 314, 292, 340, 322, 356, 373 — high α follows the actuals closely, low α lags.

Trend-adjusted exponential smoothing

Corrects the lag a level model shows on a trend. Three steps:

S_t = \alpha A_t + (1-\alpha)(S_{t-1} + T_{t-1})

T_t = \beta (S_t - S_{t-1}) + (1-\beta) T_{t-1}

FIT_{t+1} = S_t + T_t

Example (lawn care): A_July = 62, previous level S = 57, trend T = 15, α = 0.2, β = 0.1. S_July = 0.2·62 + 0.8·(57+15) = 70; T_July = 0.1·(70−57) + 0.9·15 = 14.8; FIT_August = 70 + 14.8 = 84.8 gallons.

Seasonality (seasonal indices)

  1. Average demand per season for each year = yearly total / number of seasons.
  2. Seasonal index per year per season = season demand / that year's average.
  3. Average the indices per season over the years.
  4. Forecast next year's total (any method) and divide by number of seasons.
  5. Season forecast = new average × average index.

TU Delft enrollment example (forecast total 90,000 → average 22,500):

Quarter 2021 (avg 20,000) Index 2022 (avg 21,000) Index Avg index Year 3
Fall 24,000 1.20 26,000 1.238 1.22 27,450
Winter 23,000 1.15 22,000 1.05 1.10 24,750
Spring 19,000 0.95 19,000 0.905 0.93 20,925
Summer 14,000 0.70 17,000 0.81 0.75 16,875

(Spring and Summer computed here; the four forecasts sum to 90,000.)

Causal model: linear regression

y = a + bx with x independent, y dependent.

b = \frac{\sum XY - n\bar{X}\bar{Y}}{\sum X^2 - n\bar{X}^2}, \qquad a = \bar{Y} - b\bar{X}

Goodness of fit

r = \frac{n\sum XY - \sum X \sum Y}{\sqrt{n\sum X^2 - (\sum X)^2}\,\sqrt{n\sum Y^2 - (\sum Y)^2}}

  • r = correlation coefficient: direction and strength of the linear relation (closer to ±1 = better fit).
  • r² = coefficient of determination: share of variation in y around its mean explained by the line (close to 1 desired).
  • Slide example: n = 4, ΣX = 189, ΣY = 589, ΣXY = 28,202, ΣX² = 9,253, ΣY² = 87,165 → r = 0.982, r² = 0.964. (Computed here from the same data: b ≈ 1.152, a ≈ 92.8.)

Forecast error and accuracy

E_t = A_t − F_t. Over-forecast → negative error; under-forecast → positive error.

CFE = \sum_t E_t \qquad MAD = \frac{\sum_t |E_t|}{n} \qquad MSE = \frac{\sum_t E_t^2}{n} \qquad TS = \frac{CFE}{MAD}

  • CFE measures bias; MAD total error regardless of sign; MSE penalizes large errors; TS controls bias (large |TS| = biased forecast).
  • Example (Jan–May): Method A errors 2, 1, 0, −1, 1 → CFE 3, MAD 1, MSE 1.4. Method B errors 3, 1, 3, 2, 2 → CFE 11, MAD 2.2 (slide rounds to 2), MSE 5.4. Method A is better on every measure.

Selecting a model

Consider: amount and type of data available; degree of accuracy required (more accuracy = more data); length of horizon (3 months vs 10 years need different models); data patterns present (a level model on a trend lags). Other methods: machine learning, combining forecasts (often more accurate), CPFR (Collaborative Planning, Forecasting and Replenishment between buyers and sellers).

L2 — Clustering (Zaki & Meira ch. 13–14)

Clustering partitions n items into K groups that are as homogeneous as possible, i.e. members are close in distance. Key choices: the number of clusters and which features to use. In logistics it serves organisation and consolidation (containers, warehouse slotting, store layout, networks).

Notation and distances

  • Data matrix D is n × d: each row x_i is an element, each column X_j an attribute. A vector is written vertically; the row form is its transpose (T).
  • Dot product aᵀb = Σ a_i b_i (vectors of the same size).

\|a\| = \sqrt{a^T a} = \sqrt{\sum_i a_i^2} \qquad \delta(a,b) = \|a-b\| = \sqrt{\sum_i (a_i-b_i)^2}

Centroid of cluster C_i (its representative point):

\mu_i = \frac{1}{n_i}\sum_{x_j \in C_i} x_j

Objective — sum of squared errors (to minimize):

SSE(\mathcal{C}) = \sum_{i=1}^{k}\sum_{x_j \in C_i} \|x_j - \mu_i\|^2

Why algorithms? Enumerating all K-partitions is impossible; the count is the Stirling number of the second kind, order k^n / k!:

S(n,k) = \frac{1}{k!}\sum_{t=0}^{k}(-1)^t \binom{k}{t}(k-t)^n

For k = 3 the slide table grows from about 9,800 (n = 10) to about 3·10^14 (n = 32). Both algorithms below are greedy (myopic: take the best nearby option), so they do not guarantee the optimum. An algorithm = steps that build a solution and stop after a fixed number of steps or when a condition holds.

K-means

  1. Step 0: generate k initial centroids at random (uniform).
  2. Step 1 (assignment): put each point in the cluster of the nearest centroid: j* = argmin_i ‖x_j − μ_i‖².
  3. Step 2 (update): recompute each centroid as the mean of its points.
  4. Step 3: stop if the stopping criterion holds, else go to Step 1. Criteria: assignments no longer change, or Σ‖μ_i^t − μ_i^{t−1}‖² ≤ ε.

1-D slide example, data {2, 3, 4, 10, 11, 12, 20, 25, 30}, k = 2, start μ1 = 2, μ2 = 4:

Iteration C1 C2 New μ1 New μ2
1 {2, 3} {4, 10, 11, 12, 20, 25, 30} 2.5 16
2 {2, 3, 4} {10, 11, 12, 20, 25, 30} 3 18
3 {2, 3, 4, 10} {11, 12, 20, 25, 30} 4.75 19.6
4 {2, 3, 4, 10, 11, 12} {20, 25, 30} 7 25
5 unchanged → stop 7 25

Tip: in 1-D, a point goes to C1 if it lies below the midpoint (μ1+μ2)/2.

Hierarchical (agglomerative) clustering

Starts with n singleton clusters and repeatedly merges the closest pair until one cluster remains (or k clusters). The result is a rooted binary tree, the dendrogram (leaves = items, root = everything). Consecutive clusterings are nested, C_{t−1} ⊂ C_t: A = {A1..Ar} is nested in B = {B1..Bs} if r > s and every A_i lies inside some B_j.

  1. Step 0: n clusters, compute the distance matrix.
  2. Step 1: find the closest pair C_i, C_j and merge: C_ij = C_i ∪ C_j.
  3. Step 2: update C = (C \ {C_i, C_j}) ∪ C_ij.
  4. Step 3: stop when k clusters (or one) remain; else update the distance matrix and repeat.

Cluster distances (linkage)

Measure δ(C_i, C_j) =
Single link min distance between a point in C_i and one in C_j
Complete link max distance between a point in C_i and one in C_j
Group average Σ_x Σ_y δ(x,y) / (n_i · n_j)
Mean distance δ(μ_i, μ_j), distance between centroids
Ward (min variance) increase in SSE when merged = (n_i n_j / (n_i+n_j)) ‖μ_i − μ_j‖²

Lance–Williams update for the distance of merged C_ij to another cluster C_r:

\delta(C_{ij},C_r) = \alpha_i\,\delta(C_i,C_r) + \alpha_j\,\delta(C_j,C_r) + \beta\,\delta(C_i,C_j) + \gamma\,|\delta(C_i,C_r) - \delta(C_j,C_r)|

Measure α_i α_j β γ
Single link 1/2 1/2 0 −1/2
Complete link 1/2 1/2 0 1/2
Group average n_i/(n_i+n_j) n_j/(n_i+n_j) 0 0
Mean distance n_i/(n_i+n_j) n_j/(n_i+n_j) −n_i n_j/(n_i+n_j)² 0
Ward (n_i+n_r)/(n_i+n_j+n_r) (n_j+n_r)/(n_i+n_j+n_r) −n_r/(n_i+n_j+n_r) 0

Check: single link gives ½a + ½b − ½|a−b| = min(a,b); complete link gives max(a,b).

Single-link example (A–B 1, A–C 3, A–D 2, A–E 4, B–C 3, B–D 2, B–E 3, C–D 1, C–E 3, D–E 5): merge AB at 1 → AB–C 3, AB–D 2, AB–E 3; merge CD at 1 → AB–CD 2, CD–E 3; merge ABCD at 2; merge with E at 3 → ABCDE.

Group-average Lance–Williams example: merge [x1,x2,x3] (n=3) and [x5,x7] (n=2) at distance 1; distance to [x4,x6] = (3/5)·3 + (2/5)·2 = 2.6.

Evaluating clusters with labelled data (supervised)

With known classes (e.g. Iris: setosa, versicolor, virginica; 150 flowers, 4 attributes) you know k and can compare clusters to the true classes. Each cluster is matched to the class it holds most of.

  • Positive = the reference class; negative = all others.
  • TP = item of the class put in its cluster; TN = other-class item correctly outside; FP = other-class item in the cluster; FN = class item outside the cluster.

\text{Accuracy} = \frac{TP+TN}{P+N} \qquad \text{Precision} = \frac{TP}{TP+FP} \qquad \text{Recall} = \frac{TP}{P}

  • Slide example (6 points, C1 = 2 setosa + 1 versicolor, C2 = 1 setosa + 2 versicolor, positive = setosa): TP 2, TN 2, FP 1, FN 1 → accuracy 4/6 = 0.67, precision 2/3, recall 2/3 (computed here).
  • Iris contingency table (computed here): C1 = 50 setosa → precision 1, recall 1; C2 = 36 versicolor + 1 virginica → versicolor precision 36/37 = 0.97, recall 36/50 = 0.72; C3 = 49 virginica + 14 versicolor → virginica precision 49/63 = 0.78, recall 49/50 = 0.98.

Large data sets are clustered in software, e.g. KNIME Analytics Platform.

L3 & L4 — Classification (Zaki & Meira ch. 2, 3, 18)

Classification predicts the class of a new point, given a data set whose points already have classes. Logistics uses: warehouse/inventory (affinity with already clustered products), bundling freight and allocating new cargo to bundles, trash management, classifying a new product to minimize setup times. Other uses: medicine (prognosis), biology.

Probabilistic approach (4 steps): 1) select attributes from a data set with defined classes; 2) fit a probability distribution per class; 3) compute the probability that the item's attributes are produced by each distribution; 4) assign the item to the class with the highest probability.

Bivariate statistics

  • Centered data matrix Z = D − 1·μᵀ (subtract each column's mean). Slide example: D = [2 3; 5 4; 2 5], μ = [3 4] → Z = [−1 −1; 2 0; −1 1].
  • Attributes are assumed i.i.d.; bivariate analysis finds a joint distribution for both attributes (ideally both normal → bell shape).
  • Mean vector μ = (μ1, μ2)ᵀ. Variance σ_j² = (1/n)Σ(x_ij − μ_j)²; total variance = σ1² + σ2².
  • Covariance σ12 = (1/n)Σ(x_i1 − μ1)(x_i2 − μ2): how the two variables vary together.
  • Correlation ρ12 = σ12 / (σ1 σ2).

\Sigma = E[(X-\mu)(X-\mu)^T] = \frac{1}{n} Z^T Z = \begin{pmatrix} \sigma_1^2 & \sigma_{12} \\ \sigma_{21} & \sigma_2^2 \end{pmatrix}, \quad \sigma_{12} = \sigma_{21}

(For the slide's D, computed here: Σ = (1/3)[6 1; 1 2] = [2 0.333; 0.333 0.667].) The slides use 1/n, not 1/(n−1).

Multivariate (bivariate, d = 2) normal density:

f(x \mid \mu, \Sigma) = \frac{1}{(\sqrt{2\pi})^d \sqrt{|\Sigma|}} \exp\left\{ -\frac{(x-\mu)^T \Sigma^{-1} (x-\mu)}{2} \right\}

\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc, \qquad \begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

One-dimensional version: f(x) = (1/√(2πσ²)) · exp(−(x−μ)² / (2σ²)).

Probability theory

  • Axioms: P(A) ≥ 0; P(S) = 1; P(A ∪ B) = P(A) + P(B) for disjoint A, B.
  • Conditional probability: P(A|B) = P(AB) / P(B) (A restricted to the new space B). Disjoint → P(A|B) = 0; A ⊂ B → P(A|B) = P(A)/P(B) ≥ P(A); B ⊂ A (AB = B) → P(A|B) = 1; independent → P(A|B) = P(A).
  • Dice example: A = sum > 8 (P = 10/36), B = first die is 6 (P = 1/6), P(AB) = 4/36 → P(A|B) = (4/36)/(1/6) = 0.67.
  • Law of total probability (A1…Am partition S): P(B) = Σ P(A_i) P(B|A_i).
  • Bayes' theorem (P(A_i) = prior, P(B|A_i) = likelihood, P(A_i|B) = posterior):

P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{\sum_j P(B \mid A_j)\,P(A_j)}

Doctor example: P(E|H1) = 0.9, P(E|H2) = 0.1, P(E|H3) = 0.3; priors 0.03, 0.7, 0.27. Products 0.027, 0.07, 0.081, sum 0.178 → P(H1|E) = 0.15, P(H2|E) = 0.39, P(H3|E) = 0.45 (most likely).

Full Bayes classifier

\hat{y} = \arg\max_{c_i} \frac{P(x \mid c_i) P(c_i)}{P(x)} = \arg\max_{c_i} f_i(x)\,P(c_i)

P(x) is the same for every class, so skip it. Prior P(c_i) = n_i / n.

Algorithm (numeric attributes): for each class i: 1) filter D for class c_i; 2) prior = n_i/n; 3) likelihood = bivariate normal density f_i(x) with that class's μ_i and Σ_i; 4) store likelihood × prior; 5) after the last class, choose the largest.

Numeric example — classify x = (6.75, 4.25); C1 = (5,9), (6,10), (5,6), (8,25); C2 = (8,6), (10,20), (9,10), (7,4). Slide results are in a Brightspace Excel file; values below computed here with the slides' 1/n covariance:

C1 C2
Prior 4/8 = 0.5 4/8 = 0.5
μ (6, 12.5) (8.5, 10)
Σ [1.5 8.75; 8.75 54.25] [1.25 6.5; 6.5 38]
abs(Σ) (determinant) 4.8125 5.25
f(x) ≈ 9.8 · 10⁻¹³ ≈ 0.00536
f · prior ≈ 4.9 · 10⁻¹³ ≈ 0.00268 → C2

Categorical attributes

Same formula and prior; the likelihood = (number of class-c_i items with exactly x's combination) / n_ci.

Pseudo-count when the combination never occurs in c_i (m_j = number of possible values of attribute j):

\text{Full Bayes: } P(x \mid c_i) = \frac{1}{n_{c_i} + \prod_{j=1}^{d} m_j} \qquad \text{Naive Bayes: } P(x_j \mid c_i) = \frac{1}{n_{c_i} + m_j}

Data set (C1: long-heavy, short-light, short-light, long-heavy, long-light; C2: short-light, short-heavy, long-heavy):

New item C1 score C2 score Class
short, light 5/8 · 2/5 = 0.25 3/8 · 1/3 = 0.125 C1
short, heavy (pseudo-count for C1) 5/8 · 1/(5+2·2) = 0.069 3/8 · 1/3 = 0.125 C2

Naive Bayes

Assumes all attributes are independent → covariances = 0, Σ is diagonal. Likelihood = product of one-dimensional likelihoods per attribute (1-D normal for numbers, per-attribute frequency for categories):

P(x \mid c_i) = \prod_{j=1}^{d} P(x_j \mid c_i)

New item (data set) C1 score C2 score Class
short, heavy (as above) 5/8 · 2/5 · 2/5 = 0.10 3/8 · 2/3 · 2/3 = 0.167 C2
long, heavy (C2 = short-light, short-heavy, short-heavy) 5/8 · 3/5 · 2/5 = 0.15 3/8 · 1/(3+2) · 2/3 = 0.05 C1

(Final scores computed here; the slides give the factors.)

Exam-style categorical example (last slide)

Class c1 has 50 items, c2 has 100 → priors 1/3 and 2/3. X1 ∈ {very short, short, long, very long} (m1 = 4), X2 ∈ {short, medium, long} (m2 = 3).

c1 counts (/50) X2 short medium long X1 total
very short 1 33 5 39
short 0 3 8 11
long 0 0 0 0
very long 0 0 0 0
X2 total 1 36 13
c2 counts (/100) X2 short medium long X1 total
very short 6 0 0 6
short 24 15 0 39
long 13 30 0 43
very long 3 7 2 12
X2 total 46 52 2

Answers (computed here):

Point Full Bayes c1 Full Bayes c2 Naive c1 Naive c2 Class
short, medium 3/50 · 1/3 = 0.020 15/100 · 2/3 = 0.100 11/50 · 36/50 · 1/3 = 0.053 39/100 · 52/100 · 2/3 = 0.135 c2 (both)
long, long 1/(50+12) · 1/3 = 0.0054 1/(100+12) · 2/3 = 0.0060 1/(50+4) · 13/50 · 1/3 = 0.0016 43/100 · 2/100 · 2/3 = 0.0057 c2 (both)
very short, long 5/50 · 1/3 = 0.033 1/(100+12) · 2/3 = 0.0060 39/50 · 13/50 · 1/3 = 0.068 6/100 · 2/100 · 2/3 = 0.0008 c1 (both)

L5 — Advanced inventory management (Reid & Sanders ch. 12; Nahmias & Olsen ch. 4)

Inventory balances service level (right product, quantity, time) against cost (ordering + holding, while avoiding stockouts). Learning objectives: explain continuous and periodic review policies; apply optimization; illustrate the effect of uncertainty.

Why hold inventory: meet anticipated demand, smooth production, decouple operations, protect against stockouts, economies of scale, hedge against price increases, quantity discounts. Poor management → stockouts (lost sales) or overstock (excess cost); it affects operations, marketing and finance.

Continuous vs periodic review

Continuous review Periodic review
How Tracked in real time; order when stock hits the reorder point R Checked at fixed intervals; order up to a target level TI
Order quantity Fixed (e.g. EOQ) Variable
Time between orders Variable Fixed
Pros High responsiveness, lower inventory, quantity discounts possible Simple, lower monitoring cost, items can be ordered together
Cons Higher system cost (automated tracking, barcodes), items replenished separately Higher inventory/safety stock to buffer between reviews, stockout risk if demand spikes
Best for High-value or fast-moving items Lower-value, less critical items, or when grouping orders pays off

EOQ (Economic Order Quantity)

Assumptions: constant known demand (no safety stock), constant known lead time, no quantity discounts, fixed order/setup cost, all demand met, whole order arrives at once, perfect quality.

TC(Q) = \frac{D}{Q} S + \frac{Q}{2} H \qquad Q^* = \sqrt{\frac{2DS}{H}} \qquad TC(Q^*) = \sqrt{2DSH}

  • D = demand (per period), S = ordering/setup cost per order, H = holding cost per unit per period. All costs in the same time unit.
  • Small Q: many orders, low holding; large Q: few orders, high holding. At Q*, ordering cost = holding cost.
  • Reorder point R = d · L (d = demand rate per time unit, L = lead time in the same unit).

Example: D = 10,000/yr, price €30, H = 20% · 30 = €6, S = €75, L = 5 days, 250 working days. Q* = √(2·10,000·75/6) = 500 units; TC = (10,000/500)·75 + (500/2)·6 = €3,000; d = 10,000/250 = 40/day → R = 200 units.

Resource-constrained multi-item EOQ

\min TC = \sum_{i=1}^{n} \left( \frac{D_i S_i}{Q_i} + \frac{Q_i H_i}{2} \right) \quad \text{s.t.} \quad \sum_{i=1}^{n} c_i Q_i \le C

c_i = cost or space per unit of item i; C = capacity (budget/space).

  1. Compute each independent EOQ_i = √(2D_iS_i/H_i).
  2. If Σ c_i EOQ_i ≤ C, the constraint is not binding → Q_i* = EOQ_i.
  3. Otherwise it binds. Special case c_1/H_1 = c_2/H_2 = … (resource use proportional to holding cost): Q_i* = m · EOQ_i with m = C / Σ c_i EOQ_i.

Why the special case is reasonable: with a budget constraint c_i is the unit cost and H_i = I_i c_i, so c_i/H_i = 1/I_i; equal ratios = same interest rate for all items.

Example (budget €30,000, I = 25%):

Item D_i c_i S_i EOQ_i Q_i* = 0.8372 · EOQ_i
1 1,850 50 100 √(2·1850·100/12.5) = 172 144
2 1,150 350 150 √(2·1150·150/87.5) = 63 52
3 800 85 50 √(2·800·50/21.25) = 61 51

Σ c_i EOQ_i = 50·172 + 350·63 + 85·61 = 35,835 > 30,000 → m = 30,000/35,835 = 0.8372.

EPQ (Economic Production Quantity)

A production run instead of an order; stock builds up gradually at rate p − d during uptime T1 (assume p > d); downtime T2; cycle T = T1 + T2.

T_1 = \frac{Q}{p} \qquad I_{max} = (p-d)T_1 = Q\left(1 - \frac{d}{p}\right) \qquad TC = \frac{D}{Q}S + \frac{I_{max}}{2}H

Q^* = EPQ = \sqrt{\frac{2DS}{H(1 - d/p)}}

EOQ is the special case p → ∞.

Example (chairs): D = 18,000/yr, d = 1,500/month, p = 2,500/month, S = €800, H = €18/yr, 20 days/month, L = 5 days. Q* = √(2·18,000·800 / (18·0.4)) = 2,000; I_max = 2,000·(1 − 1500/2500) = 800; TC = (18,000/2,000)·800 + (800/2)·18 = €14,400; daily demand = 1500/20 = 75 → R = 375.

Safety stock (demand uncertainty)

R = dL + SS \qquad SS = z\,\sigma_{dL}

σ_dL = standard deviation of demand during lead time; z from the normal table for the service level (95% service = 5% risk → z = 1.645; general table values: 90% → 1.28, 97.5% → 1.96, 99% → 2.33).

Periodic review system

Order every RP (review period, can be derived from EOQ, e.g. EOQ/d) up to target inventory TI; order Q = TI − OH (on-hand). Must cover demand over RP + L.

TI = d(RP + L) + SS \qquad SS = z\,\sigma_t \sqrt{RP + L} \qquad Q = TI - OH

σ_t = standard deviation of demand per time interval (σ_{RP+L} = σ_t√(RP+L)).

Example (pharmacy): d = 6,000/week, σ_t = 500, RP = 1 week, L = 3 weeks, 95% → z = 1.645. SS = 1.645·500·√4 = 1,645; TI = 6,000·4 + 1,645 = 25,645; with OH = 19,000 → Q = 6,645 tablets.

Single-period model (newsvendor)

For perishable/seasonal goods: sold at full price in one period only, highly variable demand with a known distribution, salvage value < cost. Balances cost of excess vs cost of shortage. With discrete demand use an expected value (payoff) matrix:

  • Order = Demand: payoff = D · (price − cost).
  • Order > Demand: payoff = D · (price − cost) − (Order − D) · (cost − salvage).
  • Order < Demand: payoff = Order · (price − cost).

T-shirt example: price €20, cost €8, salvage €2; P(demand 80, 90, 100, 110, 120) = 0.2, 0.25, 0.3, 0.15, 0.1.

Order \ Demand 80 90 100 110 120 Expected profit
80 960 960 960 960 960 960
90 900 1,080 1,080 1,080 1,080 1,044
100 840 1,020 1,200 1,200 1,200 1,083
110 780 960 1,140 1,320 1,320 1,068
120 720 900 1,080 1,260 1,440 1,026

Order 100: 0.2·840 + 0.25·1,020 + 0.3·1,200 + 0.15·1,200 + 0.1·1,200 = €1,083.

L7 — Mathematical modelling (Bombelli et al., From theORy to application)

A mathematical (linear) programming model translates a problem — a situation with constraints whose improvement is measurable — into variables, parameters, constraints and an objective. Slide analogy: passing the course = maximize grade with minimum effort, subject to limited time, other courses, scheduling, grade ≥ 6.

Ingredients

  • Variables: unknown values to find (e.g. quantity to buy).
  • Parameters: known upfront (unit cost, starting inventory).
  • Constraints: equalities/inequalities limiting the variables (money, time).
  • Objective function: minimize or maximize.
  • Linear: only terms αx — no variable × variable, no logs, no square roots.

Standard format: objective function → constraints → domain of the variables (+ list of parameters and variables). Compact form:

\min(\max) \sum_{j=1}^{n} c_j x_j \quad \text{s.t.} \quad \sum_{j=1}^{n} a_{ij} x_j \ (\ge \text{ or } \le) \ b_i \ \ \forall i = 1..m, \qquad x_j \in \ldots \ \forall j

Classification by domain: x ∈ ℝ → linear programming (LP, relatively easy to solve); x ∈ ℕ or ℤ → integer linear programming (ILP, hard); x ∈ {0,1} → binary/integer linear programming. A solution (a vector x) is feasible if it meets all constraints and optimal if it is feasible and the best of all. Solved with algorithms, trial-and-error, or solvers (CPLEX, GUROBI).

LP example — fertilizer

L-fert per ton: 2 A, 1 B, 1 C, revenue €50. H-fert per ton: 1 A, 1 B, 0 C, revenue €15. Stock: 1500 A, 1200 B, 500 C.

\max 50x_1 + 15x_2 \quad \text{s.t.} \quad 2x_1 + x_2 \le 1500, \quad x_1 + x_2 \le 1200, \quad x_1 \le 500, \quad x_i \ge 0

(Optimum computed here: x1 = 500, x2 = 500, revenue €32,500 — chemical A and C are binding, B has 200 spare.)

Knapsack (ILP)

Items i with weight w_i and value v_i, one knapsack of capacity C:

\max \sum_{i \in I} v_i x_i \quad \text{s.t.} \quad \sum_{i \in I} w_i x_i \le C, \quad x_i \in \{0,1\}

Slide illustration: w = (10, 2, 1, 3, 0.25, 1), v = (5, 2, 1, 1, 4, 0), example solution x = (1, 0, 1, 0, 1, 0) → weight 11.25, value 10.

Multi-knapsack

Two or more bins j with capacity C; each item to at most one bin:

\max \sum_{i \in N}\sum_{j} v_i x_{ij} \quad \text{s.t.} \quad \sum_{j} x_{ij} \le 1 \ \forall i, \qquad \sum_{i \in N} w_i x_{ij} \le C \ \forall j, \qquad x_{ij} \in \{0,1\}

Trap: the first slide version omits Σ_j x_ij ≤ 1 ("model is missing something") — then one item can be packed in both bins and its value counted twice.

Feasibility and logical constraints

  • x1 + (1−x2) + (1−x3) + x4 = 4 with binary x → only x = (1, 0, 0, 1).
  • … ≤ 3 → forbids exactly that one combination.
  • x1 + x3 = 1 → exactly one of the two is in the solution (one in, the other out).

Either-or regions F: 2 ≤ x1 ≤ 4, 4 ≤ x2 ≤ 6 and G: 5 ≤ x1 ≤ 8, 2 ≤ x2 ≤ 3. Listing all 8 bounds is wrong — F and G don't overlap, so it is infeasible. Correct: one binary y and big-M:

\begin{aligned}
&x_1 \ge 2 - My, \ x_1 \le 4 + My, \ x_2 \ge 4 - My, \ x_2 \le 6 + My && (F, \text{ active if } y=0)\\
&x_1 \ge 5 - M(1-y), \ x_1 \le 8 + M(1-y), \ x_2 \ge 2 - M(1-y), \ x_2 \le 3 + M(1-y) && (G, \text{ active if } y=1)
\end{aligned}

Check point (3, 6) with M = 1000: all F constraints hold with y = 0; G's hold because they're relaxed by 1000 → y = 0 (F). For multiple regions use one binary per region, y_F + y_G (+ …) = 1, and relax region k by M·(1 − y_k) (the slide writes this with M·y_F etc.).

The big-M construct

Either f(x) ≥ k or f(x) ≤ γ:

f(x_1..x_n) \ge k - M(1 - y_j) \qquad f(x_1..x_n) \le \gamma + M y_j

  • M is a large number that disables a constraint; it always comes with a binary variable.
  • A ≤ constraint is relaxed toward +M; a ≥ constraint toward −M.
  • y = 0 → the second holds and the first is disabled (≥ something far below 0).

Fixed-charge cost (objective ↔ constraints)

Producing x1 costs fixed f plus p per unit: h(x1) = 0 if x1 = 0; f + p·x1 if x1 > 0.

Attempt Model Problem
1 min f + p x1 Pays f even when x1 = 0
2 min fy + p x1, y ∈ {0,1} Nothing forces y = 1, so f is never paid
3 ✓ min fy + p x1, x1 ≤ My, y ∈ {0,1} Correct: linking constraint

Attempt 3 check: (x1, y) = (0,0) feasible + correct; (>0, 0) infeasible; (0, 1) feasible for the constraints but not for the problem (never optimal because it costs f for nothing); (>0, 1) correct.

Linking variables and parameters

Binary X_ij = 1 if container i goes on train j (or item i in knapsack j).

  • Train departs after container is available, only if on board: t_j ≥ a_i − (1 − X_ij)M, or equivalently t_j ≥ a_i X_ij (both work).
  • Train departs before due time, only if on board: t_j ≤ d_i + (1 − X_ij)M.
  • If deadlines may be exceeded, add slack (delay) variable d̄_i: t_j ≤ d_i + d̄_i + (1 − X_ij)M (and typically penalize d̄_i in the objective).

Bin packing (and with time)

Like multi-knapsack, but all items must be allocated and each used bin has a cost c_j (y_j = 1 if bin j used):

\min \sum_{j \in B} c_j y_j \quad \text{s.t.} \quad \sum_{j \in B} x_{ij} = 1 \ \forall i \in I, \qquad \sum_{i \in I} w_i x_{ij} \le CAP_j\, y_j \ \forall j \in B

The y_j on the right-hand side both caps capacity and forces y_j = 1 when a bin is used (combining multi-knapsack with the fixed-charge idea).

With time (item availability A_i, deadline D_i, bin departure time t_j, travel time T_j):

t_j \ge A_i x_{ij} \ \ \forall i, j \qquad t_j + T_j \le D_i + (1 - x_{ij})M \ \ \forall i, j

(The first version on the slides uses t_j ≤ D_i + (1 − x_ij)M, i.e. departure before deadline; the "visual" version adds travel time so arrival t_j + T_j meets the deadline.)

L8a — Classical mathematical models (Fazi notes ch. 3)

Learning objectives: formulate classical transport/logistics problems as (MI)(I)LPs; formulate an (MI)LP for an unseen problem; apply Dijkstra. Approach for any formulation exercise: write indices/sets → parameters → decision variables → objective → constraints → variable domains.

Coverage (set covering) problem

Demand locations i ∈ N, candidate hospital sites j ∈ S, opening cost c_j, distance d_ij, coverage radius K. Open sites so every location is within K of at least one open site, at minimum cost. x_j = 1 if site j is opened.

Wrong constraint: x_j d_ij ≤ K ∀i, j — if x_j = 1 it forces every location to be within K of that site. Fix with an incidence parameter a_ij = 1 if d_ij ≤ K, else 0:

\min \sum_{j \in S} c_j x_j \quad \text{s.t.} \quad \sum_{j \in S} a_{ij} x_j \ge 1 \ \ \forall i \in N, \qquad x_j \in \{0,1\}

Set partitioning (exact cover): each location covered exactly once → Σ_j a_ij x_j = 1. Every partitioning solution is feasible for covering, not vice versa (smaller feasible space), so for minimization:

OBJ_{covering} \le OBJ_{partitioning}

Assignment problem

Drivers i ∈ N, passengers j ∈ M, cost c_ij; x_ij = 1 if driver i is assigned to passenger j.

\min \sum_{i \in N}\sum_{j \in M} c_{ij} x_{ij} \quad \text{s.t.} \quad \sum_{i \in N} x_{ij} = 1 \ \forall j \in M, \qquad \sum_{j \in M} x_{ij} = 1 \ \forall i \in N, \qquad x_{ij} \in \{0,1\}

A solution is a permutation matrix: exactly one 1 per row (each driver one passenger) and per column (each passenger one driver).

Shortest path problem

Graph G = (V, E), non-negative weights w_ij, source s, target t; x_ij = 1 if edge (i,j) is on the path. Flow-balance formulation:

\min \sum_{(i,j) \in E} w_{ij} x_{ij} \quad \text{s.t.} \quad \sum_{j:(i,j) \in E} x_{ij} - \sum_{j:(j,i) \in E} x_{ji} = \begin{cases} 1 & i = s \\ -1 & i = t \\ 0 & \text{otherwise} \end{cases} \quad \forall i \in V

Out-flow minus in-flow: the source sends one unit, the target absorbs it, every other node passes it on. Applications: navigation (road/rail/air), telecom networks, delivery services. Single-source version: distance from s to every node plus a predecessor tree.

Dijkstra's algorithm (non-negative weights only)

  1. Mark all nodes unvisited.
  2. Tentative distance 0 for the source, ∞ for all others.
  3. Current node = unvisited node with the smallest tentative distance (always the source first).
  4. For each unvisited neighbour: distance via current node = current distance + edge weight; if smaller, update it and set its predecessor.
  5. Mark the current node visited (its distance is now final).
  6. Repeat 3–5 until all nodes are visited.
  7. Output: shortest distance to every node; read a path backwards via the predecessors.

Slide example — edges A–B 2, A–D 8, B–D 5, B–E 6, D–E 3, D–F 2, E–F 1, E–C 9, F–C 3; source A:

Step Current node (dist.) Updates
1 A (0) B = 2 (A), D = 8 (A)
2 B (2) D = 2+5 = 7 (B), E = 2+6 = 8 (B)
3 D (7) F = 7+2 = 9 (D); E via D = 10 > 8, no change
4 E (8) C = 8+9 = 17 (E); F via E = 9, not shorter
5 F (9) C = 9+3 = 12 (F)
6 C (12) done

Final: A 0, B 2 (A), D 7 (B), E 8 (B), F 9 (D), C 12 (F). Backtrack C ← F ← D ← B ← A: A → B → D → F → C, weight 12.

Exercise 1 — single-machine scheduling

Tasks j ∈ J with processing time p_j and cost w_j per unit of completion time; one task at a time. Variables: start time t_j ≥ 0; y_ij = 1 if task j is before i.

(a) Minimize weighted completion times without overlap. Writing both t_i + p_i ≤ t_j and t_j + p_j ≤ t_i is wrong (both can't hold → infeasible). Use big-M either-or:

\min \sum_{j \in J} w_j (t_j + p_j) \quad \text{s.t.} \quad t_i + p_i \le t_j + M y_{ij}, \quad t_j + p_j \le t_i + M(1 - y_{ij}) \quad \forall i < j

(b) Due dates d_j and a fixed penalty z_j if late (regardless of delay); x_j = 1 if task j is late:

\min \sum_{j} w_j (t_j + p_j) + \sum_{j} z_j x_j \quad \text{add:} \quad t_j + p_j \le d_j + M x_j \ \ \forall j, \quad x_j \in \{0,1\}

L9 — Succinct models and logistics costs (Daganzo ch. 1–2)

Learning objectives: understand the difference between analytical and mathematical models; analyze logistics system costs with closed formulas.

Mathematical vs analytical models

Mathematical models (LP/ILP) Analytical models (closed formulas, e.g. EOQ)
Pros Extensive description of system dynamics; comprehensive single pieces of information Rough description of a few dynamics, meaningful results; data summaries, less prone to errors
Cons Difficult to solve (need software); detailed data hard to get accurate May not give many details; data selection needed

Analytical models write each cost component as a formula and find the best value via derivatives.

Logistics cost categories

  • Motion costs (movement): transportation, handling.
  • Holding costs (time): rent (storage space), waiting (delay of items, e.g. capital interest).

First model and cumulative diagrams

One production site → transport → one destination; production rate D' = consumption rate; the company decides how much to accumulate before shipping. Four cumulative curves over time: (i) production (slope D'), (ii) shipments (steps), (iii) arrivals (steps, shifted by travel time t_m), (iv) consumption. Headways H_i = times between shipments.

In-class exercise — at time t1 read the diagram as:

  • Vertical gap production − shipments = items waiting for transport.
  • Vertical gap shipments − arrivals = items in transit.
  • Vertical gap arrivals − consumption = items waiting for consumption.
  • Horizontal gap production → consumption = waiting time of an item.

Holding costs

\overline{Wait} = H_1 + t_m, \quad H_1 = \max_i H_i \qquad \text{Max accumulation} = D' H_1

\text{rent/year} = c_r \cdot D' H_1 \qquad \text{rent/item} = \frac{c_r \cdot D' H_1}{D'} = c_r H_1

Rent is proportional to the maximum number of items stored (= space needed), so it grows with the maximum headway.

Example BiB: D' = 400/day, c_r = €0.1, H = {10, 12, 8, 15, 14, 12, 16, 10} → H1 = 16; max accumulation = 6,400; rent = 0.1 · 6,400 = €640/year; per item 640/400 = €1.6.

Waiting cost (c_i = cost per item per unit time of delay):

\text{wait/year} = c_i D'(H_1 + t_m) = c_i D' H_1 + c_i D' t_m \qquad \text{wait/item} = c_i H_1 + c_i t_m

  • c_i H1 = stationary inventory cost; c_i t_m = pipeline (in-transit) inventory cost.
  • If inventory at the destination can be ignored (passengers), the slide's average wait is t_m + ½(H̄·0.5 + H1·0.5).

Transportation costs

\text{shipment cost} \approx c_f + c_v v \qquad \text{cost for } n \text{ shipments} = \sum_{i=1}^{n}(c_f + c_v v_i) = c_f n + c_v V, \quad V = \sum_i v_i

v = shipment size, c_f = fixed cost per shipment, c_v = rate per item. For fixed V, total cost depends only on the number of shipments n.

\text{transport/item} = c_f \frac{n}{V} + c_v = \frac{c_f}{\bar{v}} + c_v = \frac{c_f}{D' \bar{H}} + c_v \quad (\bar{v} = D'\bar{H})

Key contrast: transport cost per item falls with the average headway; holding cost rises with the maximum headway — so regular (equal) headways are best.

Distance-dependent version: c_f = c_s + c_d d and c_v = c'_s + c'_d d:

\text{cost for } n \text{ shipments} = c_s n + c_d n d + c'_s V + c'_d V d

c_s = cost per trip/stop, c_d = cost per vehicle-km, c'_s = extra cost per item carried (loading/unloading), c'_d = cost per item-km. With n_s delivery stops per trip: ≈ c_s(1 + n_s)n + c_d n d + c'_s V.

Example TraLog (Delft → Amsterdam): d = 70 km, capacity 200, V = 600/day → n = 3; c_s = 75, c_d = 1, c'_s = 0.2, c'_d = 0.001. Cost = 75·3 + 1·3·70 + 0.2·600 + 0.001·600·70 = 225 + 210 + 120 + 42 = €597; per item €0.995.

Size quiz: the per-shipment cost f_t(v) satisfies (a) f_t(x1 + x2) ≤ f_t(x1) + f_t(x2) (subadditive: one combined shipment pays the fixed cost once).

Optimal shipment size (EOQ with capacity)

Cost per item = holding (∝ v, since H = v/D') + transport c_f/v (+ c_v constant):

\min_v \ A v + \frac{B}{v} \ \ \text{s.t. } v \le v_{max}, \qquad A = \frac{c_h}{D'}, \ B = c_f, \ c_h = c_r + c_i \qquad v^* = \min\left\{\sqrt{B/A}, \ v_{max}\right\}

Example Star (Amsterdam → Bremen, 355 km, 4h20 = 260 min = 0.542 working day of 8 h): price €25, D' = 2,000/day, v_max = 250, c_f = €75, c_v = €2, c_r = €0.5/week = €26/year, c_i = 2% · 25 = €0.5/unit/year → c_h = €26.5. Slide: A = 26.5/2000 = 0.01325, v* = min{√(75/0.01325), 250} = min{75.2, 250} = 75.2 (graph: motion cost per item falls, holding rises; optimum at 75.2).

Units trap (checked here): the slide divides a per-year holding cost by a per-day demand. With consistent units (D' = 730,000/year) √(B/A) ≈ 1,437 > 250, so v* = v_max = 250. Know the slide's method; always state your units.

Motion costs (transport + handling)

Handling adds a fixed part c'_f per handling unit (capacity v'_max) and c'_v per item; the step function is approximated by the line PQ:

f_m(v) \approx c_f + \left(c_v + c'_v + \frac{c'f}{v'{max}}\right) v \qquad c''_f = c_f, \quad c''_v = c_v + c'_v + c'f / v'{max}

So handling is folded into the transport function. Motion cost per item f_m(v)/v falls with v (sawtooth, lower bound from Eq. 2.7); holding cost per item rises with v.

Stochastic effects

  • So far travel time and production/consumption rates were constant. If stochastic: thanks to EOQ robustness, lot size and dispatch frequency should not change.
  • Order strategy: when on-hand + backordered items = v0 (reorder point), request a shipment of size v.
  • Demand: rate D', standard deviation γ; lead time T_ℓ with mean t_ℓ, s.d. σ_ℓ. Items at destination when the shipment arrives = v0 + v − PQ (PQ = demand during lead time):

E(PQ) = D' t_\ell \qquad var(PQ) = D'^2 \sigma_\ell^2 + D' \gamma t_\ell

  • Optimal v: balance motion and inventory cost. Long run: motion cost is the same with or without randomness (same number of shipments); holding costs are larger with stochastic effects.
  • Safety stock: R = dL + SS, SS = z σ_dL. Order-cycle service level = probability that demand during lead time does not exceed on-hand inventory; 95% (5% stockout risk) → z = 1.645. Slide graph: Q = 400, SS = 50, R = 250.

L10 — One-to-one distribution (Daganzo ch. 3)

Learning objectives: explain EOQ robustness; analyze lot sizing with variable demand (two special cases); explain continuous approximation (CA); apply CA to lot sizing and freight terminal location.

Lot sizing with constant demand (recap)

D' = demand rate, c_f = setup/transport cost, c_h = holding cost per item, v = shipment size.

z = \min_v \left\{ A v + \frac{B}{v} \right\} \text{ s.t. } v \le v_{max}, \qquad A = \frac{c_h}{D'}, \ B = c_f

v^* = \sqrt{B/A}, \quad z^* = 2\sqrt{AB} \ \ (\text{if } v_{max} = \infty) \qquad v^* = \min\left\{\sqrt{B/A}, v_{max}\right\}

At the unconstrained optimum, holding cost = shipping cost. If √(B/A) > v_max it is infeasible → set v* = v_max.

Robustness of EOQ

(a) Decision off by factor γ (v0 = γ v*):

\frac{z_0}{z^*} = \frac{1}{2}\left(\gamma + \frac{1}{\gamma}\right)

γ = 0.8 (20% error in v) → ½(0.8 + 1.25) = 1.025: only 2.5% cost penalty.

(b) Input off by factor δ:

A' = A\delta \Rightarrow v^{*\prime} = v^* \delta^{-1/2} \qquad B' = B\delta \Rightarrow v^{*\prime} = v^* \delta^{1/2}, \quad z^{*\prime} = z^* \delta^{1/2}

You can rough in costs and stay near-optimal.

Example PedLog: B = €100, A = €1.15, transport cost +10% (δ = 1.1). v* = √(100/1.15) = 9.33 → 9.33·√1.1 = 9.78; z* = 2√(100·1.15) = 21.45 → 21.45·√1.1 = 22.48. Both change by ≈ 5% for a 10% input change.

(c) Model error: if the true holding cost z_h(v) stays within a vertical band of width Δ around Av (Av − Δ/2 ≤ z_h(v) ≤ Av + Δ/2), the extra cost cannot exceed Δ/2. The EOQ form is forgiving.

Lot sizing with variable demand

D(t) = cumulative demand from 0 to t, D'(t) = variable demand rate, c_f per vehicle, c_h per item, v_max, horizon t_max. Decide shipment sizes v0 … v_{n−1} and receipt times t0 = 0, t1 … t_{n−1} to minimize shipping + holding cost. Split c_h = c_r (rent) + c_i (waiting/interest).

Special case 1 — rent dominates (c_i ≪ c_r, c_h ≈ c_r). Rent depends on peak inventory, not on when it is held; shipping cost is n·c_f regardless of sizes. So:

  1. Minimize the largest shipment → make all shipments equal: v0 = … = v_{n−1} = D(t_max)/n.
  2. Times: choose t_i with D(t_i) = (i/n) D(t_max), i = 0 … n−1 — dispatch barely enough to cover demand until the next shipment.
  3. Choose n by minimizing cost; it reduces to EOQ with v = D(t_max)/n and average rate D' = D(t_max)/t_max:

\frac{cost}{time} = c_r \frac{D(t_{max})}{n} + c_f \frac{n}{t_{max}} \qquad \frac{cost}{item} = \frac{c_r}{D'} \cdot \frac{D(t_{max})}{n} + c_f \frac{n}{D(t_{max})}

(So v* = √(c_f D'/c_r) and n* ≈ D(t_max)/v*, rounded to an integer — summary computed here.)

Special case 2 — rent negligible (c_i ≫ c_r, c_h ≈ c_i; small but expensive items). Holding cost ∝ item-hours in inventory = shaded area between the arrivals step curve and D(t); no longer depends on n alone.

  • Optimality condition: each line P_iP_{i+1} (top of a step to the next) must be parallel to the tangent of D(t) at the receiving time.
  • Graphical procedure: 1) choose P1; 2) move across horizontally to T1 on D(t); 3) from P1 draw a line parallel to the tangent to D(t) at T1; 4) draw a vertical line from T1; 5) the intersection is P2; repeat until past t_max. If you don't end exactly at (t_max, D(t_max)), perturb P1 and redo. Insightful but tedious by hand (Exercise P3 asks you to improve an initial feasible solution this way).

Continuous approximation (CA)

CA replaces the search for discrete t_i with a search for a continuous function (e.g. headway H(t)) that then yields the t_i. Benefits: continuous functions are easier to optimize; works for large systems. Requirement: discrete elements vary slowly, D'(t_i) ≈ D'(t_{i+1}).

CA for lot sizing (case 2). Intervals I_i = [t_{i−1}, t_i], headway step function H_s(t) = t_i − t_{i−1} on I_i. Cost per interval = c_f + c_i·area_i with area_i = ½(t_i − t_{i−1})² D'(t'_i). Rewriting as an integral and replacing H_s(t) by a smooth H(t) and D'(t'_i) by D'(t):

cost \approx \int_0^{t_{max}} \left( \frac{c_f}{H(t)} + \frac{c_i H(t)}{2} D'(t) \right) dt

The integrand is an EOQ at every t, so:

H^*(t) = \sqrt{\frac{2 c_f}{c_i D'(t)}} \qquad cost^* \approx \int_0^{t_{max}} \sqrt{2 c_i c_f D'(t)}\, dt \qquad \frac{cost^*}{item} \approx \frac{\int_0^{t_{max}} \sqrt{\frac{2 c_i c_f}{D'(t)}}\, D'(t)\, dt}{\int_0^{t_{max}} D'(t)\, dt}

From H*(t) to real times: plot H*(t); draw a 45° line from t0; draw a horizontal line from a point P1 so that the area under the continuous H*(t) equals the area under the step; t1 is where the horizontal meets the 45° line; repeat from t1 for t2, etc.

CA for freight terminal location (space instead of time)

A line from 0 to d_max (corridor/country); terminals at d1, d2, …; a truck collects at the terminals and hauls to a depot at d̃ ≥ d_max. D(d) = cumulative flow up to d, D'(d) = demand density (items/km), c_s = fixed cost per terminal stop, c'_d = access cost per item-km.

  • Line-haul cost = c_s·n_s; access cost = c'_d × item-km travelled to the nearest terminal.
  • Same trade-off as EOQ: many stops → low access, high line-haul; few stops → the reverse.
  • Terminal i serves the segment between midpoints m_{i−1} and m_i (m_i = (d_i + d_{i+1})/2); spacing s(d_i) = m_i − m_{i−1}. Access item-km in segment i ≈ ¼ s² D'(d_i) (average access distance is s/4).

\text{Total cost} \approx \int_0^{d_{max}} \left( \frac{c_s}{s(d)} + \frac{c'_d\, s(d)}{4} D'(d) \right) dd \qquad s^*(d) = 2\sqrt{\frac{c_s}{c'd D'(d)}} \qquad cost^* \approx \int_0^{d{max}} \sqrt{c_s c'_d D'(d)}\, dd

Denser zones (large D') → terminals closer together. Cost per item = cost* / D(d_max).

Example (FR–BE–NL): c_s = €850, c'_d = €2; cumulative demand 5,000 at 200 km, 15,000 at 400 km, 40,000 at 500 km → D' = 25 (FR), 50 (BE), 250 (NL) items/km.

cost^* \approx \sqrt{850 \cdot 2}\left(200\sqrt{25} + 200\sqrt{50} + 100\sqrt{250}\right) = 41.23 \times 3{,}995.3 \approx 164{,}732.6

(Computed here: optimal spacing s* = 8.2 km in FR, 5.8 km in BE, 2.6 km in NL; cost per item ≈ 164,733/40,000 ≈ €4.12.)

Accuracy of CA

Best when D'(t) or D'(d) varies slowly over one headway/spacing; still good with moderate variation (objective is convex in the local decision); can over- or under-predict in unfavourable cases.

Exam traps and checklist

The errors below are the ones the slides themselves warn about, or that their worked examples make easy.

  • Error sign: E = A − F; over-forecasting gives a negative error. CFE shows bias; MAD and MSE do not.
  • Exponential smoothing start: with no previous forecast, use the naive one (F2 = A1).
  • Trend-adjusted ES: update S first, then T using the new S, then FIT = S + T.
  • Seasonal index: divide by that year's average, then average the indices over the years.
  • Covariance: the slides use 1/n. The determinant must be computed per class; the C2 likelihood dominates when x lies near C2's points.
  • Pseudo-count: full Bayes uses 1/(n_ci + Π m_j); Naive Bayes uses 1/(n_ci + m_j) per attribute. Only apply it when the count is 0.
  • Precision vs recall: precision = TP/(TP + FP), the purity of the cluster; recall = TP/P, how much of the class was captured.
  • Lance–Williams: check that single link gives the min and complete link gives the max.
  • EOQ units: D, H and S must all be on the same time basis. Reorder point R = d · L uses the daily rate if L is in days. In the Star example on the slides, c_h is per year but D' is per day.
  • Constrained multi-item EOQ: first check whether Σ c_i EOQ_i ≤ C. Scale by m only if the constraint binds.
  • EPQ: the holding term uses I_max = Q(1 − d/p), not Q.
  • Periodic review: safety stock covers RP + L (√(RP+L) · σ_t), not only L.
  • Newsvendor: build the full payoff matrix and weight each row by the demand probabilities.
  • Modelling: list sets, parameters, variables, objective, constraints and domains. Either-or conditions need big-M with a binary variable. Never list two conflicting constraint sets together, as in the F/G regions or the no-overlap scheduling constraints.
  • Fixed charge: min fy + p x combined with x ≤ My. Leaving out the linking constraint lets y = 0.
  • Multi-knapsack: don't forget Σ_j x_ij ≤ 1. Bin packing uses = 1 together with CAP_j y_j.
  • Coverage: a parameter a_ij multiplies x_j, never d_ij · x_j ≤ K. Covering gives a lower-or-equal objective compared with partitioning.
  • Dijkstra: take the smallest unvisited tentative distance, update only unvisited neighbours, and record predecessors so you can backtrack the path.
  • Cumulative diagrams: vertical distance = number of items; horizontal distance = time.
  • Daganzo costs: rent scales with the maximum headway; transport cost per item falls with the average headway. Equal headways are best.
  • v = min{√(B/A), v_max}:* always check capacity.
  • EOQ robustness: z0/z* = ½(γ + 1/γ). An input changed by a factor δ changes v* and z* by √δ.
  • Variable demand: when rent dominates, use equal shipment sizes timed at D(t_i) = (i/n)D(t_max). When rent is negligible, segment P_iP_{i+1} is parallel to the tangent at the receipt time.
  • CA formulas: H*(t) = √(2c_f / (c_i D'(t))) for lot sizing; s*(d) = 2√(c_s / (c'_d D'(d))) for terminal location. Note the factor 2 and the ¼ from the average access distance of s/4.
Disclaimer. AI-assisted research for educational purposes — not financial advice. Verify figures with the company’s own filings before making decisions.
← Back to all reports