43 / Operations & risk
Queueing, staffing and service-cost trade-offs
Queueing models connect random arrivals, variable service and available stations to long-run waiting. An M/M/c model can compare staffing choices, provided its operating assumptions and stability condition are made explicit.
The business question
How much service capacity is needed to control waiting without unnecessary operating cost?
- Compare identical packing, help-desk or repair stations serving one shared queue.
- Evaluate a mean waiting-time target together with station and work-in-progress costs.
How the method works
Average demand below nominal capacity is necessary but does not eliminate queues. Randomly clustered arrivals and variable service create waiting even when staff are not busy all the time. In M/M/c, arrivals follow a stationary Poisson process, service durations are independent exponential variables, and c identical stations serve one first-come queue with no abandonment or finite-buffer blocking.
Utilisation is arrival rate divided by total service rate. At utilisation of one or more, this infinite-buffer model has no finite steady-state queue or mean wait. Below one, Erlang C gives the probability an arriving job must wait. Dividing that probability by spare service rate gives the mean queue wait, and Little’s law converts it to the mean number of jobs waiting.
The staffing comparison needs a decision objective. In this illustration, hourly cost includes station cost plus a holding or delay cost per queued order-hour. Search feasible station counts subject to a maximum mean queue wait. A mean target is not a percentile or individual completion guarantee. Short shifts, opening backlogs, serial production stages, correlated service and downtime may require a discrete-event simulation or more appropriate queue model.
The calculation
| Symbol | Meaning |
|---|---|
| lambda, mu | Arrival rate and service rate per station in the same time unit. |
| c, rho | Station count and average utilisation fraction. |
| Wq, Lq | Mean time in the queue and mean queued jobs; service time is excluded from Wq. |
A worked business example
ILLUSTRATIVE SCENARIO
Illustrative packing operation: identical stations receive orders from one common queue.
Inputs
- 48 arrivals per hour; mean service time 4 minutes, giving mu = 15 orders per hour per station.
- Current stations 4; R95 per station-hour; R60 per queued order-hour.
- Compare 1–12 stations, with a maximum mean queue wait of 5 minutes.
Work through the numbers
- At 4 stations, rho = 48/(4 × 15) = 0.8. Erlang C gives P(wait) = 0.5964325.
- Mean queue wait = 0.5964325/(60−48) = 0.0497027 hours = 2.982162 minutes.
- Mean queued orders = 48 × 0.0497027 = 2.385730; hourly cost = 4 × R95 + 2.385730 × R60 = R523.1438.
- At 5 stations, mean wait is 0.641234 minutes and total hourly cost is R505.7793.
- Counts 1–3 are unstable. Among the stable counts meeting the 5-minute mean target, 5 has the lowest cost in this example.
The recommendation is conditional on rates, cost assumptions, station range and the steady-state model. It is a candidate for operational validation, not a measured saving.
Explore the decision
Compare stable staffing choices. The live explorer has its own example inputs; it is separate from the worked calculation above.
Enable JavaScript to use this calculator. The worked example and executable Python remain available.
Apply it at work
- Measure arrival timestamps, service-start and service-end times over a comparable operating period.
- Check station comparability, rate changes, queue structure and whether the M/M/c assumptions are plausible.
- Calculate only stable options and compare the stated cost objective against the actual service requirement.
- Pilot the staffing choice and compare observed queue times, throughput, cost and employee workload with model expectations.
Check these assumptions
- Arrivals are stationary Poisson and independent of independent exponential service durations.
- Stations are identical and continuously available during the modelled operating condition.
- One first-come queue has unlimited waiting space and jobs neither abandon nor block arrivals.
- The decision concerns long-run average behaviour with consistent time units and defensible cost rates.
Common mistakes and how to avoid them
- At rho ≥ 1, reporting a negative or finite steady-state wait is a model error.
- Waiting cost per order-hour is not a once-off penalty per arriving order.
- Average service speed and average waiting targets do not describe the full tail of the customer experience.
How this can help the business
- The comparison makes the cost of too little capacity visible alongside the direct cost of another station.
- A model checked against timestamps can identify whether more capacity, lower variability or a different queue arrangement deserves a trial.
Choose the lowest-cost stable candidate meeting the actual service constraint, then validate its observed performance and revisit the model if assumptions fail.
When to use another approach
Use an M/G/1 or other queue where appropriate; use discrete-event simulation for downtime, opening queues, priorities, finite buffers or multiple interacting stages.
Reproduce the worked example in Python
The code is self-contained for this example. Dependencies and run instructions are included with the downloadable notebook.
Show executable code and recorded output
from math import factorial
arrival, service_rate = 48, 15
options = []
for stations in range(1,13):
rho = arrival / (stations*service_rate)
if rho >= 1:
continue
load = arrival / service_rate
tail = load**stations / (factorial(stations)*(1-rho))
normalizer = sum(load**k/factorial(k) for k in range(stations)) + tail
p_wait = tail / normalizer
wait_hours = p_wait / (stations*service_rate-arrival)
queued = arrival*wait_hours
cost = stations*95 + queued*60
if stations == 4:
print("Current wait minutes:",round(60*wait_hours,6))
print("Current model cost: R",round(cost,2))
if 60*wait_hours <= 5:
options.append((cost,stations,60*wait_hours))
best = min(options)
print("Lowest feasible cost stations:",best[1])
print("Selected wait minutes:",round(best[2],6))
print("Selected model cost: R",round(best[0],2))Recorded output
Current wait minutes: 2.982162 Current model cost: R 523.14 Lowest feasible cost stations: 5 Selected wait minutes: 0.641234 Selected model cost: R 505.78
Sources and further reading
Concepts are linked to primary teaching or technical sources. The business examples are illustrative applications, not reported client results.