Simulation and Modelling > Introduction > Example of Discrete-Event Simulation
Single-server queue

Objective: to estimate expected average delay in queue (line, not service)
State variables
- Status of server (idle, busy) - needed to decide what to do with an arrival
- Current length of the queue - to know where to store an arrival that must wait in line
- Time of arrival of each customer now in queue - needed to compute time in queue when service starts
- Servicing time for each particular customer
Events
- Arrival of a new customer
- Service completion (and departure) of a customer
- Maybe - end-simulation event (a “fake” event) - whether this is an event depends on how simulation terminates (a modeling decision)