Algorithm for Event-Scheduling Approach
1. if QUEUE is empty then
update SERVER idle time statistics
remove the customer from QUEUE
update QUEUE waiting time statistics
generate the occurrence time of the
departure event and place
departure event in future events list
2. destroy the current event