You are on page 1of 46

Queuing Theory and

Measurement of Effectiveness

Simulation & Modeling


Kardi Teknomo, PhD

Kardi Teknomo, PhD

Overview

Queuing Theory

Arrival distribution
Service time distribution
Kendal notation
Measurement of effectiveness
M/M/1
M/M/s

Queuing Optimization
Optional: Queue with Limits

Kardi Teknomo, PhD

Objectives

By the end of this lesson you should be able to

Compute Measurement of Effectiveness (MOE) of


simple queuing with multi channel
Find cost effective queuing channel

Kardi Teknomo, PhD

What is queuing theory?

Queue = waiting line


Q
Queuing
i theory
th
= the
th body
b d off knowledge
k
l d
dealing with waiting lines

Kardi Teknomo, PhD

Queuing Model

Kardi Teknomo, PhD

Queueing systems are pervasive

Banks
Traffic
Hospitals
Go e nment offices
Government
Supermarkets
R t
Restaurants
t
Documents in office
Files
Products queue for Machine

Kardi Teknomo, PhD

Queueing System

Input:

Arrival Rate & Distribution


Service rate & Distribution
Configuration
g
(e.g.
( g Parallel,, serial))
Waiting Capacity (Max queue length)
Population (finite or infinite)
Service Discipline

Output:

Measurement of Effectiveness (MOE) or operating


characteristics (performance measures)

Kardi Teknomo, PhD

Arrival Distribution

Most common type

Markovian (= Poisson Process)


Deterministic (e.g. constant or linear by time)

If the number of arrival in a given period of


time occurs randomlyy and independently
p
y from
other arrivals and follows a Poisson
distribution with mean customers/minute,
th th
then
the interarrival
i t
i l time
ti
(h d
(headway)
)
distribution follow an exponential probability
distribution with mean 1/ minutes

Kardi Teknomo, PhD

Poisson Probablity Distribution

Distribution of arrivals
Probability of x arrivals in a specific time
period:

P ( x) =

N ti
Notice:
PMF

x e
x!

, x = 0,1, 2,"

Kardi Teknomo, PhD

Practice-1: Poisson Distribution

Teknomos Burger has analyzed the data on


customer arrival & found that the disribution is
Poisson and the mean arrival rate is 45
customers/60 minutes. Compute
p
the probability
p
y
of x customer arrive during a 1 minute period
for x = 0, 1, 2, 3, 4, >=5

Kardi Teknomo, PhD

Answer Practice 1

= 45/60 minutes = 0.75 customers/minute


75/0! = e-0
0.75
75 = 0.4724
P(0)=(0 75)0e-00.75
P(0)=(0.75)
0 4724
P(1)=(0.75)1e-0.75/1! = 0.75 e-0.75 = 0.3543
Etc
Number of Arrivals

Probability

0.4724

0.3543

0.1329

0.0332

0.0062

5 or more

0 0010
0.0010

Kardi Teknomo, PhD

Service distribution

Most common

Markovian (Poisson Process)


Deterministic
General ((e.g.
g Unspecified/Normal
p
/
distribution))

Service rate = =average number of


customers that can be served p
per time period
p
(Poisson Dist.)
Average service time per customer = 1/ time
period (Exponential distributed)

Kardi Teknomo, PhD

Exponential distribution

Probability that the service time will be


less than or equal to a time length t is

P ( service time t ) = 1 e

e = 2.71828
Notice: CDF

Kardi Teknomo, PhD

Example (Practice 2)

Teknomos Burger has studied that order filling


process for single food server can process on
average 60 customers orders per hour.
Compute
p
the mean service rate per
p minute and
probaility that an order can be processed in

0.5 minutes or less,


1 minute or less,
2 minutes or less.

Kardi Teknomo, PhD

Answer Practice 2

Mean service rate = 60 customers/60


minutes = 1 customer/minute

P(service time 0.5 min) = 1 - e-1(0.5) = 1 - 0.6065 =


0.3935
P(service time 1.0 min) = 1 - e-1(1.0) = 1 - 0.3679 =
0.6321
1(2 0) = 1 - 0.1353
P(service time 2.0
2 0 min) = 1 - e-1(2.0)
0 1353 =
0.8647

Kardi Teknomo, PhD

Queueing Discipline

FIFO = First In First Out = FCFS = First come


first served
Others:

LIFO = Last In First Out


Balk = don
dontt join queue upon arrival
Renege = leave queue before being served
Jockey = swicth from one queue to another
Loop = join the same queue after served
Priority = certain type of customers will be served
fi t
first

Kardi Teknomo, PhD

Measurement of Effectiveness

U= Utilization factor = percentage of the time that all


