Discrete-event simulation

Model systems whose state changes at distinct moments, such as arrivals, service completions, failures, and departures.

On this page
  1. How discrete-event simulation works
  2. Common building blocks
  3. Use a process model when flow matters
  4. Example: an emergency department

How discrete-event simulation works

A discrete-event model changes at distinct event times: an item arrives, service starts, a machine fails, or work finishes. The simulator jumps to the next event instead of calculating every quiet moment in between.

Use it when arrivals, waiting, routes, schedules, or limited capacity determine what happens next.

Discrete-event exampleThe simulation clock advances to the next scheduled event

Nothing relevant changes between these events, so the simulator skips idle time.

  1. InitializeState established
  2. Arrival AQueue +1
  3. Arrival BQueue +1
  4. Service A doneResource released
Clock path0.0 → 3.2 → 4.1 → 8.7 seconds

Common building blocks

Build the smallest path that can answer your question, then add detail only when a run shows that it matters.

  • Source: creates incoming people, orders, vehicles, or parts.
  • Queue: holds work that cannot start yet.
  • Service: takes time and may have limited capacity.
  • Router: chooses the next path.
  • Sink: records work that has left the process.
Process exampleA basic discrete-event process

Entities enter through a source, pass through two activities, and then exit.

  1. SourceArrivals

    Poisson arrivals

    8 / h
  2. ActivityPreparation

    Triangular processing time

    8–18 min
  3. Limited capacityService

    Only 3 jobs can run at once

    3 slots
  4. OutputCompleted

    Finished items leave the model

Use a process model when flow matters

Process models work well for factories, hospitals, call centers, warehouses, maintenance, and transport, anywhere jobs move through steps and may wait for capacity.

Choose agents instead when individual behavior or location matters most. Choose stocks and flows when you only need totals changing over time.

Example: an emergency department

Start with arrivals, triage, treatment, and discharge. Give triage and treatment realistic times and capacity, then run a baseline. A staffing change may shorten the triage queue while increasing the treatment queue, so compare waiting and throughput across the whole path.