Thomas Eapen · Selected work
Exploring the assumptions behind a staffing model
A research-focused Erlang-C illustration: calculate, cross-check and compare scenarios while keeping the model’s assumptions explicit.
SELECTED PYTHON
The calculation
Offered load = arrivals per hour × mean service seconds ÷ 3,600. The function requires positive load below the number of interchangeable servers.
from math import isfinite
from scipy.stats import poisson
def erlang_c(load, agents):
if type(agents) is not int or agents < 1:
raise ValueError('Use a positive integer server count.')
if not isfinite(load) or not 0 < load < agents:
raise ValueError('A stable example needs 0 < load < agents.')
at_capacity = poisson.pmf(agents, load)
below_capacity = poisson.cdf(agents - 1, load)
return float(at_capacity / (
at_capacity + (1 - load / agents) * below_capacity
))Extracted from the new helper that computes this example.
Equivalent Excel probability expression
=POISSON.DIST(Agents,Load,FALSE) /
(POISSON.DIST(Agents,Load,FALSE) +
(1-Load/Agents)*POISSON.DIST(Agents-1,Load,TRUE))Agents and Load are named input cells. This expression is provided for comparison; Excel was not executed for this new example.
COMPUTED SCENARIOS
Inspect the sensitivity to capacity
| Servers | Must wait | Mean wait | Within 25s |
|---|---|---|---|
| 6 | 55.2% | 105.4s | 51.6% |
| 7 | 30.1% | 30.1s | 76.6% |
| 8 | 15.3% | 10.4s | 89.4% |
| 9 | 7.3% | 3.7s | 95.5% |
Mean wait = C × mean service time ÷ (servers − load). The within-threshold fraction is 1 − C × exp(−(servers − load) × threshold ÷ mean service time).
The research approachI explored these models in Excel and Python, then examined their limitations. This new study illustrates that approach with invented parameters and an independent implementation check. Agreement between formulas does not validate a real-world forecast.
State the assumptionsA stable long-run model with constant rates: Poisson arrivals, exponential service times, interchangeable servers, one unbounded FIFO queue and no abandonment. Skills-based routing and temporary surges need further investigation.