Algorithm for Event-Scheduling Approach
main (executive routine):
1. set CLOCK = 0
2. set cumulative statistics to 0
3. define initial system state (queue empty, server idle)
4. generate the occurrence time of the first arrival and place in future events list
5. select the next event on the future events list (arrival or departure event)
6. advance simulation CLOCK to time of next event
7. execute the next event (arrival or departure event)
8. if not terminating condition for simulation run goto step 5