servers are busyy
P0 = probability that there are no customers in the
system
Pn = probability
b bili that
h there
h
are n customers in
i the
h
system
Pw = probability that an arriving customer has to wait
for service

Kardi Teknomo, PhD

MOE (contd)

Wq = average time a customer spends in waiting line


waiting
g for service
W = average time a customer spends in the system (in
waiting line and being served)
Lq = average number
b off customer iin waiting
i i line
li for
f
service
L = average number of customer in the system (in
waiting line and being served)

Kardi Teknomo, PhD

Steady State & Transient

In the beginning the queuing system starts in


empty and idle condition then gradually go
through transient periods before the activities
reach steadyy state level
Queuing MOE formulas are derived from
Markov Chain to describe only steady state
(normal) operation.
Simulation will also show operation in both
transient and steady state condition

Kardi Teknomo, PhD

Kendall Notation

Kendal suggested a notation that is helpful in


classifying wide variety of different waiting line
A/B/k

A = prob.
prob distribution of arrivals
B = prob. distribution of service time
k = number of channels

Commonly used letter in position A or B are:

M = Poisson process (Poisson dist. for arrivals and


exponential dist. for service time)
D = Deterministic or constant
G=G
Generall prob.
b di
dist.
t With known
k
mean and
d
variance

Kardi Teknomo, PhD

MOE of M/M/1

Utilization factor

Prob. of n units in system

Prob. Empty system

U = = <1

Pn = n P0

P0 = 1 = 1

If utilization factor is larger to equal to 1


1, the waiting
line will continue to grow without limit

Kardi Teknomo, PhD

MOE of M/M/1 (contd)


1

Avg Waiting in Queue


Avg.

Wq = W

Avg. Waiting in System

1
W=

Avg. Queue Length

2
Lq = Wq =
( )

Avg. System Length

L = W = Lq +

Kardi Teknomo, PhD

Practice 3: M/M/1

Poisson Process (M/M/1)


= 0.75
0 75 customers/minute
= 1 customer/minute
Compute MOE of Teknomo
Teknomoss Burger:

U, P0, Lq, L, W, Wq
Pn where n = 0 to (7 or more)

Kardi Teknomo, PhD

Answer Practice 3

MOE of M/M/1: = 0.75, = 1


0.75
0 75
U == =
= 0.75 < 1 (OK )
1

2
0 752
0.75
Lq =
=
= 2.25 customers
( ) 1(1 0.75 )

L = Lq + = 2.25 + 0.75 = 3 customers


1
1
W=
=
= 4 minutes
i t
1 0.75
1

1
Wq = W = 4 = 3 minutes
1

Kardi Teknomo, PhD

Answer Practice 3 (contd)

0.75
= 0.25
P0 = 1 = 1 = 1

1
Pn = P0 = ( 0.75 ) 0.25
n

Numberofcustomers
0
1
2
3
4
5
6
7ormore

Probability
25.00%
18.75%
14.06%
10 55%
10.55%
7.91%
5.93%
4.45%
13.35%

Sum
25.00%
43.75%
57.81%
68 36%
68.36%
76.27%
82.20%
86.65%
100.00%

Kardi Teknomo, PhD

Effect of Changing units

Instead of using = 0.75


customers/minute and = 1
customer/minute, you might want to use
= 45 customers/hour and = 60
customers/hour
Will the MOEs change because we
change the units?

Kardi Teknomo, PhD

Effect of Changing units (contd)

Kardi Teknomo, PhD

Improving Waiting Line Operation

To reduce waiting time, we must focus


on service improvements:
1.

2
2.

Increase the mean sevice rate by making a


creative design change or by using new
technology
Add service channels so that more
customers can be served simultaneously

Kardi Teknomo, PhD

Practice 4: M/M/1

improved service

Teknomo Burger decide to employ an order


filler who will assist the order taker
taker. With this
design the management estimates the mean
service rate can increase from 60 customers
per hour into 75 customers per hour.
Compute the MOEs and compare the results to
practice 3

Kardi Teknomo, PhD

Answer Practice 4

MOE of M/M/1: = 0.75, = 1.25


0.75
0 75
U == =
= 0.60 < 1 (OK )
1.25
2
0 752
0.75
Lq =
=
= 0.9 customers
( ) 1.25 (1.25 0.75 )
L = Lq + = 0.90 + 0.60 = 1.5 customers
1
1
W=
=
= 2 minutes
i t
1.25 0.75
1

1
Wq = W = 2
= 1.2 minutes

1.25

Kardi Teknomo, PhD

Answer Practice 4 (contd)

0.75
P0 = 1 = 1 = 1
= 0.40

1.25
Pn = P0 = ( 0.60 ) 0.40
n

Numberofcustomers
0
1
2
3
4
5
6
7ormore

