Chap17 Queueing Theory

advertisement
College of Management, NCTU
Operation Research II
Spring, 2009
Chap17 Queueing Theory
‰ Introduction
9 Queues (waiting line) are a part of everyday life.
9 Providing too much service involves excessive costs. And not providing
enough service capacity causes the waiting line to become excessively long.
9 The ultimate goal is to achieve an economic balance between the cost of service
and the cost associated with the waiting for that service.
9 Queueing theory is the study of waiting in all these various guises.
‰ Prototype Example—Doctor Requirement in a Emergence Room
9 Consider assigning an extra doctor to the emergency room, which has one
doctor already.
9 How much can we reduce the average waiting time for patients if the extra
doctor is hired?
‰ Basic Structure of Queueing Models
Queueing system
Input
source
Customers
Queue
Service
Mechanism
Served
customers
Queue Discipline
9 Input Source (Calling Population)
¾ One characteristic of the input source is its size. The size is the total
number of customers. The size may be infinite (default one) or finite.
¾ When will each one arrive? Associate with a distribution—usually,
Poisson distribution (the number of customers generated until any specific
time) or Exponential distribution (interarrival time).
¾ A customer may be balking, who refuses to enter the system and is lost if
the queue is too long.
Jin Y. Wang
Chap17-1
College of Management, NCTU
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
9 The prototype example is of this type.
9 We usually label a queueing model as ----/----/---¾ The first spot is for distribution of interarrival times. The second spot is for
distribution of service times. The third one is for number of servers.
¾ M = exponential distribution (Markovian), which is the most widely used.
¾ D = degenerate distribution (constant time).
¾ Ek = Erlang distribution.
Jin Y. Wang
Chap17-2
College of Management, NCTU
Operation Research II
Spring, 2009
¾ G = general distribution (any arbitrary distribution allowed)
‰ Terminology and Notation
9 State of system = number of customers in queueing system.
9 Queue length = number of customers waiting for service to begin = state of
system minus number of customers being served.
9 N(t) = number of customers in queueing system at time t.
9 Pn(t) = probability of exactly n customers in queueing system at time t.
9 s = number of servers (parallel service channels) in queueing system.
9 λ n = mean arrival rate (expected number of arrival per unit time) of new
customers when n customers are in system.
¾ When λ n is a constant for all n, this constant is denoted by λ .
¾ 1 / λ is the expected interarrival time.
9 μ n = mean service rate for overall system (expected number of customers
completing service per unit time) when n customers are in system.
¾ μ n represents combined rate at which all busy servers achieve service
completions.
¾ When the mean service rate per busy server is a constant for all n ≥ 1, this
constant is denoted by μ .
¾ μ n = sμ when n ≥ s (all servers are busy).
¾ 1 / μ is the expected service time.
9 ρ = λ /( sμ ) is the utilization factor for the service facility, i.e., the expected
fraction of time the individual servers are busy.
9 Transient condition—when a queueing system has recently begun, the state of
the system will be greatly affected by the initial state and by the time that has
since elapsed.
9 Steady-state condition—after sufficient time has elapsed, the state of the
system becomes essentially independent of the initial state and the elapsed time.
¾ Queueing theory has tended to focus largely on the steady-state condition.
9 More notations are defined in a steady-state condition.
9 Pn = probability of exact n customers in queueing system.
∞
9 L = expected number of customers in queueing system =
∑ nP
n =0
Jin Y. Wang
n
.
Chap17-3
College of Management, NCTU
Operation Research II
Spring, 2009
∞
9 Lq = expected queue length (excludes customers being served) =
∑ (n − s) P
n
n=s
.
9 W = waiting time in system (includes service time) for each customer.
9 W = E(W ).
9 Wq = waiting time in queue (exclude service time) for each customer.
9 Wq = E(Wq ).
‰ Relationships between L, W, Lq, and Wq
9 Assume that λ n is a constant for all n.
9 In a steady-state queueing process, L = λW (Little’s formula) and Lq = λWq .
9 If the λ n are not equal, then λ can be replaced in these equation by λ , the
average arrival rate over the long time.
9 Assume that the mean service time ( 1 / μ ) is a constant. Thus, W = Wq +
1
μ
.
9 These four fundamental quantities (L, W, Lq, and Wq) could be immediately
determined as soon as one is found analytically.
‰ Examples—commercial 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
t≥0
for
t<0
9 The cumulative probabilities are P{T ≤ t} = 1 − e −αt , P{T > t} = e −αt for t ≥ 0 .
9 E (T ) =
Jin Y. Wang
1
α
, var(T ) =
1
α2
.
Chap17-4
College of Management, NCTU
Operation Research II
Spring, 2009
9 Property 1: f T (t ) is a strictly decreasing function of t.
¾ P{0 ≤ T ≤ Δt} > P{t ≤ T ≤ t + Δt} for any strictly positive of t and Δt .
¾ 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α⎭
⎩
⎩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
College of Management, NCTU
Operation Research II
Spring, 2009
¾ If Ti represents the time until a particular event occurs, then U represents
the time until the first of the n different events occurs.
n
¾ U indeed has an exponential distribution with parameter α = ∑ α i .
i =1
¾ If there are n different types of customers (interarrival time is exponential
with parameter α i ), the interarrival time for the queueing system as a
n
whole, has an exponential distribution with parameter α = ∑ α i .
i =1
¾ Suppose all n servers have the same exponential service-time distribution
with parameter μ . The time until the next service completion from any
server has an exponential distribution with parameter α = nμ .
9 Property 4: Relationship to the Poisson distribution.
¾ Suppose that the time between consecutive occurrences of some particular
kind of event has an exponential distribution with parameter α .
¾ Then, the number of occurrence by time t (X(t)) has a Poisson distribution
with parameter αt .
P{ X (t ) = n} =
(αt ) n e −αt
n!
¾ With n = 0, P{ X (t ) = 0} = e −αt , which is just the probability from the
exponential distribution that the first event occurs after time t.
¾ The mean of this Poisson distribution is E{ X (t )} = αt , so that the expected
number of events per unit time is α . α is said to be the mean rate at which
the events occurs.
¾ When the events are counted on a continuing basis, the counting process
{ X (t ); t ≥ 0} is said to be a Poisson process with parameter α .
¾ Define X(t) as the number of service completions achieved by a
continuously busy server in elapsed time t, where α = μ . For
multiple-server queueing models, X(t) can also be defined as the number of
service completions achieved by n servers in elapsed time t, where α = nμ .
¾ Suppose the interarrival times have an exponential distribution with
parameter λ . In this case, X(t) is the number of arrivals in elapsed time t,
where α = λ is the mean arrival rate. Therefore, arrivals occur according
to a Poisson input process with parameter λ .
Jin Y. Wang
Chap17-6
College of Management, NCTU
Operation Research II
Spring, 2009
9 Property 5: For all positive values of t, P{T ≤ t + Δt | T > t} ≈ αΔt , for small Δt .
∞
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{T ≤ t + Δt | T > t} = P{T ≤ Δt} = 1 − e −αΔt = 1 − 1 + αΔt − ∑
9 Property 6: Unaffected by aggregation or disaggregation.
¾ If there are n different types of customers (each is a Poisson input process
with parameter λi , the aggregated input is a Poisson with λ = λ1 + λ 2 ... + λn .
¾ Assuming that each arriving customer has a fixed probability pi of being of
type i, with λi = pi λ and
n
∑p
i =1
i
= 1 , the property says that the input process
for customers of type i also must be Poisson with parameter λi .
‰ The Birth-and-Death Process
9 birth = arrival; death = departure; state , N(t), is the number of customers in the
queueing system at time t.
9 The birth-and-death process describes probabilistically how N(t) changes as t
increases.
9 Assumption 1: Given N(t) = n, the current probability distribution of the
remaining time until the next birth (arrival) is exponential with parameter λ n .
9 Assumption 2: Given N(t) = n, the current probability distribution of the
remaining time until the next death (service completion) is exponential with
parameter μ n .
9 Assumption 3: The random variable of assumption 1 and the random variable of
assumption 2 are mutually independent. The next transition in the state of the
process is either nÆn+1 or nÆn-1 depending on whether the former or latter
random variable is smaller.
9 That is, the birth-and-death process can be illustrated by the rate diagram.
9 The following analysis only focuses on the steady state condition.
9 En(t) = number of times that process enters state n by time t.
9 Ln(t) = number of times that process leaves state n by time t.
Jin Y. Wang
Chap17-7
College of Management, NCTU
Operation Research II
Spring, 2009
9 |En(t)) - Ln(t)| ≤ 1. Dividing both sides by t and letting t → ∞ .
E n (t ) Ln (t ) 1
E (t ) L (t )
−
≤ , 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
College of Management, NCTU
Operation Research II
Spring, 2009
9 Thus, the steady-state probabilities are
Pn = C n P0 , where C n =
λ 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
9 The above calculations are based on the steady-state condition. Steady-state
condition holds if λn = 0 or ρ = λ /( sμ ) < 1 .
‰ The M/M/s model
9 All interarrival and service times are independently and identically distributed
according to an exponential distribution. The number of servers is s.
9 This model is a special case of the birth-and-death process where the queueing
system’s mean arrival rate and mean service rate per busy server are constant.
9 When the system has just a single server (s = 1), the parameters for the
birth-and-death process are λ n = λ , and μ n = μ . Rate diagram is as follow.
9 When the system has multiple server (s > 1),
¾ μ n represents the mean service rate for the overall queueing system when
there are n customers in the system.
Jin Y. Wang
Chap17-9
College of Management, NCTU
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 , a queueing system will eventually reach a steady-state
sμ
condition. We can use the results derived in the birth-and-death model.
‰ Results for the Single-Server Case (M/M/1)
n
⎛λ⎞
9 The Cn factors reduce to C n = ⎜⎜ ⎟⎟ = ρ n , for n = 0, 1, 2, …
⎝μ⎠
⎛ ∞
⎞
9 Therefore, Pn = ρ P0 , for n = 0, 1, 2, …, where P0 = ⎜ ∑ ρ n ⎟
⎝ n =0 ⎠
n
−1
⎛ 1 ⎞
⎟⎟
= ⎜⎜
⎝1− ρ ⎠
−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
College of Management, NCTU
Operation Research II
Spring, 2009
9 Consider the case when λ < μ and the queue discipline is
first-come-first-served. We can derive the probability distribution of the
waiting time in the system W for a random arrival.
9 If this arrival finds n customers already in the system, then the arrival will have
to wait through n+1 exponential service times, including his/her own.
9 Let T1, T2,… be independent service-time random variables having an
exponential distribution with parameter μ , and let Sn+1=T1+T2+…+Tn+1.
∞
9 P{W >t} = ∑ Pn P{S n +1 > t} = e − μ (1− ρ )t . That is, W has an exponential distribution
n =0
with parameter μ (1 − ρ ) .
9 Therefore, W = E(W ) =
1
1
.
=
μ (1 − ρ ) μ − λ
9 Sometimes, we are concern about Wq , the waiting time in the queue.
9 If this arrival finds no customers already in the system, there is no waiting time
in queue. P{Wq = 0} = P0 = 1 − ρ .
9 If this arrival finds n > 0 customers already in the system, then the arrival has to
wait through n exponential service times until his/her own service begins.
∞
9 P{Wq > t} = ∑ Pn P{S n > t} = ρe − μ (1− ρ )t .
n =1
9 Wq does not quite have an exponential distribution, because P{Wq=0} > 0.
9 The conditional distribution of Wq, given that Wq > 0, does have an exponential
distribution with parameter μ (1 − ρ ) , because
P{Wq > t | Wq > 0} =
P{Wq > t}
P{Wq > 0}
= e − μ (1− ρ ) t .
9 By deriving the mean of the (unconditional) distribution of Wq (or applying
either Lq = λWq or Wq = W −
Jin Y. Wang
1
μ
), Wq = E(Wq) =
λ
.
μ (μ − λ )
Chap17-11
College of Management, NCTU
Operation Research II
Spring, 2009
‰ Results for the Multiple-Server Case (M/M/s) — s > 1
(λ / μ ) n
(λ / μ ) n
. For n = s, s+1,…, C n =
.
9 For n = 1, 2, …, s, C n =
n!
s! s n − s
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
1
μ
1
, L = λ (Wq + ) = Lq +
μ
λ
μ
Chap17-12
College of Management, NCTU
9 P{W > t} = e
− μt
Operation Research II
(
)
⎡ P λ/μ s
⎢1 + 0
s!(1 − ρ )
⎢⎣
⎛ 1 − e − μt ( s −1−λ / μ )
⎜⎜
⎝ s −1− λ / μ
Spring, 2009
⎞⎤
⎟⎟⎥
⎠⎥⎦
s −1
9 P{Wq > t} = (1 − P{Wq = 0})e − sμ (1− ρ )t , where P{Wq = 0} = ∑ Pn .
n =0
‰ The County Hospital Example with the M/M/s Model
9 Estimate that patients will arrive at an average rate of 1 every 1/2 hour. A doctor
requires an average of 20 minutes to treat each patient. That is, λ = 2 customers
per hour, μ = 3 customers per hour.
9 Steady-State Results
ρ
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
College of Management, NCTU
Operation Research II
Spring, 2009
n
⎛λ⎞
9 For n = 0, 1, 2, …, K, C n = ⎜⎜ ⎟⎟ = ρ n ; for n > K, C n = 0 .
⎝μ⎠
9 Therefore, for ρ ≠ 1 , P0 =
9 Thence, L =
ρ
1− ρ
−
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
9 Notice that the preceding results do not require that λ < μ .
9 When ρ < 1 , the second term in the expression for L converges to 0 as K → ∞ ,
so that all the preceding results converge to the corresponding results given for
the M/M/1 model.
L
Lq
λ
λ
9 W = , Wq =
∞
, where λ = ∑ λ n Pn = λ (1 − PK )
n =0
‰ Results for the Multiple-Server Case (M/M/s/K) – s > 1
Jin Y. Wang
Chap17-14
College of Management, NCTU
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
n−s
⎤
⎥.
⎥⎦
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 member’s outside time has an exponential distribution with
parameter λ .
Jin Y. Wang
Chap17-15
College of Management, NCTU
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)! ⎜⎝ μ ⎟⎠
⎝μ⎠
n
Cn = 0
⎡ N! ⎛ λ ⎞ n ⎤
⎜⎜ ⎟⎟ ⎥
9 Therefore, P0 = 1 / ∑ ⎢
n = 0 ⎢ ( N − n)! ⎝ μ ⎠ ⎥
⎣
⎦
N
n
N! ⎛ λ ⎞
⎜ ⎟ P0 , if n = 1, 2, …, N
Pn =
( N − n)! ⎜⎝ μ ⎟⎠
N
Lq = ∑ (n − 1) Pn = N −
n =1
N
λ+μ
(1 − P0 )
λ
L = ∑ nPn = Lq + 1 − P0 = N −
n =0
W =
Jin Y. Wang
L
λ
and Wq =
μ
(1 − P0 )
λ
Lq
λ
Chap17-16
College of Management, NCTU
Operation Research II
∞
N
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 .
n
⎛λ⎞
⎜⎜ ⎟⎟ .
⎝μ⎠
n
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
n
⎛λ⎞
⎜⎜ ⎟⎟ P0
⎝μ⎠
n
N
⎡ s −1
⎛λ⎞
N!
N!
⎜⎜ ⎟⎟ + ∑
9 P0 = 1 / ⎢∑
n−s
n = s ( N − n )! s! s
⎣⎢ n =0 ( N − n)!n! ⎝ μ ⎠
n
⎛λ⎞ ⎤
⎜⎜ ⎟⎟ ⎥
⎝ μ ⎠ ⎥⎦
N
9 Lq = ∑ (n − s ) Pn
n=s
s −1
⎛
s −1
⎞
n =0
⎝
n =0
⎠
9 L = ∑ nPn + Lq + s⎜1 − ∑ 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
College of Management, NCTU
Lq =
Operation Research II
Spring, 2009
λ 2σ 2 + ρ 2
2(1 − ρ )
L = ρ + Lq
Wq =
Lq
λ
W = Wq +
1
μ
9 For any fixed expected service time 1 / μ , notice that Lq, L, Wq, and W all
increase as σ 2 is increased.
9 When the service-time distribution is exponential, σ 2 = 1 / μ 2 , and the preceding
results will reduce to the corresponding results for the M/M/1 model.
‰ Queueing Models Involving Nonexponential Distributions – M/D/s
9 When the service consists of essentially the same routine task for all customers,
there tends to be little variation in the service time required.
9 It assumes that all service times equal some fixed constant (the degenerate
service-time distribution).
9 When there is just a single server, the M/D/1 model is just the special case of the
M/G/1 model where σ 2 = 0 .
¾ The Pollaczek-Khintchine formula reduces to Lq =
ρ2
2(1 − ρ )
.
‰ Queueing Models Involving Nonexponential Distributions – M/Ek/s
9 M/D/s model assumes zero variation and the exponential distribution assumes a
very large variation ( σ = 1 / μ ).
9 Between these two rather extreme cases lies another distribution – the Erlang
Distribution.
9 The PDF is f (t ) =
(μk )k
(k − 1)!
t k −1e − kμt , where μ and k are strictly positive parameters
and k needs to be integer. Mean =
1
μ
, and standard deviation =
1 1
k μ
.
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
College of Management, NCTU
Operation Research II
Spring, 2009
9 The Erlang distribution is a large (two-parameter) family of distributions
permitting only nonnegative values.
¾ Both the exponential and the degenerate distribution are special cases of
the Erlang distribution with k = 1 and k = ∞ , respectively.
9 Consider M/Ek/1 model, which is just the special case of the M/G/1 model.
Applying Pollaczek-Khintchine formula with σ 2 = 1 / (kμ 2 ) , we have
λ2 /(kμ 2 ) + ρ 2 1 + k
λ2
=
Lq =
2(1 − ρ )
2k μ ( μ − λ )
Wq =
1+ k
λ
2k μ ( μ − λ )
W = Wq +
1
μ
L = λW
‰ Priority-Discipline Queueing Models
9 The queue discipline is based on a priority system.
9 With nonpreemptive priorities, a customer being served cannot be ejected
back into the queue (preempted) if a higher-priority customer enters.
9 With preemptive priorities, the lowest-priority customer being served is
preempted whenever a higher-priority customer enters.
‰ Results for the Nonpreemptive Priorities Model
9 Let Wk be the steady-state expected waiting time in the system (including
service time) for a member of priority class k.
Wk =
1
ABk −1 Bk
+
1
μ
, for k = 1, 2, …, N,
sμ − λ s −1 r j
where A = s! s ∑ + sμ ,
r
j = 0 j!
B0 = 1 ,
Bk
∑
= 1−
k
i =1
λi
sμ
,
s = number of servers
μ = mean service rate per busy server,
λi = mean arrival rate for priority class i,
Jin Y. Wang
Chap17-19
College of Management, NCTU
Operation Research II
N
λ = ∑ λi ,
r=
i =0
Spring, 2009
λ
.
μ
9 Little’s formula still applies to individual priority class, so Lk = λk Wk .
‰ A Single-Server Variation of the Nonpreemptive Priority Model
9 Different priority classes have different expected service time.
9 Let 1 / μ k denote the mean of the exponential service-time distribution for
priority class k, so μ k = mean service rate for priority class k.
k
k
λi
λ
ak
1
9 Wk =
+
, where a k = ∑ 2 , b0 = 1 , bk = 1 − ∑ i .
bk −1bk μ k
i =1 μ i
i =1 μ i
‰ Results for the Preemptive Priority Model
9 Assume the expected service time is the same for all priority classes.
9 Wk =
1/ μ
, for the single-server cases.
Bk −1 Bk
9 When s > 1, Wk can be calculated by an iterative procedure that will soon be
illustrated by an example.
9 Lk = λ k W k .
‰ The County Hospital Example with Priorities
9 There are three patient categories: (1) critical (10%), (2) serious (30%), and (3)
stable (60%).
9 Give λ = 2 and μ = 3 , we have λ1 = 0.2 , λ2 = 0.6 , and λ3 = 1.2 .
Preemptive Priorities
Nonpreemptive Priorities
s=1
s=2
s=1
s=2
A
--
--
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
College of Management, NCTU
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 1−2 must equal W for the M/M/s model with s = 2, μ =3, and λ = 0.8,
which yields W 1−2 = W = 0.33937.
¾ We already know the value of W1, so W2 = 0.34126. W2 − 1 / μ = 0.00793.
9 Similarly, W 1−3 = 0.1W1 + 0.3W2 + 0.6W3 . W 1−3 equals W for the M/M/s model with
s = 2, μ =3, and λ = 2, which yields W 1−3 = 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
College of Management, NCTU
Operation Research II
Spring, 2009
9 si servers with an exponential service-time distribution with parameter μ i .
9 A customer leaving facility i is routed next to facility j (j = 1, 2, …, m) with
m
probability pij or departs the system with probability qi = 1 − ∑ pij .
j =1
‰ Key properties of Jackson Network
9 Under steady-state conditions, each facility j (j = 1, 2, …, m) in a Jackson
network behaves as if it were an independent M/M/s system with arrival rate
m
λ j = a j + ∑ λi pij , where s j μ j > λ j .
i =1
9 Consider a Jackson network with three service facilities that have the parameter
shown below.
Pij
Facility j
sj
μj
aj
i=1
i=2
i=3
j=1
1
10
1
0
0.1
0.4
j=2
2
10
4
0.6
0
0.4
j=3
1
10
3
0.3
0.3
0
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
The simultaneous solution for this system is λ1 = 5, λ2 = 10, λ3 = 7.5.
9 Each of the three facilities now can be analyzed independently by using the
formulas for the M/M/s model given before.
ρi =
λi
(That is, ρ1 = 1/2, ρ 2 = 1/2, ρ 3 = 3/4).
si μ i
Pn1 =
Pn2 =
Jin Y. Wang
Chap17-22
College of Management, NCTU
Operation Research II
Spring, 2009
Pn3 =
The join probability of (n1, n2, n3) = Pn1Pn2Pn3
L1 =
L2 =
L3 =
L =
W = L / λ = L / (a1 + a2 + a3) =
‰ The Application of Queueing Theory – How Many Servers Should be
Provided?
9 The two primary considerations in making these decisions are (1) the cost of the
service capacity and (2) the waiting cost of customers.
9 E(TC) = expected total cost per unit time.
E(SC) = expected service cost per unit time.
E(WC) = expected waiting cost per unit time.
9 When each server costs the same, the service cost is E(SC) = Css, where Cs is the
marginal cost of a server per unit time.
9 To evaluate WC for any value of s, E(WC) = CwL, where Cw is the waiting cost
per unit time for each customer.
9 Therefore, after estimating the constants, Cs and Cw, the goal is to choose the
value of s so as to Minimize E(TC) = Css + CwL.
Jin Y. Wang
Chap17-23
College of Management, NCTU
Operation Research II
Spring, 2009
‰ An Example for Determining the Number of Servers
9 For a M/M/s model with λ =120 customers per hour and μ = 80 customers per
hour.
9 We need at least two servers to reach the steady-state, since
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
3
1.74
$60
$83.37
$143.37
4
1.54
$80
$74.15
$154.15
5
1.51
$100
$72.41
$172.41
s
L
2
Jin Y. Wang
Chap17-24
Download