Professional Documents
Culture Documents
Operation Research II
Spring, 2009
Input
source
Customers
Queue
Service
Mechanism
Served
customers
Queue Discipline
Jin Y. Wang
Chap17-1
Operation Research II
Spring, 2009
9 Queue
The queue is where customers wait before being served.
A queue is characterized by the maximum permissible number of
customers that it can contain. Queue may be infinite (default one) or finite.
9 Queue Discipline
Refers to the order in which members of the queue are selected for service.
First-come-first-serve is normally used.
9 Service Mechanism
Consists of one or more service facilities, each of which contains one or
more parallel service channels, called servers.
At a given facility, the customer enters one of the parallel service channels
and is served by that server.
Most elementary models assume one service facility with either one or a
finite number of servers.
Service time is usually defined by a probability distribution.
An Elementary Queueing Process
9 A single waiting line forms in the front of a single service facility, within which
are stationed one or more servers. Each customer is serviced by one of the
servers, perhaps after some waiting in the queue.
Queueing system
Customers
Queue
CCCCCC
C
C
C
C
S
S
S
S
Service
facility
Served customers
Jin Y. Wang
Chap17-2
Operation Research II
Spring, 2009
nP
n =0
Jin Y. Wang
Chap17-3
Operation Research II
Spring, 2009
(n s) P
n=s
9 These four fundamental quantities (L, W, Lq, and Wq) could be immediately
determined as soon as one is found analytically.
Examplescommercial service system, transportation service system,
internal service system, and social service system.
The Role of the Exponential Distribution
9 The mostly commonly used distribution for interarrival and service time is
exponential distribution.
9 A random variable (interarrival or service times), T, is said to have an
exponential distribution with parameter if its probability density function is
e t
f T (t ) =
0
for
t0
for
t<0
Jin Y. Wang
, var(T ) =
Chap17-4
Operation Research II
Spring, 2009
The value T takes on is more likely to be small [less than half of E(T))]
than near its expected value. Is this property real?
1 1
3 1
1 1
T
P 0 T
= 0.393 , P
= 0.383 .
2
2
Not real when the service required is essentially identical for each
customer, with the server always performing the same sequence of service
operations.
It is suitable for the situations where the specific tasks required of the
server differ among customers (hospital or banking cases).
9 Property 2: Lack of memory: P{T > t + t | T > t} = P{T > t} for any positive of t
and t .
The probability distribution of the remaining time until the event occurs
always is the same, regardless of how much time already has passed.
The process forgets its history.
The phenomenon occurs with the exponential distribution.
For interarrival time, the time until next arrival is completely uninfluenced
by when the last arrival occurred.
9 Property 3: The minimum of several independent exponential random variables
has an exponential distribution.
Let T1, T2, , Tn be independent exponential random variables with
parameters 1 , 2 , , n . Also, let U be the random variable that takes on
the value equal to the minimum of the values of T1, T2, , Tn.
Jin Y. Wang
Chap17-5
Operation Research II
Spring, 2009
(t ) n e t
n!
Jin Y. Wang
Chap17-6
Operation Research II
Spring, 2009
x
The series expansion of e for any exponent x is e x = 1 + x +
n=2
xn
.
n!
(t ) n
t .
n!
n=2
p
i =1
Jin Y. Wang
Chap17-7
Operation Research II
Spring, 2009
, so lim n n
= 0.
t
t
t
t
t
t
9 lim
n
E n (t )
= mean rate at which process enters state n.
t
9 lim
n
Ln (t )
= mean rate at which process leaves state n.
t
9 Rate In = Rate Out Principle: for any state of the system n, mean entering rate
= mean leaving rate. The equation expressing this principle is called the balance
equation for state n.
9 Pi is the steady-state probability of being in state i.
9 Consider state 0: the mean entering rate of state 0 is 1 P1 ; the mean leaving rate
of state is 0 P0 . The balance equation for state 0 is 1 P1 = 0 P0
9 For every other state there are two possible transitions both into and out of the
state. Therefore, each side of the balance equations for these states represents
the sum of the mean rates for the two transitions involved.
9 We can write the balance equations for the other states.
9 Notice that there is always one extra variable in these equations. Solve P1,
P2 in term of P0.
Jin Y. Wang
Chap17-8
Operation Research II
Spring, 2009
n 1 n 2 ...0
for n = 1, 2, .; when n = 0, Cn = 1.
n n 1 ...1
9 Then, use the sum of all probabilities equal 1 to solve for P0.
1
P
=
1
implies that C n P0 = 1 , so that P0 = ( C n ) .
n
n =0
n =0
n =0
9 The key measures of performance for the queueing system (L, Lq, W, and Wq)
can be obtained immediately after calculating the Pn.
n =0
n=s
L = nPn , Lq = ( n s ) Pn ,
W=
L , W = Lq
q
where is the average arrival rate over the long run and = n Pn .
n=0
Jin Y. Wang
Chap17-9
Operation Research II
Spring, 2009
The service rate per busy server is , the overall mean service rate for n
busy servers must be n .
Therefore, n = n when n s , and n = s when n s .
9 When the maximum mean service rate s exceeds the mean arrival rate , that
is, when =
=
1
= 1 .
9 Thus, Pn = (1 ) n , for n = 0, 1, 2,
9 Consequently, L = n(1 ) n =
n =0
9 Lq = (n 1) Pn =
n =1
2
( )
9 When the mean arrival rate exceeds the mean service rate, the preceding
solution blows up.
Jin Y. Wang
Chap17-10
Operation Research II
Spring, 2009
with parameter (1 ) .
9 Therefore, W = E(W ) =
1
1
.
=
(1 )
P{Wq > t}
P{Wq > 0}
= e (1 ) t .
Jin Y. Wang
), Wq = E(Wq) =
.
( )
Chap17-11
Operation Research II
Spring, 2009
9 P0 =
s 1 ( / ) n ( / ) s
1
= 1 /
+
.
s! 1 /( s )
n =0 n!
9 For 0 n s, Pn =
9 Lq =
( / ) n
( / ) n
P0 . For n s, Pn =
P0 .
n!
s! s n s
P0 ( / ) s
s!(1 ) 2
9 Wq = L q / , W = W q +
Jin Y. Wang
, L = (Wq + ) = Lq +
Chap17-12
9 P{W > t} = e
Operation Research II
P / s
1 + 0
s!(1 )
1 e t ( s 1 / )
s 1 /
Spring, 2009
s 1
P0
P1
Pn (for n 2)
Lq
L
Wq
W
P{Wq > 0}
P{Wq > 1 / 2}
P{Wq > 1}
P{Wq > t}
P{W > t}
s=1
2/3
1/3
2/9
(1/3)(2/3)n
4/3
2
2/3
1
0.667
0.404
0.245
2/3e-t
e-t
s=2
1/3
1/2
1/3
(1/3)n
1/12
3/4
1/24 (hour)
3/8 (hour)
0.167
0.022
0.003
1/6e-4t
1/2e-3t(3-e-t)
The Finite Queue Variation of the M/M/s Model (Called the M/M/s/K Model)
9 The queueing systems sometimes have a finite queue. That is, the number of
customers in the system is not permitted to exceed some specified number
(denoted by K). Thus, the queue capacity is K s.
9 Any customer that arrives while the queue is full is refused entry into the
system. That is, the mean input rate becomes zero at these times.
For n = 0, 1, 2, , K-1, n = ;
For n K, n = 0 .
9 A queueing system that fits this model will eventually reach a steady-state
condition.
Results for the Single-Server Case (M/M/1/K)
Jin Y. Wang
Chap17-13
Operation Research II
Spring, 2009
9 Therefore, for 1 , P0 =
9 Thence, L =
1
1
, so that Pn =
n , for n = 0, 1, 2, , K.
K +1
+
1
K
1
1
( K + 1) K +1
, Lq = L (1 P0 ) .
1 K +1
Lq
9 W = , Wq =
, where = n Pn = (1 PK )
n =0
Jin Y. Wang
Chap17-14
Operation Research II
9 For n = 1, 2, , s, C n =
Spring, 2009
( / ) n
;
n!
( / ) n
;
For n = s, s+1, , K, C n =
s! s n s
For n > K, Cn = 0.
9 Hence, For n = 1, 2,, s,
Pn =
( / ) n
P0 ;
n!
For n = s, s+1,, K,
( / ) n
Pn =
P0 ;
s! s n s
For n > K,
Pn = 0 .
s ( / ) n ( / ) s
where P0 = 1 /
+
s!
n =0 n!
9 Lq =
n = s +1 s
K
ns
P0 ( / ) s
1 K s ( K s ) K s (1 ) , where = /( s ) .
2
s!(1 )
s 1
s 1
n =0
n =0
9 L = nPn + Lq + s (1 Pn ) .
9 W and Wq are obtained from these quantities as shown for the single-server case.
The Finite Calling Population Variation of the M/M/s Model
9 The input source is limited; i.e., the size of the calling population is finite.
9 Let N denote the size of the calling population.
9 When the number of customers in the queueing system is n, there are only N - n
potential customers remaining in the input source.
9 The most important application of this model has been to the machine repair
problem.
There are N machines. The maintenance people are servers.
9 Each member of the calling population alternates between inside and outside the
queueing system.
9 Assumes that each members outside time has an exponential distribution with
parameter .
Jin Y. Wang
Chap17-15
Operation Research II
Spring, 2009
9 When n members are inside, and so N - n members are outside, the probability
distribution of the remaining time until the next arrival is the distribution of the
minimum of the remaining outside times for the latter N - n members.
This distribution is exponential with parameter n = ( N n) .
The rate diagram is as followings.
Results for the Single-Server Case (s=1) for the Finite Call Population
n
9 For n N ,
For n > N,
N!
C n = N ( N 1)...( N n + 1) =
( N n)!
Cn = 0
N! n
9 Therefore, P0 = 1 /
n = 0 ( N n)!
N!
P0 , if n = 1, 2, , N
Pn =
( N n)!
N
Lq = (n 1) Pn = N
n =1
+
(1 P0 )
L = nPn = Lq + 1 P0 = N
n =0
W =
Jin Y. Wang
and Wq =
(1 P0 )
Lq
Chap17-16
Operation Research II
n =0
n =0
Spring, 2009
where = n Pn = ( N n)Pn = ( N L)
Results for the Multiple-Server Case (s>1) for the Finite Call Population
n
9 For n = 0, 1, 2, , s,
N!
.
Cn =
( N n)!n!
For n = s, s+1, , N,
N!
Cn =
( N n)! s! s n s
For n > N,
Cn = 0 .
9 If 0 n s ,
N!
P0
Pn =
( N n)!n!
If s n N ,
N!
Pn =
( N n)! s! s n s
If n > N ,
Pn = 0
P0
n
N
s 1
N!
N!
+
9 P0 = 1 /
ns
n = s ( N n )! s! s
n =0 ( N n)!n!
9 Lq = (n s ) Pn
n=s
s 1
s 1
n =0
n =0
9 L = nPn + Lq + s1 Pn
Queueing Models Involving Nonexponential Distributions M/G/1
9 No restrictions are imposed on what the service-time distribution can be.
9 It is only necessary to know the mean 1 / and variance 2 of this distribution.
9 Thanks for the Pollaczek-Khintchine formula, we have (when < 1 )
P0 = 1
Jin Y. Wang
Chap17-17
Lq =
Operation Research II
Spring, 2009
2 2 + 2
2(1 )
L = + Lq
Wq =
Lq
W = Wq +
9 For any fixed expected service time 1 / , notice that Lq, L, Wq, and W all
increase as 2 is increased.
2
2(1 )
(k )k
(k 1)!
1 1
9 Suppose that T1, T2, .., Tk are k independent random variables with an identical
exponential distribution whose mean is 1 /(k ) . Then their sum T = T1 + T2 +
+ Tk has an Erlang distribution with parameters and k.
Jin Y. Wang
Chap17-18
Operation Research II
Spring, 2009
1+ k
2k ( )
W = Wq +
L = W
ABk 1 Bk
, for k = 1, 2, , N,
s s 1 r j
where A = s! s + s ,
r
j = 0 j!
B0 = 1 ,
Bk
= 1
i =1
s = number of servers
= mean service rate per busy server,
i = mean arrival rate for priority class i,
Jin Y. Wang
Chap17-19
Operation Research II
= i ,
r=
i =0
Spring, 2009
ak
1
9 Wk =
+
, where a k = 2 , b0 = 1 , bk = 1 i .
bk 1bk k
i =1 i
i =1 i
1/
, for the single-server cases.
Bk 1 Bk
Nonpreemptive Priorities
s=1
s=2
s=1
s=2
--
--
4.5
36
B1
0.933
--
0.933
0.967
B2
0.733
--
0.733
0.867
B3
0.333
--
0.333
0.667
W1 1 /
0.024 hr
0.00037 hr
0.238 hr
0.029 hr
W2 1 /
0.154 hr
0.00793 hr
0.325 hr
0.033 hr
W3 1 /
1.033 hr
0.06542 hr
0.889 hr
0.048 hr
Jin Y. Wang
Chap17-20
Operation Research II
Spring, 2009
9 The waiting time for priority class 1 customers are unaffected by the presence of
lower-priority classes customers. Thus, W1 must equal W for the corresponding
one-class M/M/1 model with s = 2, =3, and = 0.2 , which yield W1 = 0.3337
hour.
Waiting time in the queue for class 1 customers is
W1 1 / = 0.33370 0.33333 = 0.00037
9 Now consider the first two priority classes. Let W 1 2 be the expected waiting
time in the system of a random arrival in either of these two classes.
The probability is 1 /(1 + 2 ) =1/4 that this arrival is in class 1 and
2 /(1 + 2 ) =3/4 that it is in class 2.
1
3
W 1 2 = W1 + W2 .
4
4
W 12 must equal W for the M/M/s model with s = 2, =3, and = 0.8,
which yields W 12 = W = 0.33937.
We already know the value of W1, so W2 = 0.34126. W2 1 / = 0.00793.
9 Similarly, W 13 = 0.1W1 + 0.3W2 + 0.6W3 . W 13 equals W for the M/M/s model with
s = 2, =3, and = 2, which yields W 13 = W = 0.375. So, W3 = 0.39875.
W3 1 / = 0.06542.
Queueing Network
9 Thus far we have considered only queueing systems that have a single service
facility with one or more servers.
9 Queueing systems are sometimes actually queueing networks, i.e., networks of
service facilities where customers must receive service at some of or all these
facilities.
For example, orders being processed through a job shop must be routed
through a sequence of machine groups.
Equivalence Property
9 Assume that a service facility with s servers and an infinite queue has a Poisson
input with parameter and the same exponential service-time distribution with
parameter for each server (the M/M/s model), where s > . Then the
steady-state output of this service facility is also a Poisson process with
parameter .
Jackson Networks (with m facilities, i = 1, 2, , m)
9 An infinite queue.
9 Customers arriving from outside the system according to a Poisson input
process with parameter ai.
Jin Y. Wang
Chap17-21
Operation Research II
Spring, 2009
9 Consider a Jackson network with three service facilities that have the parameter
shown below.
Pij
Facility j
sj
aj
i=1
i=2
i=3
j=1
10
0.1
0.4
j=2
10
0.6
0.4
j=3
10
0.3
0.3
We have
1 = 1 +
0.1 2 + 0.4 3
2 = 4 + 0.6 1
+ 0.4 3
3 = 3 + 0.3 1 + 0.3 2
i
(That is, 1 = 1/2, 2 = 1/2, 3 = 3/4).
si i
Pn1 =
Pn2 =
Jin Y. Wang
Chap17-22
Operation Research II
Spring, 2009
Pn3 =
Jin Y. Wang
Chap17-23
Operation Research II
Spring, 2009
120
< 1.
2(80)
9 Each server costs $20 per hour and waiting cost is $48 per hour.
9 We want to minimize 20s + 48L.
9 Use the results obtained before, we have
E(SC)= Css
E(WC)= CwL
E(TC)=E(SC)+E(WC)
3.43
$40
$164.57
$204.57
1.74
$60
$83.37
$143.37
1.54
$80
$74.15
$154.15
1.51
$100
$72.41
$172.41
Jin Y. Wang
Chap17-24