0% found this document useful (0 votes)
28 views3 pages

Grocery

The document analyzes a single-server queue at a grocery store, detailing customer arrival and service times through simulation. Key metrics calculated include average waiting time, probability of waiting, server idle time, and average time spent in the system. The results indicate an average waiting time of 0.5 minutes, a 16.6% chance of waiting, and a 40% idle time for the server.

Uploaded by

thetiger95532
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

Grocery

The document analyzes a single-server queue at a grocery store, detailing customer arrival and service times through simulation. Key metrics calculated include average waiting time, probability of waiting, server idle time, and average time spent in the system. The results indicate an average waiting time of 0.5 minutes, a 16.6% chance of waiting, and a 40% idle time for the server.

Uploaded by

thetiger95532
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Single-server Queue (A Grocery)

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 times vary from 1 to 6 minutes with the probabilities
shown in table 2. The problem is to analyze the system by simulating the arrival and service of 6
customers.

Table.1 Distribution of arrived time


Interarrival 1 2 3 4 5 6 7 8
time (Min)
Probability 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125

Table-2 Distribution of service time


Service 1 2 3 4 5 6
time (Min)
Probabilit 0.10 0.20 0.30 0.25 0.10 0.05
y

Random digit for arrival are: 913, 727, 15, 948, 309.
Random digit for service time are: 84, 10, 74, 53, 17, 79.

1) The average waiting time for a customer


2) The probability that a customer has to wait in the queue
3) The fraction of idle time of the server
4) The average service time
5) The average time between arrivals
6) The average waiting time of those who wait
7) The average time a customer spends in the system
Use the following sequence of random number

Solution:
Calculate arrival time table and get the random number assignment
Time between Probability Cumulative Random digit
arrival Probability assignment
1 0.125 0.125 00-125
2 0.125 0.250 126-250
3 0.125 0.375 251-375
4 0.125 0.500 376-500
5 0.125 0.625 501-625
6 0.125 0.750 626-750
7 0.125 0.875 751-875
8 0.125 1.000 876-000

Calculate service time distribution and assign a random number


Service Time Probability Cumulative Random digit
Probability assignment
1 0.10 0.10 00-10
2 0.20 0.30 11-30
3 0.30 0.60 31-60
4 0.25 0.85 61-85
5 0.10 0.95 86-95
6 0.05 1.00 96-00

Determining time between arrivals


Customer Random digit Time between arrival
1 - -
2 913 8
3 727 6
4 015 1
5 948 8
6 309 3

Determining service time


Customer Random digit Service time
1 84 4
2 10 1
3 74 4
4 53 3
5 17 2
6 79 4
Simulation Table
Customer IAT Arrival Service Time Waiting Time Time Idle
Time time service time service spent time
begins ends in of
systems server
1 - 0 4 0 0 4 4 0
2 8 8 1 8 0 9 1 4
3 6 14 4 14 0 18 4 5
4 1 15 3 18 3 21 6 0
5 8 23 2 23 0 25 2 2
6 3 26 4 26 0 30 4 1
18 3 21 12

Total time customer wait ∈queue 3


Average waiting time ¿ = =0.5 min
Number of customers 6
Probability customer has to wait in queue
Total number of customers wait ∈queue 1
¿ = =0.166=16.6 %
Number of customers 6
Total idle time 12
Probability of idle time¿ = =0.4=40 %
Total run time 30
Total service time 18
Average service time ¿ = =3
Number of customers 6

Average time between arrival¿


∑ of time between arrival = 26 =5.2 mins
Number of arrival −1 5
3
Average waiting time for those who wait¿ =3
1
Total time spent ∈systems 21
Average time customer spent in system¿ = =3.5 mins
Total customers 6

You might also like