An Application of ADT Queue: Simulation
Tom Kelliher, CS23
Mar. 25, 1996
A technique for modeling the behavior of natural and man-made systems.
Useful for summarizing the performance of existing systems or predicting
the performance of proposed systems.
- Event: ``Something'' scheduled to happen.
- The notion of time in simulation: Event driven simulation.
- Obtaining good input data.
- Correctly modeling the system.
- Interpreting the results.
Customers at the First National Bank of Avarice are complaining of having
to wait too long in line. What should the bank president, Mon E. Baggs,
do:
- Continue serving customers with one teller?
- Use three tellers with three lines?
- Use three tellers with a single line?
What is our data?
What do we measure?
Data file is ordered pairs:
- Arrival time.
- Service time.
Assumptions:
- Upon arrival, customer immediately enters (shortest) teller line.
- When teller and customer finish:
- Customer immediately leaves.
- Next customer immediately begins service.
Attributes of an event:
- Time of occurrence.
- Activity, if any, to trigger.
What kinds of events:
- Arrival event: Get next arrival event. Additional information:
service time.
- Departure event: Service next customer, accumulate statistics.
From arrival event to departure event: where are the waiting customers?
What we need to keep track of:
- Time.
- Waiting customers.
- Events. (How many?)
- Input data.
- Statistics.
What ADTs can we use/do we need?
Is there a hierarchy to these ADTs?
How does it fit together?
Thomas P. Kelliher
Sat Mar 23 11:26:16 EST 1996
Tom Kelliher