Algorithm for Event-Scheduling Approach
1. if SERVER is idle then
update server idle time statistics
generate the occurrence time of the
departure event and place
departure event in future events list
place the customer in QUEUE
update QUEUE length statistics
2. generate the occurrence time of the next
arrival and place arrival event in future events list