Faculty of Engineering and Information Sciences

Supermarket Simulation - Outline Problem Description

A program is required to simulate the operation of the tills in a supermarket. Its primary purpose is to simulate, for management inspection and analysis, queues of customers waiting to be served at a number of tills.

Specifically, the program is to initially accept the following simulation parameters:-

  1. the time at which the supermarket doors are opened (in hours and minutes)

  2. the time at which the doors are closed

  3. the maximum number of items a customer will purchase

  4. a mean time between arrival of customers (in minutes)

  5. a mean service time per item (in seconds)

  6. a standard deviation for the service time per item (in seconds)

  7. the number of tills to be used in the simulation (maximum 10).

It will also be necessary to enter a seed for the program's random number generator (allowing the program to be rerun with the same data).

It is assumed that service times are from a Normal Distribution, and arrival times from a Negative Exponential Distribution. Number of items bought by a customer is to be random from a Rectangular Distribution. See page 4 of the following 'Notes on the Simulation and High-level Design'.

The program is to produce the following results:

  1. the total number of customers served

  2. for this total, the average number of items bought by a customer

  3. for this total, the average time spent by a customer waiting in a queue

  4. the longest time spent by a customer waiting in any queue

  5. the length of the longest queue at each till

  6. the percentage of time that each till spent idle (ie not serving)

The program should provide an option to produce a history file of all customer information. This file will be displayed on the screen or written to a text file, or both, determined by an operator input at an appropriate time. Information recorded about each customer is to be:-

  1. time at which this customer joined a queue

  2. time at which this customer started being served at a till

  3. time at which this customer finished being served at a till

  4. number of items which this customer bought

  5. the till at which they were served

While the simulation is running, a display of the state of the tills and queues is to be continually updated. This does not have to use sophisticated graphics, but must show all significant data about the current state of the (simulated) supermarket.

It is anticipated that additional functional requirements may arise in the future, involving modifications to the queueing strategy, experiments with 'express' queues (with limited numbers of items), etc.

Your task is to produce a solution to the problem described above (with one queue per till, and no 'express' tills), but ease of modification is an important requirement.


Last Updated: 12.00 25/09/97 (format only) by B.F.Potter@herts.ac.uk

© University of Hertfordshire Higher Education Corporation (1997)

Disclaimer