lec12 mm1k queueing system2
TRANSCRIPT
-
7/31/2019 Lec12 MM1k Queueing System2
1/24
OR372-Dr.Khalid Al-Nowibet 1
4.2 M/M/1/k Queueing Model
Characteristics1. Interarrival time is exponential with rate
Arrival process is Poisson Process with rate
2. Interarrival time is exponential with rate
Number of services is Poisson Process with rate
3. Single Server
4. System size is finite = k
5. Queue Discipline : FCFS
NotationM / M / 1 / k / FCFS
-
7/31/2019 Lec12 MM1k Queueing System2
2/24
OR372-Dr.Khalid Al-Nowibet 2
4.2 M/M/1/k Queueing Model
Steady-State Distribution
State of the systemsystem is in state n if there are n customers in the
system (waiting or serviced)
Let Pnbe probability that there are n customers in the
system in the steady-state. n = 0 , 1 , 2 , 3 , , k
-
7/31/2019 Lec12 MM1k Queueing System2
3/24
OR372-Dr.Khalid Al-Nowibet 3
4.2 M/M/1/k Queueing Model
Steady-State Distribution
Rate Diagram:1. If system changes state, where to go?
2. How fast the system changes state?
0 1 2 k-1 k. . .
-
7/31/2019 Lec12 MM1k Queueing System2
4/24OR372-Dr.Khalid Al-Nowibet 4
4.2 M/M/1/k Queueing Model
Steady-State DistributionBalance Equations:
For each state n:
Average Rate out of state n =
Average Rate in to state n =
Average
Rate in toState n
Average
Rate out ofState n =
k n}stateinPr{systemk)n(rates
k
k}stateinPr{systemn)k(rates
-
7/31/2019 Lec12 MM1k Queueing System2
5/24OR372-Dr.Khalid Al-Nowibet 5
4.2 M/M/1/k Queueing Model
Steady-State DistributionBalance Equations:
n = 0 P0 = P1n = 1 P1 + P1 = P0 + P2 (+)P1 = P0 + P1n = 2 P2 + P2 = P1 + P3 (+)P2 = P0 + P3n = 3 P3 + P3 = P2 + P4 (+)P3 = P2 + P4. . . . . . . . . . .
n = k Pk= Pk-1 Pk= Pk-1
0 1 2 k-1 k. . .
AverageRate in to
State n
AverageRate out of
State n=
-
7/31/2019 Lec12 MM1k Queueing System2
6/24OR372-Dr.Khalid Al-Nowibet 6
4.2 M/M/1/k Queueing Model
Steady-State DistributionSolution of Balance Equations:
P0 = P1(+)P1 = P0 + P2(+)P2 = P1 + P3. . . . . . . . . . .
Pk= Pk-1
Eq-1 P0 = P1Eq-2 (+)P1 (/)P1 = P2 P1 = P2Eq-3 (+)P2 (/)P2 = P3 P2 = P3
. . . . . . . . . . .
Eq-k Pk-1 = Pk
-
7/31/2019 Lec12 MM1k Queueing System2
7/24
OR372-Dr.Khalid Al-Nowibet 7
4.2 M/M/1/k Queueing Model
Steady-State DistributionSolution of Balance Equations:
Make all equations functions of P0 only:
Eq-1 P0 = P1 P1 = (/)P0Eq-2 P1 = P2 from Eq-1 P2 = (/)
2 P0Eq-3 P2 = P3 from Eq-2 P3 = (/)
3P0
. . . . . . . . . . .
Eq-k Pk-1 = Pk from Eq-(k-1) Pk= (/)kP0
-
7/31/2019 Lec12 MM1k Queueing System2
8/24
OR372-Dr.Khalid Al-Nowibet 8
4.2 M/M/1/k Queueing Model
Steady-State DistributionSolution of Balance Equations:
Computing P0 :
P0 + P1 + P2 + P3 + +Pk= 1
P0 + (/)P0 + (/)2P0 + (/)
3P0 + + (/)
kP0 = 1
P0 [ 1 + (/)+ (/)2 + (/)3 + + (/)k] = 1
P0 = [1 + (/)+ (/)2
+ (/)3
+ + (/)k
]1
1Pn =n
-
7/31/2019 Lec12 MM1k Queueing System2
9/24
OR372-Dr.Khalid Al-Nowibet 9
4.2 M/M/1/k Queueing Model
Steady-State DistributionSolution of Balance Equations:
Computing P0 :
All Pn are functions of P0 . Then Pn > 0 if and only if P0 > 0
Then P0 > 0 for any value of and since is finite sum
( )=
=k
n
n
0
01P
( )
=
0n
n
-
7/31/2019 Lec12 MM1k Queueing System2
10/24
OR372-Dr.Khalid Al-Nowibet 10
4.2 M/M/1/k Queueing Model
Steady-State DistributionSolution of Balance Equations:
Pn = P0
n = 1,2,3, ,k
For any value of and
n
=
=k
n
n
n
0
nP
-
7/31/2019 Lec12 MM1k Queueing System2
11/24
OR372-Dr.Khalid Al-Nowibet 11
4.2 M/M/1/k Queueing Model
Steady-State DistributionSolution of Balance Equations:
Pn = P0
n = 1,2,3, ,k
for any value of ( can be > 1)
n
1n 11P + = k
n
= 10 11P + = k
-
7/31/2019 Lec12 MM1k Queueing System2
12/24
OR372-Dr.Khalid Al-Nowibet 12
4.2 M/M/1/k Queueing Model
Steady-State DistributionSolution of Balance Equations:
why (/) can be >1 ??
If system is full arrival rate = 0Number of customers in system does not go to
-
7/31/2019 Lec12 MM1k Queueing System2
13/24
OR372-Dr.Khalid Al-Nowibet 13
4.2 M/M/1/k Queueing Model
Performance Measures
In steady state
e , , P0LB = E[busy servers] = E[#Cust. in service]Ls = Lq + LB
Ws = Wq + (1/)Ls = Ws
Lq = WqLB = WB
Know 4 measures all measures are known
System isin Steady Stead
-
7/31/2019 Lec12 MM1k Queueing System2
14/24
OR372-Dr.Khalid Al-Nowibet 14
4.2 M/M/1/k Queueing Model
Performance Measures
1. Effective Arrival Rate e:
Finite size = k
Total
Arrivals
e
b
= e + b
1
Rate of Enteringthe system
Rate of Not Enteringthe system
-
7/31/2019 Lec12 MM1k Queueing System2
15/24
OR372-Dr.Khalid Al-Nowibet 15
4.2 M/M/1/k Queueing Model
Performance Measures
1. Effective Arrival Rate e:
e = . Pr{an arrival enters the system}
= . Pr{system is not full}= . [P0 + P1 + P2 + + Pk1 ]= . [1 Pk] = Through-put Rate
b = . Pr{an arrival cant enter the system}= . Pr{system is full}= . Pk
-
7/31/2019 Lec12 MM1k Queueing System2
16/24
OR372-Dr.Khalid Al-Nowibet 16
4.2 M/M/1/k Queueing Model
Performance Measures
2. Average Customers in System Ls:
3. Average Busy servers LB:
LB
= E[busy servers] = E[#Cust. in service]
LB = 0 . P0 + 1 (P1 + P2 + P3 + ) = 1 P0
=
=k
0n
ns PnLFinite sum
11
1
1 +
= k
=
-
7/31/2019 Lec12 MM1k Queueing System2
17/24
OR372-Dr.Khalid Al-Nowibet 17
4.2 M/M/1/k Queueing Model
Performance Measures
4. Utilization of the System U:
U = Pr{ n > 0 } = P1 + P2 + P3 + + Pk= 1 P0
5. Average Customers in Queue Lq:
Lq = Ls
LBor
Lq = 0.(P0+P1) + 1.P2 + 2.P3 + + (k1)Pk
=
-
7/31/2019 Lec12 MM1k Queueing System2
18/24
OR372-Dr.Khalid Al-Nowibet 18
4.2 M/M/1/k Queueing Model
Performance Measures
6. Average Waiting time in System Ws:
Ls = e .Ws
7. Average Time Spent in Queue Wq:
Lq = e .Wq
LsWs =
e
LqWq =
e
-
7/31/2019 Lec12 MM1k Queueing System2
19/24
OR372-Dr.Khalid Al-Nowibet 19
4.2 M/M/1/k Queueing Model
ExampleConsider the car-wash station in Example-2. Assume now that the itis not allowed for care to wait on the side of the road. So, station has
made some modifications so that 6 cars can wait inside the station(See diagram). Also, a driver is hired to move cars from parking tothe machine. The driver takes an average of 2 minutes to move the carto the machine.
Car-Wash
Machine
Car-Wash Station
N
o
Parking
-
7/31/2019 Lec12 MM1k Queueing System2
20/24
OR372-Dr.Khalid Al-Nowibet 20
4.2 M/M/1/k Queueing Model
ExampleAssuming that the arrival rate is 9 cars per hour and the washing timeis 6 minutes. Also, assume Poisson arrivals and exponential service.
Answer the following questions in steady-state:
1. What is the average number of cares waiting in station?2. If the car wash costs 15 SR and the station works from 8:00am to
8:00 pm how much money the collects per day on average? Howmuch the station losses?
3. On average How much it takes for a customer until he leaves with
his car washed?4. The management decided to buy another machine if the oldmachine works more than 85% of the time. Will the managementbuy a new machine?
-
7/31/2019 Lec12 MM1k Queueing System2
21/24
OR372-Dr.Khalid Al-Nowibet 21
4.2 M/M/1/k Queueing Model
Example = 9 cars/hourE[S]= E[driving]+E[washing] = 2 min + 6 min = 8 min
= 1/8 cars/hr = 7.5 cars/hr single machine = 9/7.5 = 1.2k =(max. # waiting) + (max. # in service) = 6+1= 7 (max. system size)
M/M/1/k queueing system
n = 0,1,2, ,7
=
= k
n
n
n
0
nP=
-
7/31/2019 Lec12 MM1k Queueing System2
22/24
OR372-Dr.Khalid Al-Nowibet 22
4.2 M/M/1/k Queueing Model
Example = 9 cars/hour = 7.5 cars/hr M/M/1/k=7 system
1. Average number of cares waiting in station = Lq = Ls (1P0)
Lq = Ls (1P0) = 4.424 (10.061) = 3.485 cars
n 0 1 2 3 4 5 6 7
n 1 1.2 1.44 1.73 2.07 2.49 2.99 3.580.217
1.520
16.50Pn 0.061 0.073 0.087 0.105 0.126 0.151 0.181 1.00
nPn 0.000 0.073 0.175 0.314 0.503 0.754 1.086 4.424
-
7/31/2019 Lec12 MM1k Queueing System2
23/24
OR372-Dr.Khalid Al-Nowibet 23
4.2 M/M/1/k Queueing Model
Example = 9 cars/hour = 7.5 cars/hr M/M/1/k=7 system
2. car wash costs = 15 SRworks hours = 12 hours
E[money collected per day] =(15SR) E[cars washed per day] (12hr)
E[cars washed per day] = e = (1 P7) = 9 (10.217) = 7.047 car E[money collected per day] =(15SR)(7.047)(12hr) = 1268.46 SR
E[money lost per day] =(15SR) E[cars not washed per day] (12hr)E[cars not washed per day] = b = . P7 = 9 (0.217) = 1.953 car E[money lost per day] =(15SR)(1.953)(12hr) = 351.54 SR
-
7/31/2019 Lec12 MM1k Queueing System2
24/24
OR372-Dr.Khalid Al-Nowibet 24
4.2 M/M/1/k Queueing Model
Example = 9 cars/hour = 7.5 cars/hr M/M/1/k=7 system
3. E[time until customer leaves with his car washed] = WsWs = Ls /e = 4.424/7.047 = 0.6278 hrs
4. The management decided to buy another machine if the oldmachine works more than 85% of the time. Will the managementbuy a new machine?
Percentage of working time for the old machine = Pr{ n > 0 } = UU = 1 P0 = 1 0.061 = 0.939 > 0.85 Buy a new machine