Queueing & Staffing Lab.
Requests show up at random, not on a schedule. So a help desk or inspection crew that’s busy only 80% of the time can still keep people waiting way too long. Set how many requests come in, how long each job takes and how many people are on duty. Then see what share get answered within your target wait, and the fewest staff that reach 90%.
How many inspectors keep waits short?
Goal met: 93.6% of requests are answered within 15 min, with inspectors busy 67% of the time. With one fewer, inspectors would still have free time (busy 80% of the time), yet only 73.8% would be answered in time.
Demand and capacity
Click a spot on the surface, or a column in the service-level chart, to jump there. Changing inspection time or the target wait reshapes the surface. Changing requests per hour or inspectors just moves the marker.
Service level by number of inspectors · 12 requests/hr
service level (left) average wait, min (right) current crew: 6 fewest for 90%: 6
How long requests wait · 6 inspectors
72% never waitaverage 2.8 minp90: 90% wait ≤ 10.5 min93.6% within 15 min
How many people do you need to hit a wait-time target?
Take 12 requests an hour, 20-minute inspections and 6 inspectors. Erlang C gives the chance a request has to wait at all, and how spread out the waits are. A goal like “90% within 15 min” needs that spread, not just the average. Below, a is the workload in erlangs: how many inspectors the work would keep busy full time. ρ is the share of time each inspector is busy.
a = λ/μ = 12 × 20/60 = 4.00 erlangs · ρ = a/c = 66.7%C(c, a) = 0.285 (Erlang B recursion, then C = B / (1 − ρ(1 − B)))P(Wq > t) = C · e^−(cμ−λ)t = 0.285 · e^−(18.00 − 12)·0.250 = 6.4%SL = P(Wq ≤ 15 min) = 93.6%How do the averages fit together?
Over the long run, the average number of requests waiting equals the arrival rate times the average wait: Lq = λWq. The same goes for the whole system, waiting plus being served: L = λW. Little’s Law can’t pick the crew size by itself. It checks that Erlang C’s averages agree with each other, as long as the units match.
Lq = λ·Wq = 12/hr × 0.0475 hr = 0.57 waitingL = λ·W = 12/hr × 0.381 hr = 4.57 in systemL − Lq = λ/μ = 4.00 inspectors busy on averageThe example: mechanics call for inspections, and a crew of quality inspectors works through them from one shared list. The goal is to answer 90% of calls within the target wait. Erlang C makes a few assumptions. Calls arrive at random (a Poisson process), and inspection times vary at random (exponential). Any inspector can take any call, the list has no limit, and nobody gives up waiting.
How the model works, how it’s checked and what it leaves out
How it works
This is an M/M/c queue, shorthand for random arrivals, random service times and c servers. Requests arrive at random at an average of λ per hour (Poisson arrivals). Inspection times are random too (exponential), and they average 1/μ. There are c identical inspectors and one shared first-come, first-served list. The list has no limit, and nobody gives up waiting.
The workload is a = λ/μ, and utilization, the share of time each inspector is busy, is ρ = a/c. The chance of waiting, C(c, a), comes from a step-by-step formula called the Erlang B recursion. It goes B(k) = aB(k−1) / (k + aB(k−1)), then C = B / (1 − ρ(1 − B)). That route skips giant factorials (like 200 × 199 × … × 1), so it stays accurate even with many inspectors.
Service level, the share who wait t or less, is P(Wq ≤ t) = 1 − C·e^−(cμ−λ)t. The averages are Wq = C / (cμ − λ), W = Wq + 1/μ, Lq = λWq and L = λW. When ρ ≥ 1 the line never settles (there’s no steady state). Waits show as ∞, and service level counts as 0. “Inspectors needed” is the smallest c that keeps up and reaches 90% within the target.
The surface shows that service level for every c from 1 to 15 and λ from 2 to 30/hr, at the current inspection time and target. λ is sampled every 0.25/hr. You can’t hire part of an inspector, so the surface steps from one whole number to the next.
How it’s checked
The step-by-step Erlang C matches the textbook factorial formula to about 1e−15 at every slider setting. At c = 200 the factorial version overflows (its numbers get too big for the computer), but the step-by-step one doesn’t. Adding an inspector never lowers the service level, and raising λ never raises it. Any ρ ≥ 1 is flagged as a line that never settles.
Little’s Law is checked against numbers worked out a different way. The M/M/c model gives pₙ, the chance of exactly n requests in the system. Adding up line lengths straight from those, Σ(n − c)pₙ and Σn·pₙ, matches Lq = λWq and L = λW. The average number of busy inspectors, Σmin(n, c)pₙ, equals λ/μ. As λ → 0 the wait goes to 0. The orange line on the surface agrees with the “inspectors needed” search at every whole λ.
What it leaves out
Demand stays the same across shifts, there are no rush jobs, and every inspector can cover every area and task. There’s no travel time, no breaks and no batching of jobs. Inspection times always follow the exponential pattern, and nobody gives up waiting. If any of these matter, switch to an approximate formula such as Allen–Cunneen or Erlang A. Or use a simulation that plays out each request one at a time (discrete-event simulation).