Skip to content
Back to search results

Agent-Based Queueing Simulation

Introduced by
Macal, C. M. & North, M. J. (hybrid formalization); queueing theory rooted in Erlang (1909)
Year
2000s
Type
Hybrid simulation — agent-based + queueing
Family
Simulation / optimization
Font size

What does it do?

Agent-Based Queueing Simulation (AB-QS) combines agent-based modeling with queueing theory to simulate systems where autonomous, decision-making entities interact through waiting lines and service points.

Each entity (patient, customer, job) is modeled as an independent agent with its own state and behavioral rules, enabling richer, more realistic dynamics than classical queueing models alone.

The intuition behind the method

Classical queueing models assume homogeneous customers and fixed service rates. In reality, customers behave differently — some balk, some renege, some have priority. AB-QS treats every entity as an autonomous agent with its own rules (e.g., a patient who leaves if waiting time exceeds 30 minutes). This bottom-up approach lets emergent system-level behaviors — congestion patterns, cascading delays, fairness breakdowns — appear naturally from individual interactions, rather than being imposed as global assumptions.

History

Queueing theory dates to Erlang's 1909 telephone exchange work, while agent-based modeling emerged in the 1990s from complexity science (Schelling, Axelrod, Epstein). Their combination gained traction in the 2000s as simulation software (AnyLogic, NetLogo) made hybrid modeling practical. Healthcare operations research was an early adopter, using AB-QS to model emergency department flow and patient heterogeneity that classical Markovian models could not capture.

When to use it

Use AB-QS when the system has heterogeneous entities with distinct behavioral rules (balking, reneging, priority classes) that cannot be captured by homogeneous queueing assumptions, or when emergent phenomena (cascading congestion, fairness collapse) are of interest. Ideal for healthcare patient flow, airport security lanes, call-center staffing, and supply-chain bottleneck analysis. Do NOT use when all entities are statistically identical and simple analytical queueing formulas (M/M/1, M/M/c) are sufficient — the added complexity is unjustified. Also avoid when data on agent behavioral parameters (patience distributions, routing preferences) are unavailable, as uncalibrated behavioral rules can produce misleading results.

Limitations and considerations

  • Requires detailed specification of agent behavioral rules, which demands domain expertise and empirical calibration data.
  • Computationally expensive compared to analytical queueing formulas; large-scale systems may require high-performance computing.
  • Model validation is challenging — it is difficult to confirm that emergent behavior matches real-world dynamics without extensive observational data.
  • Results depend on the number of replications and random seed management; poor experimental design inflates variance.

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

Strengths

  • Captures heterogeneous entity behavior (balking, reneging, priority) that classical queueing models cannot represent.
  • Reveals emergent system-level phenomena arising from local agent interactions without assuming global equations.
  • Supports what-if policy testing by directly modifying agent rules and queue configurations.
  • Scales naturally to multi-stage, multi-queue systems with complex routing and feedback loops.
  • Produces rich, entity-level output enabling fairness and equity analysis across agent subgroups.

Applications

  • Emergency department patient flow modeling with heterogeneous patient severity and reneging behavior.
  • Airport security lane optimization accounting for traveler variability and adaptive routing.
  • Call-center workforce planning with agent-level skill differentiation and customer patience modeling.
  • Supply-chain bottleneck identification in multi-stage production queues with machine breakdowns.
  • Urban traffic intersection simulation with driver behavioral adaptation to congestion.
  • Vaccine distribution logistics with priority-class population segments and time-window constraints.

How it works

How it works

1

Define agent types representing entities in the system (e.g., customers, servers, resources). Specify each agent's attributes (arrival rate, patience threshold, priority class) and the environment (number of queues, servers, routing rules). This population specification replaces the homogeneity assumption of classical M/M/c models.

2

Model the queueing infrastructure: queue disciplines (FIFO, priority, shortest-job-first), number of servers, service-time distributions (exponential, Erlang, empirical), and routing logic between service stages. Queues are treated as shared resources that agents compete for, with explicit capacity and overflow rules.

3

Program agent decision rules governing how agents respond to queue state: balking (refuse entry if queue length exceeds threshold), reneging (leave after waiting too long), jockeying (switch to shorter queue), and adaptive routing. These behavioral rules differentiate AB-QS from purely stochastic queueing models.

4

Execute the simulation over a defined time horizon. The engine advances a global clock, processes arrival and departure events, triggers agent behavioral rules at each decision point, and updates queue states. Multiple replications with different random seeds are run to obtain statistically stable estimates.

5

Aggregate per-replication outputs across replications: mean and variance of waiting time, queue length distributions, server utilization, throughput, and agent-level outcomes (fraction balking/reneging). Confidence intervals are computed; sensitivity to behavioral parameters is assessed by varying agent rules.

Common pitfalls

  • Assuming agent behavioral parameters (e.g., patience distributions) without empirical data leads to plausible-looking but unreliable results.
  • Ignoring warm-up period bias: early simulation state (empty queues) distorts steady-state statistics if not discarded.
  • Confusing model complexity with model validity — adding more agent rules does not improve accuracy without corresponding validation evidence.
  • Running too few replications and reporting point estimates without confidence intervals understates output uncertainty.

Frequently asked questions

How does AB-QS differ from standard discrete-event simulation?

Standard DES models the system from a global process perspective and treats entities as passive. AB-QS gives each entity autonomous decision-making capability — agents actively respond to queue state (balking, reneging), which can produce qualitatively different system dynamics.

How many replications are needed?

A minimum of 30 replications is a common rule of thumb for initial estimates. For stable confidence intervals on rare events (e.g., extreme congestion), 100–1000 replications may be needed. Use a pilot study to estimate variance and determine the required sample size via confidence interval width criteria.

Can AB-QS be used for optimization, not just analysis?

Yes. AB-QS is often coupled with metaheuristics (genetic algorithms, simulated annealing) or response-surface methods to optimize queue configuration parameters (number of servers, scheduling rules) while honoring agent behavioral constraints. This is sometimes called simulation-based optimization.

What software supports agent-based queueing simulation?

AnyLogic is the most widely used platform, with native support for both agent-based and queueing libraries in a single model. Arena, Simul8, and SIMIO support queueing, while NetLogo and Mesa (Python) support agent-based modeling; combining both paradigms typically requires AnyLogic or custom code.

When should I prefer a classical M/M/c formula over AB-QS?

Use analytical queueing formulas when entities are homogeneous, arrivals are Poisson, service times are exponential, and you need a quick steady-state estimate. AB-QS is warranted when those assumptions fail — heterogeneous behavior, non-Markovian service, or transient (non-steady-state) analysis.

Related methods

Sources

  1. Macal, C. M., & North, M. J. (2010). Tutorial on agent-based modelling and simulation. Journal of Simulation, 4(3), 151–162.

    Open DOI reference
    Copied.
  2. Agent-based model. Wikipedia.

    Open publication reference
    Copied.