Stochastic Queueing Simulation — Probabilistic Modeling of Waiting-Line Systems

Decision Sciences
Introduced by
Kendall, D. G.
Year
1953
Type
Stochastic simulation — waiting-line system analysis
Family
Simulation / optimization

What does it do?

Stochastic Queueing Simulation models waiting-line systems in which arrival and service times follow probability distributions rather than fixed rates.

Running many random sample paths of the system yields estimates of performance measures such as mean waiting time, mean queue length and server utilization under variability. It is used to design and evaluate service systems, such as hospitals and call centers, where closed-form formulas often do not apply.

The intuition behind the method

In most service systems, customers do not arrive at evenly spaced intervals, and service durations vary. Stochastic Queueing Simulation represents this variability by drawing inter-arrival and service times from fitted probability distributions, processing each customer event by event, and recording how queues build and drain over simulated time. The output is an empirical picture of performance, including infrequent but costly congestion episodes that M/M/c-type formulas do not capture for non-Markovian or networked configurations.

History

Kendall's 1953 paper provides the analytical background: it studies many-server queues with general inter-arrival times and exponential service, using an imbedded Markov chain, and it does not itself describe a simulation method. The event-driven simulation and output-analysis procedures described here are treated in textbook form in Law's Simulation Modeling and Analysis (5th edition, 2015).

When to use it

Choose this method when service or arrival times are not adequately described by exponential distributions, when the system has several interacting queues, state-dependent routing or finite buffers, or when demand varies over time. It suits capacity, staffing and service-level questions in which the distribution of waiting times matters, not only their mean. Do not use it when a simple M/M/c analytical model answers the question adequately, when there are too few observations to fit the input distributions credibly, or when a deterministic flow-balance calculation is what the question requires.

Limitations and considerations

  • Input distributions must be fitted to adequate data; a poor fit propagates into every output measure.
  • Run time grows with the number of replications and with system size, so large networks can require long computation.
  • Warm-up length and run length must be chosen deliberately; ignoring initialization bias distorts steady-state estimates.
  • Outputs are random, so each performance measure must be reported with a confidence interval.
  • Validating the model against real-system measurements requires access to operational data and knowledge of the process.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Accepts arbitrary inter-arrival and service distributions, including empirical distributions, without requiring Markovian assumptions.
  • Reproduces rare congestion episodes and tail behavior that closed-form formulas for mean performance do not report.
  • Handles networks of queues, such as tandem stages, routing branches and feedback loops, within a single model.
  • Yields full distributions of waiting times, supporting percentile-based service-level targets rather than means alone.
  • Scenario comparison, such as changing staffing levels or routing rules, requires changing inputs and re-running the model.
  • Results can be checked against Little's Law and, for configurations that reduce to a known queue, against analytical steady-state results.

Applications

  • Hospital emergency department capacity planning: simulating patient arrivals and triage service times to determine optimal nurse staffing by shift.
  • Call center dimensioning: estimating agent headcount needed to keep average wait below a service-level target across fluctuating demand patterns.
  • Airport security checkpoint analysis: modeling passenger inter-arrival distributions and screening service times to test alternative lane configurations.
  • Manufacturing job-shop scheduling: identifying bottleneck machines and buffer sizes in multi-stage production lines with stochastic processing times.
  • Internet router buffer sizing: simulating packet arrival bursts (heavy-tailed distributions) to set buffer capacities and assess drop probabilities.
  • Outpatient clinic appointment design: comparing walk-in versus appointment scheduling policies under realistic no-show and late-arrival distributions.

How it works

How it works

1

Specify the number of servers, the queue capacity, the customer population and the service discipline (for example FCFS, priority or round-robin). Record the model scope in Kendall notation, such as M/G/c/K, so that the assumptions are explicit.

2

Fit distributions to observed arrival and service data, giving inter-arrival times T_a ~ F_a and service times T_s ~ F_s (for example exponential, Erlang or lognormal). Goodness-of-fit tests such as Kolmogorov-Smirnov or chi-square check the fit before the simulation is run.

