Assignment One On Single
Assignment One On Single
Question: A small grocery store has only one checkout counter. Customers arrive at this
checkout counter at random from 1 to 8 minutes apart. Each possible value of inter-arrival time
has the same probability of occurrence. The service time vary from 1 to 6 minutes with the
same probability of occurrence. Analyze the system by simulating the arrival and service of 10
customers.
Write a C program to implement this problem. Your program will do the following
1. Randomly generate the service times and inter-arrival times.
2. Create a table (multi-dimensional array that stores the following variables)
a. Time since last Arrival (B)
b. Arrival time (C)
c. Service time ( D)
d. Time service begins (E)
e. Time customer waits in queue(F)
f. Time service ends (G)
g. Time customer spends in system (H)
h. Idle time of Server (I)
3. Displays the table
4. Calculates and Displays the performance measures from the table
a. The average waiting time for a customer (Wt)
b. The probability that the customer has to wait in the queue (Pw)
c. The average service time (St)
d. The average time between arrivals (X)
e. The average waiting time of those who wait (W)
f. The average time a customer spends in the system (S)
g. Probability of idle server (PI)
Assumptions:
1. First customer is assumed to arrive at time 0.
2. Service begins immediately after arrival for the first customer
3. While filling the cells in the table subsequent rows in the table are based on the
random numbers for inter-arrival time and service time and the completion time of
the previous customer.
4. No two customers can arrive at the same time