A dock with c identical doors is a multi-server queue. Trucks arrive at random (a Poisson stream of rate lambda), wait in the yard in first-come order, and each occupies one door for a random unloading time S with mean E[S] and squared coefficient of variation cs2. The offered load is a = lambda E[S] doors and the door utilisation is rho = a / c; below rho = 1 a steady state exists.
Erlang C: P(wait) = B / (1 - rho (1 - B)), B from the Erlang-B recursion B(k) = a B(k-1) / (k + a B(k-1))
M/M/c wait: Wq = P(wait) E[S] / (c - a)
Allen-Cunneen (M/G/c): Wq ~ Wq(M/M/c) (ca2 + cs2) / 2 ca2 = 1 for Poisson arrivals
M/G/1 exact (Pollaczek-Khinchine): Wq = rho E[S] (1 + cs2) / (2 (1 - rho))
Little's law: L = lambda W turnaround T = Wq + E[S]
demurrage per truck = rate x max(0, T - free time), cost/h = c x crew cost + trucks/h x mean demurrage
- Variability costs time - the same average unloading time with cs2 = 3 instead of 0 makes the wait about (1 + 3)/2 = 2 times longer; a dock with fixed unloading times and steady arrivals waits far less.
- Appointments - scheduled slots remove most arrival randomness; only the lateness spread (a normal, cut at 3 sigma) is left. The simulation shows the gain, but Allen-Cunneen with the measured ca2 overestimates it, because scheduled arrivals are negatively correlated, which a formula that treats interarrival times as independent cannot see.
- Doors have diminishing returns - going from the last overloaded door count to one more removes almost all of the queue; every further door only adds crew cost. The cost chart finds the minimum by simulation, not by the formula.
- Same model in both pages - one seeded simulation (common random numbers) drives the 3D scene, the 2D plan, the charts and the timeline; the replay shows one 8-hour window of the long run, after a warm-up.
- Honest simplifications - identical doors and one trailer type, first-come service, no priority or live-load trucks, no shift changes or breaks, no driver detention rules beyond a single free time and hourly rate, no travel time in the yard, lognormal unloading times, appointment lateness symmetric and no no-shows. This is a teaching model, not a yard management system: real demurrage terms come from the carrier contract.