Skip to content
Mermaid templates

Discrete-Event Simulation Loop

Event-driven simulation engine — schedule, advance clock, execute, log.

Template previewMermaid
Rendering…

Make it your own.

flowchart LR
Init[Initial state +\nseed events] --> FEL[(Future event list)]
FEL --> Next{Events left?}
Next -- no --> Stats[Compute statistics]
Next -- yes --> Pop[Pop earliest event]
Pop --> Clk[Advance simulation clock]
Clk --> Exec[Execute event handler]
Exec --> Sched[Schedule new events]
Sched --> FEL
Exec --> Log[Log metrics]
Log --> FEL
Stats --> Out[Output report]