Queueing Simulation — Modeling and Analysis of Waiting-Line Systems

Decision Sciences
Introduced by
Agner Krarup Erlang
Year
1909
Type
Stochastic simulation / analytical modeling
Family
Simulation / optimization

What does it do?

Queueing Simulation uses discrete-event simulation to model systems in which entities arrive, wait for a shared resource, and then depart.

It is applied when queueing theory alone cannot give the required performance measures, such as average waiting time, queue length, and server utilization. These estimates support capacity planning and the identification of bottlenecks in service, manufacturing, healthcare, and network systems.

The intuition behind the method

Whenever customers wait in line, at a bank, an emergency room, or a computer network, a queue forms. Its behavior depends on how quickly entities arrive, how long service takes, and how many servers are available. A queueing simulation reproduces these random arrival and service processes over a long run and records the waiting times and congestion that result. Closed-form queueing formulas cover only a narrow set of assumptions, such as exponential service; simulation can represent more complex schedules, several queue types, and non-standard distributions.

History

Queueing theory traces to Agner Krarup Erlang, a Danish engineer who in 1909 studied telephone exchange congestion at the Copenhagen Telephone Company; his Erlang-B and Erlang-C formulas are still in use. The Kendall notation, used throughout this page to classify queues by arrival process, service process, and number of servers, was developed later in the same tradition, and Kleinrock (1975) addressed queueing systems relevant to computer networks. Simulation-based queueing analysis became practical as computers made large stochastic models feasible.

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 gives a consistency check on output for stable queues that does not depend on the particular arrival or service distributions.
  • Supports what-if analysis by changing arrival rates, server counts, or queue disciplines without physical experimentation.
  • Confidence intervals on each metric quantify the sampling uncertainty of the estimates, which is needed when comparing design alternatives.
  • Can represent priority classes, finite buffers, and routing between queues, which many closed-form models treat only under restrictive assumptions.

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

1

Define the system boundary: entity types (customers, jobs, packets), servers, queue discipline (FIFO, priority, round-robin), and capacity limits. Specify the network structure, whether a single queue, tandem queues, or a general network with routing probabilities between nodes.

2

Fit arrival and service-time distributions to observed data. Poisson arrivals are equivalent to exponential interarrival times with rate lambda, and exponential service times with rate mu give the M/M/c family. For real systems, Erlang, Gamma, or empirical distributions may fit better; select them with goodness-of-fit tests and validate the fitted input models before running the simulation.

Formula
N(t) \sim \text{Poisson}(\lambda t),\quad A \sim \text{Exp}(\lambda),\quad S \sim \text{Exp}(\mu)
3

Select the Kendall notation (A/B/c/K/N/D): arrival distribution / service distribution / number of servers / capacity / population / queue discipline. Check the stability condition rho = lambda / (c times mu) < 1; if it is not met, the queue grows without bound and no steady state exists. Where an analytical case is tractable, compute closed-form steady-state metrics as a benchmark.

Formula
\rho = \lambda / (c \cdot \mu) < 1
4

Run a discrete-event simulation in which the event calendar advances through arrival, service-start, and departure events. In each replication, entities are generated from the fitted distributions, routed through the system, and statistics are recorded. Remove the initial transient, either by a warm-up deletion rule applied to independent replications or by deleting the early part of one long run, so that the estimates describe steady-state behavior.

5

Estimate the mean number in system L, the mean number in queue Lq, the mean time in system W, and the mean waiting time Wq, together with server utilization and the probability of waiting or blocking. Little's Law (L = lambda times W) links these quantities and can serve as a consistency check on simulation output. Wq = Lq / lambda follows from the same relation.

Formula
L = \lambda W,\quad W_q = L_q / \lambda
6

Construct confidence intervals for each metric using batch means or independent replications. Vary arrival rates, service rates, or server counts to locate bottlenecks, and compare design alternatives such as adding a server or changing the queue discipline. Common random numbers is one variance-reduction option when comparing alternatives under the same input streams.

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. Bursty or overdispersed arrivals (e.g., in networks) violate the Poisson assumption, so the input model should be chosen to match the observed interarrival and count behavior and tested against the data before use.
  • 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.
  • Reading a station's utilization in isolation can mislead when routing sends traffic through several stations: the flow through the network, not any one station's busy fraction, determines system throughput, so utilization should be compared across all nodes after accounting for routing.

Frequently asked questions

When should I use simulation instead of the M/M/c formula?

Use simulation when service or arrival distributions depart substantially from exponential, when several queues interact through routing, when servers have breakdowns or schedules, or when transient (time-dependent) behavior is of interest rather than steady-state averages.

How many replications do I need?

The number depends on the output variance and the precision required, so it cannot be fixed in advance. A pilot run of a few replications gives an estimate of the output standard deviation s. Choose the number of replications so that the confidence-interval half-width for the mean falls below the target value. Because a pilot is small, its standard deviation is itself uncertain, so recheck the achieved half-width after the main runs and add replications if it is still too wide. Rare-event problems can require very many replications.

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 accommodates multiple priority classes, preemptive and non-preemptive scheduling, and dynamic priority rules. Analytical results do exist for some priority structures, for example single-server M/G/1 models with priority classes, but for networks, general routing, or dynamic rules simulation is commonly the practical approach.

Related methods

Sources

  1. Kleinrock, L. (1975). Queueing Systems, Volume 1: Theory. Wiley-Interscience, New York.

    ISBN: 978-0471491101
  2. Law, A. M. (2015). Simulation Modeling and Analysis (5th ed.). McGraw-Hill Education, New York.

    ISBN: 978-0073401324