Queueing Simulation — Modeling and Analysis of Waiting-Line Systems
- Introduced by
- Agner Krarup Erlang
- Year
- 1909
- Type
- Stochastic simulation / analytical modeling
- Family
- Simulation / optimization
What does it do?
Queueing Simulation combines classical queueing theory with discrete-event simulation to model systems where entities arrive, wait for service, and depart.
It predicts performance metrics such as average waiting time, queue length, and server utilization, enabling capacity planning and bottleneck identification across service, manufacturing, healthcare, and network systems.
The intuition behind the method
Whenever customers wait in line — at a bank, in a hospital emergency room, or in a computer network — a queue forms. The system's behavior depends on how fast entities arrive, how long service takes, and how many servers exist. Queueing Simulation captures these dynamics by replaying the random arrival and service processes many times, measuring average waiting times and congestion. Unlike a pure formula, simulation handles complex schedules, multiple queue types, and non-standard distributions that closed-form equations cannot solve.
History
Queueing theory was founded by Danish engineer Agner Krarup Erlang in 1909 while studying telephone exchange congestion at Copenhagen Telephone Company. His Erlang-B and Erlang-C formulas remain in use today. The field was formalized by Kendall (1953) with his notation, and by Kleinrock (1975) for computer networks. Simulation-based queueing analysis emerged as computers made large-scale stochastic modeling feasible in the 1960s–1970s.
When to use it
Use Queueing Simulation when a system involves entities waiting for shared resources and you need quantitative performance predictions — call centers, emergency departments, manufacturing lines, computer networks, logistics hubs. Prefer simulation over analytical queueing models when distributions are non-Markovian, service processes are state-dependent, or multiple interacting queues make closed-form solutions intractable. Do NOT use when the system has no congestion dynamics, when deterministic scheduling suffices, or when sample data on arrival and service times is too sparse to fit input distributions reliably.
Limitations and considerations
- Requires sufficient empirical data to fit arrival and service distributions; poor input models yield misleading outputs.
- Steady-state estimation demands careful warm-up period deletion and replication planning, which is non-trivial.
- Simulation run time can be large for complex networks or rare-event estimation.
- Results are stochastic estimates with confidence intervals, not exact values — requires statistical interpretation.
- Model validation is essential but difficult; a plausible model can give systematically biased results if assumptions are wrong.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Handles complex, non-Markovian arrival and service distributions that closed-form queueing formulas cannot address.
- Models multi-server, multi-queue networks with routing, priorities, and finite buffers in a unified framework.
- Little's Law provides an internal consistency check independent of distribution assumptions.
- Supports what-if analysis and capacity planning by varying system parameters without physical experimentation.
- Output confidence intervals give statistically rigorous uncertainty quantification for decision-making.
- Widely validated across diverse domains: telecommunications, healthcare, manufacturing, and transportation.
Applications
- Hospital emergency department capacity planning and triage priority optimization.
- Call center staffing and service level agreement compliance analysis.
- Network router buffer sizing and packet delay estimation in telecommunications.
- Manufacturing line throughput analysis and bottleneck identification.
- Airport check-in and security lane configuration for passenger flow management.
- Cloud computing resource allocation and job scheduling under variable workloads.
How it works
How it works
Define the system boundary: identify entity types (customers, jobs, packets), servers (resources), queue discipline (FIFO, priority, round-robin), and capacity limits. Specify the network topology — single queue, tandem queues, or a general queueing network with routing probabilities between nodes.
Fit arrival and service time distributions to observed data. Common choices are Poisson arrivals (rate lambda) and Exponential service times (rate mu), forming the M/M/c family. For real systems, use Erlang, Gamma, or empirical distributions fitted via goodness-of-fit tests. Validate input models before running simulation.
Formula
\lambda \sim \text{Poisson}(\lambda),\quad S \sim \text{Exp}(\mu)Select the Kendall notation model (A/B/c/K/N/D): arrival distribution / service distribution / servers / capacity / population / discipline. Verify stability condition rho = lambda divided by (c times mu) is less than 1; otherwise the queue grows without bound. For analytically tractable cases, compute closed-form steady-state metrics as a benchmark.
Formula
\rho = \lambda / (c \cdot \mu) < 1
Run a discrete-event simulation: the event calendar advances through arrival events, service-start events, and departure events. For each replication, entities are generated from the fitted distributions, routed through the system, and statistics collected. Run sufficient replications (or a long single run with warm-up deletion) to achieve steady-state estimates.
Estimate key performance measures: mean number in system L, mean number in queue Lq, mean time in system W, and mean waiting time Wq. Little's Law (L = lambda times W) links these quantities and serves as a consistency check. Compute server utilization rho and probability of waiting or being blocked.
Formula
L = \lambda W,\quad W_q = L_q / \lambda
Construct confidence intervals for each performance metric using batch means or independent replications. Conduct sensitivity analysis by varying arrival rates, service rates, or server counts to identify bottlenecks. Compare design alternatives (e.g., adding a server, changing discipline) using ranking-and-selection or common-random-numbers variance reduction.
Common pitfalls
- Ignoring the warm-up (transient) period leads to biased steady-state estimates that mix initial empty-system behavior with true performance.
- Assuming Poisson arrivals without testing the data; overdispersed or bursty arrivals (e.g., in networks) require heavier-tailed distributions.
- Reporting a single simulation run as if it were a deterministic result, without confidence intervals or replication.
- Treating an unstable queue (rho >= 1) as if it reaches steady state — the model will simply show ever-growing queues.
- Confusing throughput with utilization: a server can be 90% utilized while throughput is still limited by upstream bottlenecks.
Frequently asked questions
When should I use simulation instead of the M/M/c formula?
Use simulation when service or arrival distributions deviate significantly from exponential (e.g., deterministic service, high variance), when multiple queues interact with routing, when servers have breakdowns or schedules, or when you need transient (time-dependent) performance rather than steady-state averages.
How many replications do I need?
There is no universal answer. A pilot study of 5–10 replications estimates variance; then use the formula n = (z * s / epsilon)^2 to find the number needed for a desired half-width epsilon at confidence level z. Typically 20–50 replications suffice for moderate precision, but rare-event problems may need thousands.
What is Little's Law and why does it matter?
Little's Law states L = lambda * W: the long-run average number in the system equals the arrival rate times the average time spent in the system. It holds for virtually any stable queue regardless of distribution and is useful as a sanity check on simulation output.
How do I know if my queue is stable?
For a single-server queue, the traffic intensity rho = lambda / mu must be strictly less than 1. For c servers, rho = lambda / (c * mu) < 1. If rho >= 1, the queue is unstable and grows without bound; no steady-state distribution exists and simulation results will show ever-increasing waiting times.
Can queueing simulation handle priority queues and preemption?
Yes. Discrete-event simulation naturally accommodates multiple priority classes, preemptive and non-preemptive scheduling, and dynamic priority rules. Analytical results exist only for M/M/c/PR (preemptive resume priority) under Poisson arrivals; for other priority structures, simulation is the standard approach.
Related methods
Sources
Kleinrock, L. (1975). Queueing Systems, Volume 1: Theory. Wiley-Interscience, New York.
ISBN: 978-0471491101Copied.Law, A. M. (2015). Simulation Modeling and Analysis (5th ed.). McGraw-Hill Education, New York.
ISBN: 978-0073401324Copied.