Sunteți pe pagina 1din 24

4.

2 M/M/1/k Queueing Model


Characteristics
1. 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


OR372-Dr.Khalid Al-Nowibet

Notation M / M / 1 / k / FCFS

4.2 M/M/1/k Queueing Model


Steady-State Distribution
State of the system system is in state n if there are n customers in the system (waiting or serviced) Let Pn be probability that there are n customers in the system in the steady-state. n = 0 , 1 , 2 , 3 , , k

OR372-Dr.Khalid Al-Nowibet

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Rate Diagram:
1. 2. If system changes state, where to go? How fast the system changes state?
0 1

k-1 k

. . .

OR372-Dr.Khalid Al-Nowibet

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Balance Equations:
For each state n:
Average Rate out of State n

Average Rate in to State n

Average Rate out of state n = (rates n k) Pr{system in state n}


k

Average Rate in to state n =

(rates k n) Pr{system in state k}


k

OR372-Dr.Khalid Al-Nowibet

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Balance Equations:

0 1

Average Rate out of State n

Average Rate in to State n

. . .

k-1

n = 0 P0 = P1 n = 1 P1 + P1 = P0 + P2 n = 2 P2 + P2 = P1 + P3 n = 3 P3 + P3 = P2 + P4 ........... n = k Pk = Pk-1
OR372-Dr.Khalid Al-Nowibet

(+)P1 = P0 + P1 (+)P2 = P0 + P3 (+)P3 = P2 + P4 Pk = Pk-1


5

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Solution of Balance Equations:
P0 = P1 (+)P1 = P0 + P2 (+)P2 = P1 + P3 ........... Pk = Pk-1 P0 = P1 (+)P1 (/)P1 = P2 (+)P2 (/)P2 = P3 ..... Eq-k Pk-1 = Pk
OR372-Dr.Khalid Al-Nowibet

Eq-1 Eq-2 Eq-3

P1 = P2 P2 = P3 ......

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Solution of Balance Equations:
Make all equations functions of P0 only: P0 = P1 P1 = P2 P2 = P3 ..... Eq-k Pk-1 = Pk Eq-1 Eq-2 Eq-3 P1 = (/)P0 from Eq-1 P2 = (/)2 P0 from Eq-2 P3 = (/)3 P0 ...... from Eq-(k-1) Pk = (/)k P0

OR372-Dr.Khalid Al-Nowibet

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Solution of Balance Equations:
Computing P0 :

P
n

=1

P0 + P1 + P2 + P3 + +Pk= 1 P0 + (/)P0 + (/)2P0 + (/)3P0 + + (/)kP0 = 1 P0 [ 1 + (/)+ (/)2 + (/)3 + + (/)k ] = 1 P0 = [1 + (/)+ (/)2 + (/)3 + + (/)k ]1
OR372-Dr.Khalid Al-Nowibet

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Solution of Balance Equations:
Computing P0 :

P0 =

( )
k n =0

All Pn are functions of P0 . Then Pn > 0 if and only if P0 > 0 Then P0 > 0 for any value of and since ( )
n =0 n

is finite sum

OR372-Dr.Khalid Al-Nowibet

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Solution of Balance Equations:
Pn =
n

P0
n

Pn = n k n =0
For any value of and
OR372-Dr.Khalid Al-Nowibet

n = 1,2,3, ,k

10

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Solution of Balance Equations:
Pn =
n

P0

1 P0 = 1 k +1

1 Pn = 1 k +1
n

n = 1,2,3, ,k

for any value of ( can be > 1)


OR372-Dr.Khalid Al-Nowibet

11

4.2 M/M/1/k Queueing Model


Steady-State Distribution
Solution of Balance Equations:

why (/) can be >1 ?? If system is full arrival rate = 0 Number of customers in system does not go to

OR372-Dr.Khalid Al-Nowibet

12

4.2 M/M/1/k Queueing Model


Performance Measures In steady state
e , , P 0 LB = E[busy servers] = E[#Cust. in service] Ls = Lq + LB Ws = Wq + (1/) System is Ls = Ws in Steady Stead Lq = Wq LB = WB Know 4 measures all measures are known
OR372-Dr.Khalid Al-Nowibet

13

4.2 M/M/1/k Queueing Model


Performance Measures
1. Effective Arrival Rate e:
Rate of Entering the system

Total Arrivals
Rate of Not Entering the system

e
Finite size = k

= e + b
14

OR372-Dr.Khalid Al-Nowibet

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
OR372-Dr.Khalid Al-Nowibet

15

4.2 M/M/1/k Queueing Model


Performance Measures
2. Average Customers in System Ls:
L s = n Pn
n =0 k

Finite sum

3. Average Busy servers LB: LB = E[busy servers] = E[#Cust. in service] LB = 0 . P0 + 1 (P1 + P2 + P3 + ) = 1 P0


1 = 1 1 k +1
=
16

OR372-Dr.Khalid Al-Nowibet

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 LB or Lq = 0.(P0+P1) + 1.P2 + 2.P3 + + (k1)Pk


OR372-Dr.Khalid Al-Nowibet

17

4.2 M/M/1/k Queueing Model


Performance Measures
6. Average Waiting time in System Ws: Ls = e .Ws Ws = Ls e

7. Average Time Spent in Queue Wq: Lq = e .Wq


OR372-Dr.Khalid Al-Nowibet

Wq =

Lq e
18

4.2 M/M/1/k Queueing Model


Consider the car-wash station in Example-2. Assume now that the it is 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 to the machine. The driver takes an average of 2 minutes to move the car to the machine.
Car-Wash Station

Example

OR372-Dr.Khalid Al-Nowibet

No Parking

CarWash Machine

19

4.2 M/M/1/k Queueing Model


Assuming that the arrival rate is 9 cars per hour and the washing time is 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? How much 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 old machine works more than 85% of the time. Will the management buy a new machine?
OR372-Dr.Khalid Al-Nowibet

Example

20

4.2 M/M/1/k Queueing Model


Example
= 9 cars/hour E[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.2 k =(max. # waiting) + (max. # in service) = 6+1= 7 (max. system size)

M/M/1/k queueing system


Pn = n

n =0

n = 0,1,2, ,7

OR372-Dr.Khalid Al-Nowibet

21

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)


n n Pn nPn 0 1 0.061 0.000 1 1.2 0.073 0.073 2 1.44 0.087 0.175 3 1.73 0.105 0.314 4 2.07 0.126 0.503 5 2.49 0.151 0.754 6 2.99 0.181 1.086 7 3.58 0.217 1.520 16.50 1.00 4.424

Lq = Ls (1P0) = 4.424 (10.061) = 3.485 cars

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

2. car wash costs = 15 SR works 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

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

3. E[time until customer leaves with his car washed] = Ws


Ws = Ls /e = 4.424/7.047 = 0.6278 hrs

4. The management decided to buy another machine if the old machine works more than 85% of the time. Will the management buy a new machine? Percentage of working time for the old machine = Pr{ n > 0 } = U U = 1 P0 = 1 0.061 = 0.939 > 0.85 Buy a new machine
OR372-Dr.Khalid Al-Nowibet

24

S-ar putea să vă placă și