MATH 4810Computational Modelling

Module 05 · Unit 5.2

Discrete-Event Simulation

Model systems that queue. Entities arrive, wait for resources, receive service, and depart. Time advances irregularly, driven by events, and the output must be analyzed carefully to separate the transient from the steady state.

3 lessons ≈ 9 hours Laboratory 10 Feeds Assignment 5
  1. Unit 5.1
  2. Unit 5.2

§ Overview

A discrete-event simulation (DES) models a system in which entities move through a process, competing for resources and waiting in queues. The state of the system changes only at discrete points in time, called events, and the simulation clock advances from one event to the next rather than in fixed steps.

This unit covers the vocabulary of discrete-event systems (entities, events, resources, queues), the mechanism that drives the simulation (event calendars and clock advancement), and the output analysis that distinguishes the initial transient from the steady state.

Lesson 1

Entities, events, resources, and queues

Lesson 2

Event calendars and clock advancement

Lesson 3

Output analysis and warm-up bias

Laboratory 10

Discrete-event simulation

§ Learning outcomes

By the end of Unit 5.2 you will be able to

  • Identify the entities, events, resources, and queues in a discrete-event system.
  • Design an event calendar and clock-advancement mechanism for a simple system.
  • Implement a single-server queueing simulation in a spreadsheet.
  • Distinguish transient from steady-state behaviour and identify a warm-up period.
  • Apply replication with independent seeds to estimate steady-state performance measures.
  • Report simulation results with appropriate output analysis.

§ Lessons

§ The event-clock mechanism

A discrete-event simulation maintains an event calendar (also called a future-events list or event queue): a list of pending events, each with a timestamp. The simulation loop is:

  1. Remove the event with the earliest timestamp from the calendar.
  2. Advance the simulation clock to that timestamp.
  3. Process the event: update system state, and possibly schedule new events.
  4. Repeat until the calendar is empty or the clock exceeds the termination time.

The clock advances irregularly, skipping from one event timestamp to the next. There may be long idle periods between events, and the simulation does not spend time on them.

Event calendar and clock advancement A horizontal timeline marked with events at irregular intervals. The clock advances from one event to the next, not in fixed steps. Events are labelled by type: arrival, departure, and so on. time arrival arrival departure arrival departure arrival clock advances event to event, not in fixed steps
Figure 5.4. Event calendar and clock advancement. The clock jumps from one event timestamp to the next, skipping over the idle intervals in between.

No event calendar, no DES

A simulation that advances the clock in fixed steps and processes state changes at those steps is not a discrete-event simulation. The defining feature of DES is the event calendar: the model decides which event happens next, and the clock advances to that event's time.

§ Output analysis

A discrete-event simulation typically begins in an artificial state (empty system, no customers) and runs until a termination condition. The initial portion of the run is not representative of the steady state the model is usually meant to describe. Analysing output without accounting for this warm-up bias produces misleading results.

Two standard approaches to output analysis:

  • Warm-up removal. Run a single long simulation, discard the first W time units as warm-up, and compute statistics over the remaining period. Simple, but wastes the discarded portion.
  • Replication with warm-up. Run R independent replications, each starting in the same initial state, each discarding the first W time units. Compute the performance measure in each replication, then average across replications. More computation, but provides valid standard errors.

Choosing the warm-up period

There is no universal rule for choosing W. A common approach is to plot the cumulative-average performance measure over time and identify the point at which the curve stabilises. The warm-up period is at least that long.

§ Key terms

Entity
An object that moves through the system, receives service, and eventually departs. In a queueing model, the entities are usually customers, jobs, or patients.
Event
A point in time at which the state of the system changes. Arrival events create entities; departure events remove them.
Resource
A facility that serves entities. A resource has a capacity: the number of entities it can serve simultaneously.
Queue
A waiting line for a resource. Entities that arrive when the resource is busy join the queue and wait for their turn.
Event calendar
The list of pending events, ordered by their scheduled time. The simulation always processes the earliest event next.
Simulation clock
A variable holding the current simulated time. It advances to the timestamp of the next event.
Warm-up period
The initial portion of a simulation run that is discarded to remove transient bias before computing steady-state statistics.
Steady state
The condition in which the system's probability distribution no longer changes with time. The long-run behaviour of the model.

§ Self-check

Check your understanding

Question 1

In a discrete-event simulation, the clock advances:

Show answer

From one event to the next.

Question 2

Entities in a queueing model typically represent:

Show answer

Customers, jobs, or patients.

Question 3

The event calendar is:

Show answer

A list of pending events ordered by scheduled time.

Question 4

Warm-up bias occurs because:

Show answer

The initial state is not representative of steady state. Discarding the warm-up period removes this bias.

Question 5

Replication with warm-up refers to:

Show answer

Running many independent simulations, each with a warm-up period. This provides valid standard errors across replications.

👤