Week 5

advertisement
Simulation of multiple server
queuing systems
Example 3: Bank system with two
tellers
2
Example 3 Bank system with two tellers:
A bank has two tellers. Customers arrive at this teller at random from 1 to 4 minutes
apart. Each possible value of interarrival time has the same probability of occurrence.
The service times vary from 1 to 6 minutes with the same probabilities for each teller.
The problem is to analyze the system by simulating the arrival and service of 20
customers.
Solution:
Distribution of time between Arrivals
Time between
Arrival
(Minutes)
1
2
3
4
Probability
Cumulative
probability
Random-Digit
Assignment
Service time Distribution
Service
time
(Minutes)
Probability
Cumulative
probability
Random-Digit
Assignment
1
2
3
4
5
6
A set of uniformly distributed random numbers is needed to generate the arrivals at the
teller and another set is needed to generate service times for each teller. Random
numbers have the following properties:
1. The set of random numbers is uniformly distributed between 0 and 1.
2. Successive random numbers are independent.
Simulation table : Bank system with two tellers
Teller 1
Time Since
Cust
Last Arrival
ome
(Minutes)
r
Arrival
Time
Time
Service
Begins
Service
Time
1
2
3
4
5
6
7
8
9
10
4
1
4
3
3
2
1
1
2
Tot
21
22
Av.
2.33
2.2
Pr.
4
5
9
12
15
17
18
19
21
4
Time
Time
custom
Custome er
Time
Time
Time
r Waits in spend
servic Servic Servic
servic
Queue
in
e ends e
e Time
e ends
System
Begins
Teller 2
4
6
4
10
5
9
12
15
1
6
5
4
6
3
1
1
6
2
3
7
4
12
3
37
1.2
0.3
3.7
3
1
8
10
13
21
17
19
21
0
0
0
0
0
0
0
1
2
0
2
2
19
21
26
21
4
25
0.2
Idle
Idle Time
Time of
of Server
Server 2
1
0
0
5
1
2
2
7
0
0
0
4 13
0.15 0.5
System statistics
•
•
•
•
•
•
•
•
•
•
•
Average time between arrival
– (sum of all interarrival times)/(number of arrivals-1)=21/9 =2.33
Expected time between arrival
E(T) =∑ ti*p(ti)= 1× 0.25+ 2× 0.25+ 3× 0.25+4× 0.25= 2.5
Average service time teller1:
– (total service time)/(total number of customer)=22/10=2.2
Average service time teller2
– (total service time)/(total number of customer)=12/10=1.2
Expected service time teller 1 & 2
Average waiting time
– (total waiting time in queue)/(total number of customers) =3/10=0.3
Probability of waiting
• (number of customers who wait)/(total number of customers) =2/10=0.2
Probability of idle server teller1
• (total idle server time)/(total run time of simulation) =4/26=0.15
The probability of the server being busy teller1 = 1- 0.15=0.85
Probability of idle server teller2
• (total idle server time)/(total run time of simulation) =13/25=0.52
The probability of the server being busy teller2 = 1- 0.52=0.48
5
Download