Formula
T_a \sim F_a(\cdot), \quad T_s \sim F_s(\cdot)
3

A pseudo-random number generator produces variates from F_a and F_s. A future-event list (FEL) holds scheduled arrival, service-start and departure events in time order, and the simulation clock advances from one event to the next.

4

Events are processed in sequence: an arriving customer joins the queue or enters service if a server is free, and a departure frees a server that takes the next waiting customer if one exists. Little's Law is used as a consistency check, L_q = λW_q for the queue and L = λW for the whole system, with λ the effective arrival rate. Because the law describes long-run averages, close agreement in a finite run is a consistency check rather than proof that the model is correct.

Formula
L_q = \lambda W_q \quad (\text{Little's Law})
5

Accumulate the sample mean waiting time W̄ = (1/N)ΣW_i, the mean queue length L_q, server utilization ρ and throughput λ_eff. Use L̄ = λW̄ as a check on the time-averaged number in the system. Keep the full empirical distribution of waiting times so that tail percentiles relevant to service-level targets can be estimated.

Formula
\bar{W} = \frac{1}{N}\sum_{i=1}^{N} W_i, \quad \bar{L} = \lambda \bar{W}
6

Run multiple independent replications so that initialization bias can be separated from steady-state behavior. For steady-state analysis, delete the warm-up observations (deletion method) or use batch means. Report confidence intervals for each performance measure and examine sensitivity to the fitted distributional parameters.

Common pitfalls

  • A single long run in place of several independent replications makes variance estimates unreliable and hides initialization bias.
  • Distributions fitted to very small samples can have poorly estimated tails, which are the congestion-relevant part of the output.
  • Assuming independence of successive inter-arrival or service times when batch arrivals or correlated service durations are present invalidates the input model.
  • Reporting mean waiting times without confidence intervals overstates the precision of a stochastic estimate.
  • Applying steady-state analysis to a transient question, such as a single peak day, or using transient termination rules in a steady-state study, gives misleading results.

Frequently asked questions

How many replications do I need for reliable estimates?

Run a pilot set of replications first and use its sample standard deviation s to estimate output variability. The number of replications needed for a desired confidence half-width h at confidence level z is then approximately n = (z * s / h)^2, where z is the normal quantile for the chosen confidence level. This approximation is reliable only when the pilot sample is large, because the pilot estimate of s is itself uncertain. Check the result and add replications if the resulting interval is still too wide.

When is an analytical M/M/c formula better than simulation?

When arrivals are Poisson, service times are exponential and the system is a single queue with multiple identical servers, the M/M/c formula gives exact steady-state results immediately. Simulation adds value when these assumptions fail, or when routing, finite buffers or multiple linked queues make the analytical model intractable.

How do I handle the warm-up period?

Identify the warm-up period by plotting a running average of the performance measure against simulation time, following Welch's method, and delete observations before the average settles. Alternatively, initialize the model in a condition close to steady state, such as with servers busy at the expected utilization level.

Can I use stochastic queueing simulation for non-stationary demand (e.g., rush-hour peaks)?

Yes. Model time-varying arrival rates using a non-homogeneous Poisson process or an empirical arrival-rate schedule. The simulation clock naturally tracks time-dependent queue dynamics that steady-state analytical formulas cannot represent.

How do I validate my simulation model?

Compare simulation output with historical measurements of the real system, check internal consistency with Little's Law (L = λW), and test extreme cases such as utilization approaching 0 or 1. Sensitivity analysis on the input distributions shows whether outputs respond plausibly to parameter changes.

Related methods

Sources

  1. Kendall, D. G. (1953). Stochastic processes occurring in the theory of queues and their analysis by the method of the imbedded Markov chain. The Annals of Mathematical Statistics, 24(3), 338–354.

    Open DOI reference
  2. Law, A. M. (2015). Simulation Modeling and Analysis (5th ed.). McGraw-Hill Education.

    ISBN: 9780073401324