Simulation of Queuing Systems (Single-
Channel Queue)
Example
A grocery store has one checkout counter. Customer arrives at this counter
at random from 1 to 8 minutes apart and each interarrival time has the
same probability of occurrence. The service time vary from 1 to 6 minutes,
with probability given below:
Services
1 2 3 4 5 6
(minutes)
0.1 0.2 0.3 0.2 0.1 0.0
Probability
0 0 0 5 0 5
Simulate the arrival of 10 customers and calculate:
a) Probability that a customer has to wait
b) Probability of a server being idle c) Average service time
Use the following sequence of random numbers:
Random
digit for 7 1
83 45 65 79 30 61 89 20
service 4 7
time
Random
digit for 30 91 4 23 1 50 65 42 25 70
Inter- 2 5 8 5 5 0 0 3 8 0
arrival time
Customer arrives at this counter at random from 1 to 8 minutes apart and
each interval time has the same probability of occurrence. So, Probability
1/8=0.125
Time between Probabili Cumulative Random digit for
arrival ty Probability assignment
1 0.125 0.125 1-125
2 0.125 0.25 126-250
3 0.125 0.375 251-375
4 0.125 0.5 376-500
5 0.125 0.625 501-625
6 0.125 0.75 626-750
7 0.125 0.875 751-875
8 0.125 1.00 876-000
Table: Distribution time between arrivals
The service time vary from 1 to 6 minutes, with probability give below:
Services
1 2 3 4 5 6
(minutes)
0.1 0.2 0.3 0.2 0.1 0.0
Probability
0 0 0 5 0 5
Service Probabili Cumulative Random digit for
Time ty Probability assignment
1 0.10 0.10 1-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
Table: Service time distribution
Custom Inter arrival Service
er Time(Minut Time(Minut
es) es)
1 3 4
2 8 3
3 1 4
4 2 4
5 1 2
6 4 4
7 6 2
8 4 4
9 3 5
10 6 2