Probability
40.00%
24.00%
14.40%
8 64%
8.64%
5.18%
3.11%
1.87%
2.80%

Sum
40.00%
64.00%
78.40%
87 04%
87.04%
92.22%
95.33%
97.20%
100.00%

Kardi Teknomo, PhD

MOE of M/M/s

Utilization factor

U = 1s

s
+
P0 =

n =0 n ! s ! s
s 1

Prob. Empty system

P0 s +1

Avg. Queue Length

Lq =

Avg. System Length

L = Lq +

( s 1)!( s )

Kardi Teknomo, PhD

MOE of M/M/s (contd)

Avg. Waiting in Queue

Avg. Waiting in System

Prob. Of Waiting

Wq =

Lq

W = Wq +

s
Pw =
P0
s ! ( s )

n
P0

Prob. of n units in system


n!
Pn = n
P
s ! s n s 0

for n s
for n > s

Kardi Teknomo, PhD

Practice 5: multi servers

If the management of Teknomo burger want to


use 2nd order processing station so that
customers can bee served simultaneously, what
are the MOEs if
Arrival rate = 0.75 customers/min
Service rate = 1 customer/min
/

Kardi Teknomo, PhD

Answer practice-5

M/M/2: = 0.75, = 1.0


Build Spreadsheet
Compute P0 first
Then compute other MOEs

Kardi Teknomo, PhD

Economic Analysis of Queue

Mostly based on subjective evaluation of operating


characteristics
More scientific way is to use Total Cost model

TC = Cw L + Cs k

TC = total cost per time period


Cw =waiting cost per time period per each unit
L = average number of unit in the system
Cs = service cost per time period for each channel
k = number of channels

Kardi Teknomo, PhD

General shape of total cost model

Kardi Teknomo, PhD

Practice 6: economic analysis

Use spreadsheet of practice 5 to analyze total


cost model of Teknomos
Teknomo s burger given that

= 0.75, = 1.0
Server wages,
g , benefit and other direct costs is
P700/hour
Opportunty cost of losing a customer is P1000/hour
for customer waiting time

What is the most economical number of


channels?

Kardi Teknomo, PhD

Answer Practice 6

Input: Number of channel k=1,2,...,10


Obtain: Average system length, L
C
Compute
& chart:
h
Service
S i Cost
C
and
d Waiting
W i i Cost,
C
Total
T l cost
Optimum number of channels = 2

Kardi Teknomo, PhD

Queue with Limits

Kendal notation: A/B/k/C/D


C = Capacity
C
it off the
th queue (finite
(fi it total
t t l
seats or limited space)
D = Domain or population that may seek
service is finited (from which the arrivals
are derived)

Kardi Teknomo, PhD

MOE of M/M/s/K
U = 1s ( L Lq )

Utilization factor

Prob. Empty system P0 = 1 +


+
n =1 n ! s !

Avg. Queue Length

Lq =

P0 s

s !(1 )

(1

Avg System Length


Avg.

K s

( K s )

K s


n = s +1 s
K

(1 ) ) ,

s 1
L = nPn + Lq + s 1 Pn
n =0
n =0
s 1

ns

Kardi Teknomo, PhD

MOE of M/M/s/K (contd)


Lq

Avg. Waiting in Queue

Wq =

Avg. Waiting in System

L
W=
(1 PK )

Prob. of n units in system

n
P0

n!
n
Pn = n s P0
s !s
0

(1 PK )

for n = 1, 2," , s
for n = s + 1, s + 2," , K
for n > K

Kardi Teknomo, PhD

Practice 7

Compute MOE of queue with Poisson process


for both arrival rate and service rate with finite
queue K=5
Arrival rate = 5, service rate = 7
Number of server: 1, 2

Kardi Teknomo, PhD

MOE of M/M/s//N

Prob. Empty system

N !
N !
+
P0 =
ns
n =0 ( N n )!n !

N
n
!
s
!
s
(
)
n=s

s 1

Avg. Queue Length


N

Lq = ( n s ) Pn
n=s

Avg System Length


Avg.

s 1
L = nPn + Lq + s 1 Pn
n =0
n =0
s 1

Kardi Teknomo, PhD

MOE of M/M/s//N (contd)


Lq

Avg. Waiting in Queue

Wq =

Avg. Waiting in System

L
W=
( N L)

Prob. of n units in system

N ! n P0

( N n )!n !
N ! n P
0
Pn =
ns
!
!
N
n
s
s

(
)

( N L)

for 0 < n s
for s < n N
for n > N

Kardi Teknomo, PhD

Practice 8

Compute MOE of queue with Poisson process


for both arrival rate and service rate with finite
population N=10
Arrival rate = 0.01, service rate = 0.125
Number of server: 1, 2

You might also like