CS 153 Data Structures I
Programming Assignment #14

Due: 11/29/01

This programming assignment is designed to explore some of the important aspects in performing a simulation. You may write this program in either the Dialog or Console modes.

OVERVIEW: The simulation will be that of a large retail store. The important events in the simulation are:

The main question to answer with your program is; how many checkout Qs are required so that no shopping party must wait longer than 5 minutes (300 seconds) before reaching the front of the Q.

Start your program with 1 checkout Q. If during the simulation a party must wait longer than the maximum time then reinitialize all of your program variables including TIME = 0 and try the simulation with 2 Qs. Continue increasing the number of Qs until your program runs to completition without violating the MAX wait time.
(NOTE: this reinitializing and restarting with 1 additional Q should be automatic and not require operator intervention.)

The required output summary statistics include:

  1. Total vehicles to arrive
  2. Maximum vehicles in the parking lot at any one time (peak capacity)
  3. Total persons to arrive
  4. Maximum persons in the store at any one time (peak capacity)
  5. Maximum shopping parties in the store at any one time (peak capacity)
  6. Total items sold
  7. Average party shopping time
  8. Average time waiting in the checkout Q prior to reaching the front of the Q
  9. Average checkout time (not to include time waiting in Q)
  10. Total number of queues