VerifiedEvidence: highv1.0.0

Event Queue

The ordered list of scheduled future events awaiting execution within a discrete event simulation, sorted by the time each is due to occur.

Last reviewedDarrin Baines IP Ltd

Concept Architecture

Concept

Theoretically, Event Queue is the ordered data structure used in discrete event simulation to maintain all scheduled future events according to their occurrence times. It ensures that events are executed in chronological order, allowing the simulation clock to advance directly from one event to the next rather than progressing in fixed time increments. In health economics, event queues underpin discrete event models of patient pathways, healthcare resource utilisation and operational systems.

Mathematically, an event queue is represented as a time-ordered priority queue in which each scheduled event is assigned an occurrence time. At each simulation step, the event with the smallest scheduled time is removed from the queue, executed and replaced by any newly scheduled events. There is no universally recognised canonical mathematical formula.

In practice, event queues are implemented within discrete event simulation software using efficient priority queue algorithms such as binary heaps or balanced trees. Event times are generated from probability distributions estimated from clinical, epidemiological or operational data. During simulation, the queue manages the sequence of patient events, ensuring correct temporal ordering and accurate estimation of costs, health outcomes and resource use.


Purpose

Used to manage the chronological execution of scheduled events in discrete event simulation, ensuring accurate modelling of patient pathways, healthcare processes and resource allocation over continuous time.


Mathematical Formulae

Primary Formula

There is no universally recognised canonical mathematical formula.

Supporting Formulae

Selection of the next event:

t???? = min(t?, t?, ?, t?)

where:

  • t? = scheduled occurrence time of event i
  • t???? = time of the next event to be executed

Simulation clock update:

t ? t????

Related Mathematical Methods

  • Priority queue algorithms
  • Event scheduling algorithms
  • Discrete-event simulation
  • Monte Carlo simulation
  • Queueing theory

Example

A discrete event simulation contains four scheduled events:

EventScheduled Time (days)
Outpatient appointment5
Hospital admission12
Treatment initiation8
Follow-up review20

The event queue selects the outpatient appointment at day 5, advances the simulation clock to day 5, executes the event, schedules any resulting future events and reorders the queue before processing the next event at day 8.


Excel Implementation

FunctionExample FormulaHealth Economics Application
MIN=MIN(B2:B10)Identify the next scheduled event time
SORT=SORT(A2:B10,2,TRUE)Maintain events in chronological order
MATCH=MATCH(MIN(B2:B10),B2:B10,0)Locate the next event in the queue
INDEX=INDEX(A2:A10,MATCH(MIN(B2:B10),B2:B10,0))Return the next event to execute

VBA (Optional)

Automate maintenance of the event queue by inserting, removing and chronologically ordering scheduled events during simulation.


Sources

  • Karnon J, Stahl J, Brennan A, et al. Modeling using discrete event simulation: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force-4. Medical Decision Making. 2012;32(5):701?711.
  • Banks J, Carson JS, Nelson BL, Nicol DM. Discrete-Event System Simulation. 5th ed. Pearson.
  • Law AM. Simulation Modeling and Analysis. 5th ed. McGraw-Hill.
  • Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press; 2006.
  • Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW. Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.

Library

Publications

1
  • Journal article

    Modeling Using Discrete Event Simulation: A Report of the ISPOR-SMDM Modeling Good Research Practices Task Force-4 — Karnon, Stahl, Brennan, Caro, Mar & Moller, Task Force Report 4 ed., 2012 (Value in Health / Medical Decision Making)

    Best-practice guidance on discrete event simulation (DES) for health economic evaluation — when DES is preferable to cohort approaches, and how to structure, populate and validate such models.

Frequently Asked Questions (6)

  • What is an event queue?

    The ordered list of scheduled future events awaiting execution within a discrete event simulation, sorted by the time each is due to occur.

    Source: Law & Kelton 2000

  • How does the event queue keep a simulation in order?

    The event queue holds all events that have been scheduled but not yet happened, kept sorted by the time each is due. The simulation always takes the earliest event from the front of the queue, advances its clock to that time, and carries the event out, which may add further events to the queue in their proper place. Processing events strictly in time order this way ensures the model handles them in the sequence they would really occur. Pidd (2004) describes this structure.

    Source: Pidd 2004

  • How does an event queue work?

    An event queue works by holding scheduled future events in order of their occurrence time, so the earliest is always at the front. The simulation takes the next event from the queue, advances the clock to its time, and processes it, which may schedule new events that are inserted into the queue in time order. This continues, with events removed as they are processed and added as they are scheduled, so the queue always reflects the pending events and their order.

    Source: Law & Kelton 2000

  • Why is the event queue important in a simulation?

    The event queue is important because it organises the events that drive a discrete event simulation, ensuring they are processed in the correct time order. By keeping scheduled events sorted by time and always providing the earliest next, it lets the simulation advance from event to event correctly, skipping the intervals between. Without the event queue, the model could not maintain the proper sequence of occurrences, so it is the central structure that coordinates the timing and processing of events.

    Source: Law & Kelton 2000

  • How are events added to and removed from the event queue?

    Events are added to the event queue when they are scheduled, inserted at the position corresponding to their occurrence time so the queue stays ordered, and removed when they are processed, taken from the front as the earliest pending event. Processing an event may schedule further events, which are then inserted. This continual insertion and removal, always maintaining time order, is how the simulation manages the flow of events, so the queue's efficient handling of these operations affects the simulation's performance.

    Source: Law & Kelton 2000

  • How does the event queue drive the simulation clock?

    The event queue drives the simulation clock by determining the next time to which the clock advances: the simulation takes the earliest event from the queue and moves the clock directly to that event's time, skipping the interval since the last event. Because the state changes only at events, the clock jumps from one scheduled event to the next rather than ticking continuously. The event queue thus governs the progression of time, advancing the clock to each successive event as it is processed.

    Source: Law & Kelton 2000

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 6 Oct 2025

Content version: 1.0.0

Canonical Identity

Term code
HE-EM-DES-009

Stable URI · Machine-readable · Resolvable · CC BY 4.0