-
PART II
(3) Continuous Time Markov Chains : Theory and Examples-Pure
Birth Process with Constant Rates-Pure Death Process-More on
Birth-and-Death Process-Statistical Equilibrium
(4) Introduction to Queueing Systems-Basic Elements of Queueing
Models-Queueing Systems of One Server-Queueing Systems with
Multiple Servers-Little’s Queueing Formula-Applications of
Queues-An Inventory Model with Returns and Lateral Transshipments
-Queueing Sys-tems with Two Types of Customers-Queues in Tandem and
in Parallel
“All models are wrong / inaccurate, but some are useful.”George
Box (Wikipedia).
http://hkumath.hku.hk/∼wkc/course/part2.pdf1
-
3 Continuous Time Markov Chains : Theory and Examples
We discuss the theory of birth-and-death processes, the analysis
of which isrelatively simple and has important applications in the
context of queueing theory.
• Let us consider a system that can be represented by a family
of random variables{N(t)} parameterized by the time variable t.
This is called a stochastic process.
• In particular, let us assume that for each t, N(t) is a
non-negative integral-valuedrandom variable. Examples are the
followings.
(i) a telephone switchboard, where N(t) is the number of calls
occurring in aninterval of length t.
(ii) a queue, where N(t) is the number of customers waiting or
in service at timet.
We say that the system is in state Ej at time t if N(t) = j. Our
aim is to computethe state probabilities P{N(t) = j}, j = 0, 1, 2,
· · · .
2
-
Definition 1 A process obeying the following three postulates is
called abirth-and-death process:
(1) At any time t, P{Ej → Ej+1 during (t, t + h)|Ej at t} = λjh
+ o(h) ash → 0 (j = 0, 1, 2, · · · ). Here λj is a constant
depending on j (State Ej).
(2) At any time t, P{Ej → Ej−1 during (t, t + h)|Ej at t} = µjh
+ o(h) ash → 0 (j = 1, 2, · · · ). Here µj is a constant depending
on j (State Ej).
(3) At any time t, P{Ej → Ej±k during (t, t + h)|Ej at t} = o(h)
as h → 0 fork ≥ 2 (j = 0, 1, · · · ,).
�
-
µi−1
λi−2· · · � -
µi
λi−1����Ei−1
�
-
µi+1
λi����
Ei ����Ei+1
�
-
µi+2
λi+1· · ·
Figure 2.1: The Birth and Death Process.
Notation: Let Pj(t) = P{N(t) = j} and let λ−1 = µ0 = P−1(t) =
0.
3
-
• Then it follows from the above postulates that (where h → 0; j
=0, 1, . . ..)
Pj(t + h) = (λj−1h + o(h))︸ ︷︷ ︸an arrival
Pj−1(t) + (µj+1h + o(h))︸ ︷︷ ︸a departure
Pj+1(t)
+ [1− ((λj + µj)h + o(h))]︸ ︷︷ ︸no arrival or departure
Pj(t)
• Therefore we have
Pj(t + h) = (λj−1h)Pj−1(t) + (µj+1)hPj+1(t) + [1− (λj +
µj)h]Pj(t) + o(h) .
• Re-arranging terms, we havePj(t + h)− Pj(t)
h= λj−1Pj−1(t) + µj+1Pj+1(t)− (λj + µj)Pj(t) +
o(h)
h.
4
-
• Letting h → 0, we get the differential-difference
equationsd
dtPj(t) = λj−1Pj−1(t) + µj+1Pj+1(t)− (λj + µj)Pj(t). (3.1)
At time t = 0 the system is in state Ei, the initial conditions
are
Pj(0) = δij where δij =
{1 if i = j0 if i ̸= j.
Definition 2 The coefficients {λj} and {µj} are called the
birthand death rates respectively.
•When µj = 0 for all j, the process is called a pure birth
process;
• and when λj = 0 for all j, the process is called a pure
deathprocess.
• In the case of either a pure birth process or a pure death
process,the equations (3.1) can be solved by using recurrence
relation.
5
-
3.1 Pure Birth Process with Constant Rates
We consider a Pure birth process (µi = 0) with constantλj = λ
and initial state E0.
• Equations in (3.1) becomed
dtPj(t) = λPj−1(t)− λPj(t) (j = 0, 1, · · · )
where P−1(t) = 0 and Pj(0) = δ0j.
• Herej = 0, P ′0(t) = −λP0(t),
henceP0(t) = a0e
−λt.
From the initial conditions, we get a0 = 1.
6
-
• Inductively, we can prove that if
Pj−1(t) =(λt)j−1
(j − 1)!e−λt
then the equation
P ′j(t) = λ
((λt)j−1
(j − 1)!e−λt
)− λPj(t)
gives the solution
Pj(t) =(λt)j
j!e−λt. (3.2)
Remark 1 Probabilities (3.2) satisfy the normalization
condition∞∑j=0
Pj(t) = 1 (t ≥ 0).
Remark 2 For each t, N(t) is the Poisson distribution, given by
{Pj(t)}. We saythat N(t) describes a Poisson process.
Remark 3 Since the assumption λj = λ is often a realistic one,
the simple formula(3.2) plays a central role in queueing
theory.
7
-
3.1.1 Generating Function Approach
Here we demonstrate using the generating function approach for
solving thepure birth problem.
• Let {Pi} be a discrete probability density distribution for a
random variable X ,i.e.,
P (X = i) = Pi, i = 0, 1, . . . ,
Recall that the probability generating function is defined
as
g(z) =
∞∑n=0
Pnzn.
Let the probability generating function for Pn(t) be
g(z, t) =
∞∑n=0
Pn(t)zn.
• The idea is that if we can find g(z, t) and obtain its
coefficients when expressedin a power series of z then one can
solve Pn(t).
8
-
From the differential-difference equations, we have∞∑n=0
dPn(t)
dtzn = z
∞∑n=0
λPn(t)zn −
∞∑n=0
λPn(t)zn.
Assuming one can inter-change the operation between the
summation and the dif-ferentiation, then we have
dg(z, t)
dt= λ(z − 1)g(z, t)
when z is regarded as a constant.
• Then we haveg(z, t) = Keλ(z−1)t.
Since
g(z, 0) =
∞∑n=0
Pn(0)zn = 1
we have K = 1. Hence we have
g(z, t) = e−λt(1 + λz +
(λtz)2
2!+ . . .+
)=
(e−λt + e−λtλz +
e−λt(λt)2
2!z2 + . . .+
).
Then the result follows.
9
-
3.2 Pure Death Process
We then consider a pure death process with µj = jµ and initial
stateEn.
• Equations in (3.1) becomed
dtPj(t) = (j + 1)µPj+1(t)− jµPj(t) j = n, n− 1, · · · , 0
(3.3)
wherePn+1(t) = 0 and Pj(0) = δnj.
• We solve these equations recursively, starting from the case j
= n.d
dtPn(t) = −nµPn(t) , Pn(0) = 1
implies that
Pn(t) = e−nµt.
10
-
• The equation with j = n− 1 isd
dtPn−1(t) = nµPn(t)− (n− 1)µPn−1(t) = nµe−nµt − (n−
1)µPn−1(t).
• Solving this differential equation and we get
Pn−1(t) = n(e−µt)n−1(1− e−µt).
• Recursively, we get
Pj(t) =
(n
j
)(e−µt)j(1− e−µt)n−j for j = 0, 1, · · · , n. (3.4)
Remark 4 For each t, the probabilities (3.4) comprise a
binomialdistribution.
Remark 5 The number of equations in (3.3) is finite in number.
Fora pure birth process, the number of equations is infinite.
11
-
3.3 More on Birth-and-Death Process
A simple queueing example is given as follows (An illustration
of birth-and-deathprocess in queueing theory context).
• We consider a queueing system with one server and no waiting
position, with
P{one customer arriving during (t, t + h)} = λh + o(h)
and
P{service ends in (t, t + h)| server busy at t} = µh + o(h) as h
→ 0.
• This corresponds to a two state birth-and-death process with j
= 0, 1. The arrivalrates are λ0 = λ and λj = 0 for j ̸= 0 (an
arrival that occurs when the server isbusy has no effect on the
system since the customer leaves immediately); and thedeparture
rates are µj = 0 when j ̸= 1 and µ1 = µ (no customers can
completeservice when no customer is in the system).
�
-
µ
���Idle ��
��Busy
Figure 3.1. The Two-state Birth-and-Death Process.
12
-
The equations for the birth-and-death process are given by
d
dtP0(t) = −λP0(t) + µP1(t) and
d
dtP1(t) = λP0(t)− µP1(t). (3.5)
One convenient way of solving this set of simultaneous linear
differential equations(not a standard method!) is as follows:
• Adding the two equations in (3.5), we getd
dt(P0(t) + P1(t)) = 0,
hence P0(t) + P1(t) = constant.
• Initial conditions are P0(0) + P1(0) = 1; thus P0(t) + P1(t) =
1. Hence we get
d
dtP0(t) + (λ + µ)P0(t) = µ.
The solution (exercise) is given by
P0(t) =µ
λ + µ+
(P0(0)−
µ
λ + µ
)e−(λ+µ)t.
13
-
Since P1(t) = 1− P0(t),
P1(t) =λ
λ + µ+
(P1(0)−
λ
λ + µ
)e−(λ+µ)t. (3.6)
• For the three examples of birth-and-death processes that we
have considered, thesystem of differential-difference equations are
much simplified and can therefore besolved very easily.
• In general, the solution of differential-difference equations
is no easy matter. Herewe merely state the properties of its
solution without proof.
Proposition 1 For arbitrarily prescribed coefficients λn ≥ 0, µn
≥ 0 therealways exists a positive solution {Pn(t)} of
differential-difference equations(3.1) such that ∑
Pn(t) ≤ 1.If the coefficients are bounded, this solution is
unique and satisfies the regu-larity condition
∑Pn(t) = 1.
Remark 6 Fortunately in all cases of practical significance, the
regularity condi-tion
∑Pn(t) = 1 and uniqueness of solution are satisfied.
14
-
3.4 Statistical Equilibrium (Steady-State Probability
Distribution)
Consider the state probabilities of the above example when t →
∞, from (3.6) wehave
P0 = limt→∞
P0(t) =µ
λ + µ
P1 = limt→∞
P1(t) =λ
λ + µ.
(3.7)
We note that P0 + P1 = 1 and they are called the steady-state
probabilitiesof the system.
Remark 7 Both P0 and P1 are independent of the initial values
P0(0) and P1(0).If at time t = 0,
P0(0) =µ
λ + µ= P0
P1(0) =λ
λ + µ= P1,
(come from Eq. (3.6)) clearly show that these initial values
will persist for ever.
15
-
• This leads us to the important notion of statistical
equilibrium. Wesay that a system is in statistical equilibrium (or
the state dis-tribution is stationary) if its state probabilities
are constant in time.
• Note that the system still fluctuate from state to state, but
there isno net trend in such fluctuations.
• In the above queueing example, we have shown that the
systemattains statistical equilibrium as t → ∞.
• Practically speaking, this means the system is in statistical
equi-librium after sufficiently long time (so that initial
conditions have nomore effect on the system). For the general
birth-and-death processes,the following holds.
16
-
Proposition 2 (a) Let Pj(t) be the state probabilities of a
birth-and-deathprocess. Then
limt→∞
Pj(t) = Pj
exist and are independent of the initial conditions; they
satisfy the system oflinear difference equations obtained from the
difference-differential equationsin previous chapter by replacing
the derivative on the left by zero.(b) If all µj > 0 and the
series
S = 1 +λ0µ1
+λ0λ1µ1µ2
+ · · · + λ0λ1 · · ·λj−1µ1µ2 · · ·µj
+ . . .+ (3.8)
converges, then
P0 = S−1 and Pj =
λ0λ1 · · ·λj−1µ1µ2 · · ·µj
S−1 (j = 1, 2, · · · ).
If the series in Eq. (3.8) diverges, then
Pj = 0 (j = 0, 1, · · · ) .
17
-
Proof: We shall NOT attempt to prove Part (a) of the above
proposition, butrather we assume the truth of (a) and use it to
prove Part (b).
By using part (a) of the proposition, we obtain the following
linear difference equa-tions.
(λj + µj)Pj = λj−1Pj−1 + µj+1Pj+1(λ−1 = µ0 = 0 ; j = 0, 1, · · ·
) P−1 = 0 .
(3.9)
Re-arranging terms, we have
λjPj − µj+1Pj+1 = λj−1Pj−1 − µjPj . (3.10)
If we letf (j) = λjPj − µj+1Pj+1
then Equation (3.10) simply becomes
f (j) = f (j − 1) for j = 0, 1, · · ·
as f (−1) = 0. Hencef (j) = 0 (j = 0, 1, · · · ).
18
-
This impliesλjPj = µj+1Pj+1.
By recurrence, we get (if µ1, · · · , µj > 0)
Pj =λ0λ1 · · ·λj−1µ1 · · ·µj
P0 (j = 1, 2, · · · ). (3.11)
Finally, by using the normalization condition∑
Pj = 1 we have the result in part(b).
Remark 8 Part (a) of the above proposition suggests that to find
the statisticalequilibrium distribution
limt→∞
Pj(t) = Pj.
We set the derivatives on the left side of
difference-differential equations to be zeroand replace Pj(t) by Pj
and then solve the linear difference equations for Pj. Inmost
cases, the latter method is much easier and shorter.
Remark 9 If µj = 0 for some j = k (λj > 0 for all j), then,
as equation (3.11)shows,
Pj = 0 for j = 0, 1, · · · , k − 1.In particular, for pure birth
process, Pj = 0 for all j.
19
-
Example 1 Suppose that for all i we have
λi = λ and µj = jµ
then
S = 1 +λ
µ+
1
2!
(λ
µ
)2+
1
3!
(λ
µ
)3+ . . .+ = e
λµ .
Therefore we have the Poisson distribution
Pj =1
j!
(λ
µ
)je−λµ .
Example 2 Suppose that for all i we have
λi = λ and µj = µ
such that λ < µ then
S = 1 +λ
µ+
(λ
µ
)2+
(λ
µ
)3+ . . .+ =
1
1− λµ.
Therefore we have the Geometric distribution
Pj =
(λ
µ
)j(1− λ
µ).
20
-
3.5 A Summary of Learning Outcomes
• Able to give the definition of a birth-and-death process.
• Able to derive the general solutions for the pure birth
process, the pure deathprocess and the two-state birth-and-death
process.
• Able to compute and interpret the steady-state solution of a
birth-and-death pro-cess.
• Able to give the condition for the existence of the
steady-state probability of abirth-and-death process.
21
-
3.6 Exercises
1. For the pure death process with death rate µj = jµ, prove
that
pj(t) =
(n
j
)(e−µt)j(1− e−µt)n−j (j = 0, 1, · · · , n)
where n is the state of the system at t = 0 and pj(t) is the
probability that thesystem is in State j at time t.
2. In a birth and death process, if
λi = λ/(i + 1) and µi = µ
show that the equilibrium distribution is Poisson.
3. Consider a birth-death system with the following birth and
death coefficients:{λk = (k + 2)λ k = 0, 1, 2, . . .µk = kµ k = 0,
1, 2, . . . .
All other coefficients are zero.(a) Solve for pk. Make sure you
express your answer explicitly in terms of λ, kand µ only.(b) Find
the average number of customers in the system.
22
-
3.7 Suggested Solutions
1. In the assumed pure death process, actually the lifetime of
each of the individualfollows the exponential distribution µe−µx.
The probability that one can surviveover time t will be given by ∫
∞
t
µe−µxdx = e−µt.
Therefore the probability that one can find j still survive at
time t is given by(n
j
)(e−µt)j(1− e−µt)n−j (j = 0, 1, · · · , n)
2. Let Pi be the steady-state probability and
Pj =λ0λ1 · · ·λj−1µ1 · · ·µj
P0 (j = 1, 2, · · · )
=λjP0j!µj
and P0 = (∑∞
i=0 Pi)−1 = (eλ/µ)−1. Hence we have a Poisson distribution
Pn =λje−λ/µ
j!µj.
23
-
3. (a) Because λk = (k + 2)λ and µk = kµ, we can get that
s = 1 + 2λ
µ+ · · · + (j + 1)(λ
µ)j + · · ·+ =
∞∑k=1
kρk−1 =1
(1− ρ)2
soP0 = 1/s = (1− ρ)2
andPi = (i + 1)ρ
i(1− ρ)2.(b)
E =∞∑k=0
iPi = 0 · P0 +∞∑k=1
k(k + 1)ρk(1− ρ)2 = 2ρ1− ρ
.
Note: ∞∑k=1
k(k + 1)ρk−1 =d
dρ
∞∑k=1
(k + 1)ρk =d
dρ[d
dρ
∞∑k=1
ρk+1]
24
-
4 Introduction to Queueing Systems
A queueing situation 1 is basically characterized by a flow of
customers arriving ata service facility. On arrival at the facility
the customer may be served immediatelyby a server or, if all the
servers are busy, may have to wait in a queue until a serveris
available. The customer will then leave the system upon completion
of service.The following are some typical examples of such queueing
situations:
(i) Shoppers waiting in a supermarket [Customer: shoppers;
servers: cashiers].
(ii) Diners waiting for tables in a restaurant [Customers:
diners; servers: tables].
(iii) Patients waiting at an outpatient clinic [Customers:
patients; servers: doctors].
(iv) Broken machines waiting to be serviced by a repairman
[Customers: machines;server: repairman].
(v) People waiting to take lifts. [Customers: people; servers:
lifts].
(vi) Parts waiting at a machine for further processing.
[Customers: parts; servers:machine].
1Queueing theory is the mathematical study of waiting lines, or
queues. In queueing theory a model is constructed so that queue
lengths and waitingtimes can be predicted. Queueing theory is
generally considered a branch of operations research because the
results are often used when making businessdecisions about the
resources needed to provide a service. Queueing theory has its
origins in research by Agner Krarup Erlang when he created models
todescribe the Copenhagen telephone exchange. The ideas have since
seen applications including telecommunications, traffic
engineering, computing and thedesign of factories, shops, offices
and hospitals. (Taken from From Wikipedia)
25
-
• In general, the arrival pattern of the customers and the
service time allo-cated to each customer can only be specified
probabilistically. Such service facilitiesare difficult to schedule
“optimally” because of the presence of randomness elementin the
arrival and service patterns.
• A mathematical theory has thus evolved that provides means for
analyzing suchsituations. This is known as queueing theory (waiting
line theory, congestiontheory, the theory of stochastic service
system), which analyzes the operating char-acteristics of a
queueing situation with the use of probability theory.
• Examples of the characteristics that serve as a measure of the
performance of asystem are the “expected waiting time until the
service of a customeris completed” or “the percentage of time that
the service facility isnot used”.
• Availability of such measures enables analysts to decide on an
optimal way ofoperating such a system.
26
-
4.1 Basic Elements of Queueing Models
A queueing system is specified by the following elements.
(i) Input Process: How do customers arrive? Often, the input
pro-cess is specified in terms of the distribution of the lengths
of timebetween consecutive customer arrival instants (called the
inter-arrival times ). In some models, customers arrive and are
servedindividually (e.g. supermarkets and clinic). In other
models,customers may arrive and/or be served in groups (e.g. lifts)
andis referred to as bulk queues.
• Customer arrival pattern also depends on the source from
whichcalls for service (arrivals of customers) are generated. The
callingsource may be capable of generating a finite number of
cus-tomers or (theoretically) infinitely many customers.
27
-
• In a machine shop with four machines (the machines are the
cus-tomers and the repairman is the server), the calling source
beforeany machine breaks down consists of four potential customers
(i.e.anyone of the four machines may break down and therefore
callsfor the service of the repairman). Once a machine breaks down,
itbecomes a customer receiving the service of the repairman
(untilthe time it is repaired), and only three other machines are
capablegenerating new calls for service.
This is a typical example of a finite source, where an
arrivalaffects the rate of arrival of new customers.
• For shoppers in a supermarket, the arrival of a customer
normallydoes not affect the source for generating new customer
arrivals, andis therefore referred to as an input process with
infinite source.
28
-
(ii) Service Process: The time allocated to serve a customer
(ser-vice time) in a system (e.g. the time that a patient is served
bya doctor in an outpatient clinic) varies and is assumed to
followsome probability distribution.
• Some facility may include more than one server, thus allowing
asmany customers as the number of servers to be serviced
simulta-neously (e.g. supermarket cashiers). In this case, all
servers offerthe same type of service and the facility is said to
have parallelservers .
• In some other models, a customer must pass through a series
ofservers one after the other before service is completed (e.g.
pro-cessing a product on a sequence of machines). Such situations
areknown as queues in series or tandem queues.
29
-
(iii) Queue Discipline: The manner that a customer is chosenfrom
the waiting line to start service is called the queue disci-pline
.
• The most common discipline is the first-come-first-served
rule(FCFS). Service in random order (SIRO), last-come-first-serve
(LCFS)and service with priority are also used.
• If all servers are busy, in some models an arriving customer
mayleave immediately (Blocked Customers Cleared: BCC),or in some
other models may wait until served (Blocked Cus-tomers Delay:
BCD).
• In some facility, there is a restriction on the size of the
queue. Ifthe queue has reached a certain size, then all new
arrivals will becleared from the system.
30
-
4.1.1 Some Simple Examples
(i) (Input process) If the inter-arrival time of any two
customersis a constant, let say one hour then at the end of the
second hourthere will be 2 arrived customers.
Suppose that customers only arrive at the end of each hour
andthe probability that there is an arrival of customer is 0.5.
Let x be the number of customers arrived at the end of the
secondhour. Then by the end of the second hour, we won’t know
thenumber of customers arrived.
However, we know the probability that there are x arrived
cus-tomers is given by (why?)
P (x = 0) = 0.25, P (x = 1) = 0.5 and P (x = 2) = 0.25.
31
-
(ii) (Service Process) Suppose that there is a job to be
processedby a machine. The job requires a one-hour machine time.
For areliable machine, it takes one hour to finish the job.
If the machine is unreliable and it may break down at the
begin-ning of every hour with a probability of p. Once it breaks
down ittakes one hour to fix it. But it may break down immediately
afterthe repair with the same probability p(0 < p < 1).
Clearly it takesat least one hour to finish the job but it may take
much longer time.
Let x be the number of hours to finish the job. Then the
probabilitythat the job can be finished at the end of the nth hour
is given bythe Geometric distribution
P (x = k) = pk−1(1− p), k = 1, 2, . . . .
32
-
(iii) (Queueing Disciplines) Suppose there are three customers
A,B and Cwaiting at a counter for service and their service times
are in the following order10 minutes, 20 minutes and 30
minutes.Clearly it takes 10 + 20 + 30 = 60 minutes to finish all
the service. However,the average waiting time before service for
the three customers can be quitedifferent for different service
disciplines.
Case 1: (FCFS): The waiting time for the first customer is zero,
the waitingtime for the second customer is 10 minutes and the
waiting time for the thirdcustomers is 10 + 20 = 30 minutes.
Therefore the average waiting time beforeservice is
(0 + 10 + 30)/3 = 40/3.
Case 2: (LCFS): The waiting time for the first customer is zero,
the waitingtime for the second customer is 30 minutes and the
waiting time for the thirdcustomers is 30 + 20 = 50 minutes.
Therefore the average waiting time beforeservice is
(0 + 30 + 50)/3 = 80/3
minutes which is twice of that in Case 1!
33
-
4.1.2 Definitions in Queueing Theory
To analyze a queueing system, normally we try to estimate
quantities such as theaverage number of customers in the system,
the fluctuation of the number of cus-tomers waiting, the proportion
of time that the servers are idle, . . . etc.
• Let us now define formally some entities that are frequently
used to measure theeffectiveness of a queueing system (with s
parallel servers).
(i) pj = the probability that there are j customers in the
system (waiting or inservice) at an arbitrary epoch (given that the
system is in statistical equi-librium or steady-state).
Equivalently pj is defined as the proportion oftime that there are
j customers in the system (in steady state).
(ii) a = offered load = mean number of requests per service
time. (In a systemwhere blocked customers are cleared, requests
that are lost are also counted.)
(iii) ρ = traffic intensity = offered load per server = a/s (s
< ∞).
34
-
(iv) a′ = carried load = mean number of busy servers.
(v) ρ′ = server occupancy (or utilization factor) = carried load
per server =a′/s.
(vi) Ws = mean waiting time in the system,i.e the mean length of
timefrom the moment a customer arrives until the customer leaves
the system (alsocalled sojourn time).
(vii) Wq = mean waiting time in the queue, i.e. the mean length
of timefrom the moment a customer arrives until the customer’
service starts .
(viii) Ls = mean number of customers in the system, i.e.
including allthe customers waiting in the queue and all those being
served.
(ix) Lq = mean number of customers waiting in the queue.
35
-
Remark 10 If the mean arrival rate is λ and the mean service
time is τ then theoffered load a = λτ .
Remark 11 For an s server system, the carried load
a′ =
s−1∑j=0
jpj + s
∞∑j=s
pj.
Hence
a′ ≤ s∞∑j=0
pj = s and ρ′ =
a′
s≤ 1.
Remark 12 If s = 1 then a′ = ρ′ and a = ρ.
Remark 13 The carried load can also be considered as the mean
number of cus-tomers completing service per mean service time τ .
Hence in a system whereblocked customers are cleared, clearly the
carried load is less than the offered load.On the other hand, if
all requests are handled, then the carried load = the offeredload.
In general
a′ = a(1−B)where B = proportion of customers lost (or requests
that are cleared).
36
-
4.1.3 Kendall’s Notation
It is convenient to use a shorthand notation (introduced by
D.G.Kendall)of the form a/b/c/d to describe queueing models, where
a specifiesthe arrival process, b specifies the service time, c is
the number ofservers and d is the number of waiting space. For
example,
(i) GI/M/s/n : General Independent input, exponential
(Markov)service time, s servers, n waiting space;
(ii) M/G/s/n : Poisson (Markov) input, arbitrary (General)
servicetime, s servers, n waiting space;
(iii) M/D/s/n : Poisson (Markov) input, constant
(Deterministic)service time, s servers, n waiting space;
(iv) Ek/M/s/n: k-phase Erlangian inter-arrival time,
exponential(Markov) service time, s servers, n waiting space;
(v) M/M/s/n : Poisson input, exponential service time, s
servers, nwaiting space.
37
-
Here are some examples.
(i) M/M/2/10 represents
A queueing system whose arrival and service process are
randomand there are 2 servers and 10 waiting space in the
system.
(ii) M/M/1/∞ represents
A queueing system whose arrival and service process are
randomand there is one server and no limit in waiting space.
38
-
4.2 Queueing Systems of One Server
In this section we will consider queueing systems having one
server only.
4.2.1 One-server Queueing Systems Without Waiting Space
(Re-visit)
• Consider a one-server system of two states: 0 (idle) and 1
(busy).
• The inter-arrival time of customers follows the exponential
distribution with pa-rameter λ.
• The service time also follows the exponential distribution
with parameter µ.There is no waiting space in the system.
• An arrived customer will leave the system when he finds the
server is busy (AnM/M/1/0 queue). This queueing system resembles an
one-line telephone systemwithout call waiting.
39
-
4.2.2 Steady-state Probability Distribution
We are interested in the long-run behavior of the system, i.e.,
when t → ∞. Why?
Remark 14 Let P0(t) and P1(t) be the probability that there is 0
and 1 customerin the system. If at t = 0 there is a customer in the
system, then
P0(t) =µ
λ + µ(1− e−(λ+µ)t)
and
P1(t) =1
λ + µ(µe−(λ+µ)t + λ).
Here P0(t) and P1(t) are called the transient probabilities. We
have
p0 = limt→∞
P0(t) =µ
λ + µ
and
p1 = limt→∞
P1(t) =λ
λ + µ.
Here p0 and p1 are called the steady-state probabilities.
40
-
• Moreover, we have∣∣∣∣P0(t)− µλ + µ∣∣∣∣ = µe−(λ+µ)tλ + µ → 0 as
t → ∞
and ∣∣∣∣P1(t)− λλ + µ∣∣∣∣ = µe−(λ+µ)tλ + µ → 0 as t → ∞
very fast.
• This means that the system will go into the steady state very
fast.
• Therefore, it will be a good idea if we focus on the
steady-stateprobability instead of the transient probability. The
former is easierto be obtained.
41
-
4.2.3 The Meaning of the Steady-state Probability
The meaning of the steady-state probabilities p0 and p1 is as
follows.
• In the long run, the probability that there is no customer in
the system is p0 andthere is one customer in the system is p1.
For the server: In other words, in the long run, the proportion
of time that theserver is idle is given by p0 and the proportion of
time that the server is busy isgiven by p1.
For the customers: In the long run, the probability that an
arrived customercan have his/her service is given by p0 and the
probability that an arrived customerswill be rejected by the system
is given by p1.
Remark 15 The system goes to its steady state very quickly. In
general it ismuch easier to obtain the steady-state probabilities
of a queueing system than thetransient probabilities. Moreover we
are interested in the long-run performance ofthe system. Therefore
we will focus on the steady-state probabilities of a
queueingsystem.
42
-
4.2.4 The Markov Chain and the Generator Matrix
A queueing system can be represented by a continuous timeMarkov
chain (statesand transition rates). We use the number of customers
in the system to representthe state of the system. Therefore we
have two states (0 and 1). The transitionrate from State 1 to State
0 is µ and The transition rate from State 0 to State 1 is λ.
• In State 0, change of state occurs when there is an arrival of
customers and thewaiting time is exponentially distributed with
parameter λ.
• In State 1, change of state occurs when the customer finishes
his/her service andthe waiting time is exponentially distributed
with parameter µ.
• Recall that from the no-memory (Markov) property, the waiting
timedistribution for change of state is the same independent of the
past history (e.g.how long the customer has been in the
system).
�
-
µ
���0 ��
��1
Figure 4.1. The Markov Chain of the Two-state System.
43
-
• From theMarkov chain, one can construct the generator matrix
as follows:
A1 =
(−λ µλ −µ
).
What is the meaning of the generator matrix? The steady-state
probabilities willbe the solution of the following linear
system:
A1p =
(−λ µλ −µ
)(p0p1
)=
(00
)(4.1)
subject to p0 + p1 = 1.
Remark 16 Given a Markov chain (generator matrix) one can
construct the cor-responding generator (Markov chain). To interpret
the system of linear equations.We note that in steady state, the
expected incoming rate and the expected outgoing rate at any state
must be equal. Therefore, we have the followings:
• At State 0: expected out going rate = λp0 = µp1 = expected
incoming rate;
• At State 1: expected out going rate = µp1 = λp0 = expected
incoming rate.
44
-
4.2.5 One-Server Queueing System with Waiting Space
�
-
µ
���0
�
-
µ
���1
�
-
µ
���2 ��
��3 ��
��4
�
-
µ
λ
Figure 4.2. The Markov chain for the M/M/1/3 queue.
• Consider an M/M/1/3 queue. The inter-arrival of customers and
the service timefollow the exponential distribution with parameters
λ and µ respectively. Thereforethere are 5 possible states.
Why?
• The generator matrix is a 5× 5 matrix.
A2 =
−λ µ 0λ −λ− µ µ
λ −λ− µ µλ −λ− µ µ
0 λ −µ
. (4.2)
45
-
Let the steady-state probability distribution be
p = (p0, p1, p2, p3, p4)T .
In steady state we have A2p = 0.
• We can interpret the system of equations as follows:
At State 0: the expected out going rate = λp0 = µp1 = expected
incoming rate;
At State 1: the expected out going rate = (λ + µ)p1 = λp0 + µp2
= expectedincoming rate.
At State 2: the expected out going rate = (λ + µ)p2 = λp1 + µp3
= expectedincoming rate;
At State 3: the expected out going rate = (λ + µ)p3 = λp2 + µp4
= expectedincoming rate.
At State 4: the expected out going rate = µp4 = λp3 = expected
incoming rate.
46
-
We are going to solve p1, p2, p3, p4 in terms of p0.
• From the first equation −λp0 + µp1 = 0, we have
p1 =λ
µp0.
• From the second equation λp0 − (λ + µ)p1 + µp2 = 0, we
have
p2 =λ2
µ2p0.
• From the third equation λp1 − (λ + µ)p2 + µp3 = 0, we have
p3 =λ3
µ3p0.
• Finally from the fourth equation λp2 − (λ + µ)p3 + µp4 = 0, we
have
p4 =λ4
µ4p0.
The last equation is not useful as A2 is singular (Check!).
47
-
• To determine p0 we make use of the fact thatp0 + p1 + p2 + p3
+ p4 = 1.
• Therefore
p0 +λ
µp0 +
λ2
µ2p0 +
λ3
µ3p0 +
λ4
µ4p0 = 1.
• Let ρ = λ/µ, we have
p0 = (1 + ρ + ρ2 + ρ3 + ρ4)−1
andpi = p0ρ
i, i = 1, 2, 3, 4.
•What is the solution of a general one-server queueing system
(M/M/1/n)? We shall discuss it in the next section.
48
-
4.2.6 General One-server Queueing System
Consider a one-server queueing system with waiting space. The
inter-arrival of cus-tomers and the service time follows the
Exponential distribution with parametersλ and µ respectively.
• There is a waiting space of size n−2 in the system. An arrived
customer will leavethe system only when he finds no waiting space
left. This is an M/M/1/n−2 queue.
• We say that the system is in state i if there are i customers
in the system. Theminimum number of customers in the system is 0
and the maximum number ofcustomers is n − 1 (one at the server and
n − 2 waiting in the queue). Thereforethere are n possible states
in the system. The Markov chain of the system is shownin Figure
4.3.
�
-
µ
���0
�
-
µ
λ����1 · · · � -
µ
λ����s · · · ��
��n− 1
�
-
µ
λ
Figure 4.3. The Markov Chain for the M/M/1/n-2 Queue.
49
-
• If we order the state from 0 up to n−1, then the generator
matrix for the Markovchain is given by the following tridiagonal
matrix A2:
0 1 2 3 · · · n− 3 n− 2 n− 1012.........
n− 2n− 1
−λ µ 0λ −λ− µ µ
. . . . . . . . .
λ −λ− µ µλ −λ− µ µ. . . . . . . . .
λ −λ− µ µ0 λ −µ
.
(4.3)
• We are going to solve the probability distribution p. Let
p = (p0, p1, . . . , pn−2, pn−1)T
be the steady-state probability vector. Here pi is the
steady-state probability thatthere are i customers in the system
and we have also
A2p = 0 andn−1∑i=0
pi = 1.
50
-
• To solve pi we begin with the first equation:
−λp0 + µp1 = 0 ⇒ p1 =λ
µp0.
We then proceed to the second equation:
λp0 − (λ + µ)p1 + µp2 = 0 ⇒ p2 = −λ
µp0 + (
λ
µ+ 1)p1 ⇒ p2 =
λ2
µ2p0.
Inductively, we may get
p3 =λ3
µ3p0,
p4 =λ4
µ4p0,
, . . . ,
pn−1 =λn−1
µn−1p0.
• Let ρ = λ/µ (the traffic intensity), we have
pi = ρip0, i = 0, 1, . . . , n− 1.
51
-
• To solve for p0 we need to make use of the
conditionn−1∑i=0
pi = 1.
Therefore we getn−1∑i=0
pi =
n−1∑i=0
ρip0 = 1.
One may obtain
p0 =1− ρ1− ρn
.
• Hence the steady-state probability distribution vector p is
given by1− ρ1− ρn
(1, ρ, ρ2, . . . , ρn−1)T .
52
-
4.2.7 Performance of a Queueing System
Remark 17 Using the steady-state probability distribution, one
can compute
(a) the probability that a customer finds no more waiting space
left when he arrives
pn−1 =1− ρ1− ρn
ρn−1.
(b) the probability that a customer finds the server is not busy
(he can have theservice immediately) when he arrives
p0 =1− ρ1− ρn
.
(c) the expected number of customer at the server:
Lc = 0 · p0 + 1 · (p1 + p2 + . . . + pn−1)=
1− ρ1− ρn
(ρ + ρ2 + . . . + ρn−1)
=ρ(1− ρn−1)
1− ρn.
(4.4)
53
-
(d) the expected number of customers in the system is given
by
Ls =
n−1∑i=0
ipi =
n−1∑i=1
ip0ρi
=ρ− nρn + (n− 1)ρn+1
(1− ρ)(1− ρn).
(4.5)
(e) the expected number of customers in the queue
Lq =
n−1∑i=1
(i− 1)pi
=
n−1∑i=1
(i− 1)p0ρi
=
n−1∑i=1
ip0ρi −
n−1∑i=1
p0ρi
=ρ2 − (n− 1)ρn + (n− 2)ρn+1
(1− ρ)(1− ρn).
(4.6)
We note that Ls = Lq + Lc.
54
-
Remark 18 To obtain the results in (d) and(e) we need the
following results.
n−1∑i=1
iρi =1
1− ρ
n−1∑i=1
(1− ρ)iρi
=1
1− ρ
(n−1∑i=1
iρi −n−1∑i=1
iρi+1
)=
1
1− ρ(ρ + ρ2 + . . . + ρn−1 − (n− 1)ρn
)=
ρ + (n− 1)ρn+1 − nρn
(1− ρ)2.
(4.7)
Moreover if |ρ| < 1 we have∞∑i=1
iρi =ρ
(1− ρ)2.
55
-
4.3 Queueing Systems with Multiple Servers
Now let us consider a more general queueing system with s
parallel and iden-tical exponential servers. The customer arrival
rate is λ and the service rateof each server is µ. There are n− s−
1 waiting space in the system.
• The queueing discipline is again FCFS. When a customer arrives
and finds all theservers busy, the customer can still wait in the
queue if there is waiting space avail-able. Otherwise, the customer
has to leave the system, this is an M/M/s/n− s− 1queue.
• Before we study the steady-state probability of this system,
let us discuss thefollowing example (re-visited).
• Suppose there are k identical independent busy exponential
servers, let t be thewaiting time for one of the servers to be free
(change of state), i.e. one of thecustomers finishes his
service.
56
-
• We let t1, t2, . . . , tk be the service time of the k
customers in the system. Thenti follows the Exponential
distribution λe
−λt and
t = min{t1, t2, . . . , tk}.
We will derive the probability density function of t.
• We note thatProb(t ≥ x) = Prob(t1 ≥ x) · Prob(t2 ≥ x) . .
.Prob(tk ≥ x)
=
(∫ ∞x
λe−λtdt
)k= (e−λx)k = e−kλx.
(4.8)
• Thus ∫ ∞x
f (t)dt = e−kλx and f (t) = kλe−kλt.
Therefore the waiting time t is still exponentially distributed
with parameterkλ.
57
-
m��p pm��p pm��p p...
m��p pm��p pm��p p
1 2 3 · · ·k · · · n− s− 1p p p p p p · · · p p · · · � λ
�µ�µ�µ
�µ�µ�µ
: empty buffer in queuep p : customer waiting in queuem��p p :
customer being served
Figure 4.4. The multiple server queue.
• To describe the queueing system, we use the number of
customers in the queueingsystem to represent the state of the
system.
• There are n possible states (number of customers), namely 0,
1, . . . , n− 1.
58
-
The Markov chain for the queueing system is given in the
following figure.
�
-
µ
���0
�
-
2µ
λ����1 · · · � -
sµ
λ����s · · · ��
��n− 1
�
-
sµ
λ
Figure 4.5. The Markov chain for the M/M/s/n− s− 1 queue.
• If we order the states of the system in increasing number of
customers the it isnot difficult to show that the generator matrix
for this queueing system is given bythe following n× n tri-diagonal
matrix:
A3 =
−λ µ 0λ −λ− µ 2µ
. . . . . . . . .
λ −λ− sµ sµ. . . . . . . . .
λ −λ− sµ sµ0 λ −sµ
. (4.9)
59
-
4.3.1 A Two-server Queueing System
• Let us consider a small size example, a M/M/2/2 queue.
�
-
µ
���0
�
-
2µ
���1
�
-
2µ
���2 ��
��3 ��
��4
�
-
2µ
λFigure 4.6. The Markov Chain for the M/M/2/2 Queue.
• The generator matrix is an 5× 5 matrix.
A4 =
−λ µ 0λ −λ− µ 2µ
λ −λ− 2µ 2µλ −λ− 2µ 2µ
0 λ −2µ
. (4.10)Let the steady-state probability distribution be
p = (p0, p1, p2, p3, p4)T .
In steady state we have A4p = 0.
60
-
• From the first equation −λp0 + µp1 = 0, we have
p1 =λ
µp0.
• From the second equation λp0 − (λ + µ)p1 + 2µp2 = 0, we
have
p2 =λ2
2!µ2p0.
• From the third equation λp1 − (λ + 2µ)p2 + 2µp3 = 0, we
have
p3 =λ3
2 · 2!µ3p0.
• Finally from the fourth equation
λp2 − (λ + 2µ)p3 + 2µp4 = 0,
we have
p4 =λ4
22 · 2!µ4p0.
The last equation is not useful as A4 is singular.
61
-
To determine p0 we make use of the fact that
p0 + p1 + p2 + p3 + p4 = 1.
Therefore
p0 +λ
µp0 +
λ2
2!µ2p0 +
λ3
2 · 2!µ3p0 +
λ4
222!µ4p0 = 1.
Letτ = λ/(2µ)
we have
p0 =
(1 +
λ
µ+ (
λ2
2!µ2)1− τ 3
1− τ
)−1and
p1 =λ
µp0
and
pi = p0
(λ2
2!µ2
)τ i−2, i = 2, 3, 4.
62
-
• The result above can be further extended to the M/M/2/k queue
as follows:
p0 =
(1 +
λ
µ+ (
λ2
2!µ2)1− τ k+1
1− τ
)−1, p1 =
λ
µp0, and pi = p0(
λ2
2!µ2)τ i−2, i = 2, . . . , k+2.
The queueing system has finite number of waiting space.
• The result above can also be further extended to M/M/2/∞ queue
when τ =λ/(2µ) < 1 as follows:
p0 =
(1 +
λ
µ+ (
λ2
2!µ2)
1
1− τ
)−1, p1 =
λ
µp0, and pi = p0(
λ2
2!µ2)τ i−2, i = 2, 3, . . . .
or
p0 =1− τ1 + τ
, and pi = 2p0τi, i = 1, 2, . . . .
The queueing system has infinite number of waiting space.
• We then derive the expected number of customers in the
system.
63
-
4.3.2 Expected Number of Customers in the M/M/2/∞ Queue
• The expected number of customers in the M/M/2/∞ queue is given
by
Ls =
∞∑k=1
kpk =1− τ1 + τ
∞∑k=1
2kτ k.
Now we let
S =
∞∑k=1
kτ k = τ + 2τ 2 + . . .+
and we haveτS = τ 2 + 2τ 3 + . . . + .
Therefore by subtraction we get
(1− τ )S = τ + τ 2 + τ 3 + . . .+ = τ1− τ
andS =
τ
(1− τ )2.
We have
Ls =2τ
1− τ 2. (4.11)
64
-
4.3.3 Multiple-Server Queues
Now we consider general queueing models with Poisson input,
in-dependent, identically distributed, exponential service times
and sparallel servers.
Specifically, we shall consider two different queue disciplines,
namely
- Blocked Customers Cleared (BCC), and
- Block Customers Delayed (BCD).
In the following, we assume that the Poisson input has rate λ
and theexponential service times have mean µ−1 .
65
-
4.3.4 Blocked Customers Cleared (Erlang loss system)
The queueing system has s servers and there is no waiting
spaceand we assume blocked customers are cleared.
Total possible number of states is s+ 1 and the generator matrix
forthis system is given by
A5 =
−λ µ 0λ −λ− µ 2µ
λ −λ− 2µ. . . . . . . . .
λ −λ− (s− 1)µ sµ0 λ −sµ
.
66
-
Let pi be the steady-state probability that there are i
customers inthe queueing system. Then by solving
A5p = 0 withs∑
i=0
pi = 1
one can get
pj =(λ/µ)j/j!s∑
k=0(λ/µ)k/k!
(j = 0, 1, · · · , s)
=aj/j!s∑
k=0ak/k!
(4.12)
and pj = 0 for j > s ; where a = λ/µ is the offered load.
• This distribution is called the truncated Poisson
distribution(also called Erlang loss distribution).
67
-
• On the other hand, one can identify this system as a
birth-and-death process, weproceed to find pj. Since customers
arrive at random with rate λ, but affect statechanges only when j
< s (BCC), the arrival rates (the birth rates) are
λj =
{λ when j = 0, · · · , s− 10 when j = s
Since service times are exponential, the service completion
rates (the death rates)are
µj = jµ (j = 0, 1, 2, · · · , s).
Remark 19 The proportion of customers who have requested for
ser-vice but are cleared from the system (when all servers are
busy) isgiven by ps which is also called the Erlang loss formula
and isdenoted by
B(s, a) =as/s!
s∑k=0
(ak/k!)
.
68
-
Remark 20 The mean number of busy servers, which is also equal
tothe mean number of customers completing service per mean
servicetime, is given by the carried load
a′ =s∑
j=1
jpj.
An interesting relation can be derived between the Erlang loss
formulaand the carried load:
a′ =s∑
j=1
j(aj/j!)/s∑
k=0
(ak/k!)
= a
s−1∑j=0
(aj/j!)/s∑
k=0
(ak/k!)
= a (1−B(s, a)) .
This shows that the carried load is the portion of the offered
load thatis not lost (captured) from the system.
69
-
4.3.5 Blocked Customers Delayed (Erlang delay system)
The queueing system has s servers and there is no limit in
waiting spaceand we assume blocked customers are delayed.
• In this case we have the arrival rates λj = λ (j = 0, 1, · · ·
), and the servicecompletion rates
µj =
{jµ (j = 0, 1, · · · , s)sµ (j = s, s + 1, · · · ).
• Hence we have
pj =
aj
j!p0 (j = 0, 1, · · · , s)aj
s!sj−sp0 (j = s + 1, · · · )
where a = λ/µ and
p0 =
(s−1∑k=0
ak
k!+
∞∑k=s
ak
s!sk−s
)−1.
70
-
• If a < s, the infinite geometric sum on the right
converges, and
p0 =
s−1∑k=0
ak
k!+
as
(s− 1)!(s− a)
−1 .If a ≥ s, the infinite geometric sum diverges to infinity.
Then p0 = 0and hence pj = 0 for all finite j.
• For a ≥ s, therefore the queue length tends to infinity with
prob-ability 1 as time increases. In this case we say that no
statisticalequilibrium distribution exists.
71
-
Remark 21 The probability that all servers are occupied (as
observedby an outside observer) is given by the Erlang delay
formula
C(s, a) =
∞∑j=s
pj =as
(s− 1)!1
s− ap0 =
as/[(s− 1)!(s− a)]
(s−1∑k=0
ak/k!) + as/[(s− 1)!(s− a)].
Since the arriving customer’s distribution is equal to the
outside ob-server’s distribution, the probability that an arriving
customer findsall servers busy (equivalently the probability that
the waiting time inthe queue w > 0) is also given by C(s,
a).
Remark 22 The carried load is equal to the offered load since
norequest for service has been cleared from the system without
beingserved. In fact, this equality holds for BCD queues with
arbitraryarrival and service time distributions.
72
-
Remark 23 Suppose that an arriving customer finds that all the
servers are busy.What is the probability that he finds j customers
waiting in the ‘queue’ ?
• This is equivalent to find the conditional probability P{Q =
j|w > 0} where Qdenotes the number of customers waiting in the
queue.
• By the definition of conditional probability,
P{Q = j|w > 0} = P{Q = j, w > 0}P{w > 0}
.
Thus
P{Q = j and w > 0} = Ps+j =as
s!
(as
)jp0,
we get the Geometric distribution
P{Q = j|w > 0} =as
s! (as)
jp0as
s! (s
s−a)p0= (1− ρ)ρj (j = 0, 1 . . .).
where ρ = a/s is the traffic intensity.
73
-
4.4 Little’s Queueing Formula
If λ is the mean arrival rate, W is the mean time spent in the
system(mean sojourn time) and L is the mean number of customers
present,J.D.C. Little proved in 1961 that
L = λW.
This result is one of the most general and useful results in
queueingtheory for a blocked customer delay queue.
The formal proof of this theorem is too long for this course.
Let usjust formally state the theorem and then give a heuristic
proof.
74
-
Proposition 3 (Little’s Theorem) Let L(x) be the number
ofcustomers present at time x, and define the mean number L
ofcustomers present throughout the time interval [0,∞) as
L = limt→∞
1
t
∫ t0L(x)dx;
let N(t) be the number of customers who arrive in [0, t],
anddefine the arrival rate λ as
λ = limt→∞
N(t)
t;
and let Wi be the sojourn time of the ith customer, and
definethe mean sojourn time W as
W = limn→∞
1
n
n∑i=1
Wi.
If λ and W exist and are finite, then so does L, and they
arerelated by λW = L.
75
-
Proof: Let us follow the heuristic argument suggested by P. J.
Burke.
Assume that the mean values L and W exist, and consider a long
time interval(0, t) throughout which statistical equilibrium
(steady state) prevails.
The mean number of customers who enter the system during this
interval is λt.Imagine that a sojourn time is associated with each
arriving customer; i.e., eacharrival brings a sojourn time with
him. Thus the average sojourn time brought intothe system during
(0, t) is λtW .
On the other hand, each customer present in the system uses up
his sojourn timelinearly with time. If L is the average number of
customers present throughout(0, t), then Lt is the average amount
of time used up in (0, t).
Now as t → ∞ the accumulation of sojourn time must equal the
amount of sojourntime used up; that is,
limt→∞
λtW
Lt= 1.
76
-
With the help of Little’s formula, we get the following useful
results:
(a) λ, the average number of arrivals entering the system,
(b) Ls, the average number of customers in the queueing
system,
(c) Lq, the average number of customers waiting in the
queue,
(d) Lc, the average number of customers in the server,
(e) Ws, the average time a customer spends in the queueing
system,
(f) Wq, the average time a customer spends in waiting in the
queue,
(g) Wc, the average time a customer spends in the server.
then the Little’s formula states that if the steady-state
probability distributionexists, we have
Ls = λWs, Lq = λWq, and Lc = λWc.
77
-
4.4.1 Little’s queueing Formula for the M/M/1/∞ Queue
In the following, we are going to prove Little’s queueing
formula for the case ofM/M/1/∞ queue. We recall that
Ls =ρ
1− ρ, Lq =
ρ2
1− ρ, Lc = ρ, Ls = Lq + Lc, ρ =
λ
µ.
We first note that the expected waiting time Wc at the server is
1/µ.
Therefore we have
Wc =1
µ=
λ
λµ=
Lcλ.
Secondly we note that when a customer arrived, there can be i
customers alreadyin the system. The expected waiting time before
joining the server when there arealready i customers in the system
is of course i/µ. Because there is only server andthe mean service
time of each customer in front of him is 1/µ.
Therefore the expected waiting time Wq before one joins the
server will be∞∑i=1
pi(i
µ) =
1
µ
∞∑i=1
ipi =Lsµ
=ρ
(1− ρ)µ.
78
-
Since i can be 0, 1, 2, . . ., we have
Wq =ρ
(1− ρ)µ=
ρ2
(1− ρ)µρ=
Lqλ
The expected waiting time at the server Wc will be of course
1/µ. Thus we have
Ws = Wq +Wc
=Lqµ
+1
µ
=1
µ(
ρ
1− ρ+ 1)
=1
µ(1− ρ)=
ρ
λ(1− ρ)=
Lsλ.
Hereρ = λ/µ
andLs = ρ/(1− ρ).
79
-
4.4.2 Applications of the Little’s Queueing Formula
Arrival rate λService rate µTraffic intensity ρ = λ/µProbability
that no customer in the queue p0 = 1− ρProbability that i customers
in the queue pi = p0ρ
i
Probability that an arrival has to wait for service 1− p0 =
ρExpected number of customers in the system Ls = ρ/(1− ρ)Expected
number of customers in the queue Lq = ρ
2/(1− ρ)Expected number of customers in the server Lc =
ρExpected waiting time in the system Ls/λ = 1/(1− ρ)µExpected
waiting time in the queue Lq/λ = ρ/(1− ρ)µExpected waiting time in
the server Lc/λ = 1/µ
Table 4.1. A summary of the M/M/1/∞ queue.
80
-
Example 3 Consider the M/M/2/∞ queue with arrival rate λ
andservice rate µ. What is the expected waiting time for a customer
inthe system?
We recall that the expected number of customers Ls in the system
isgiven by
Ls =2ρ
1− ρ2.
Here ρ = λ/(2µ). By applying the Little’s queueing formula we
have
Ws =Lsλ
=1
µ(1− ρ2).
Example 4 On average 30 patients arrive each hour to the
healthcentre. They are first seen by the receptionist, who takes an
averageof 1 min to see each patient. If we assume that the M/M/1
queueingmodel can be applied to this problem, then we can calculate
theaverage measure of the system performance, see Table 4.2.
81
-
Arrival rate λ = 30 (per hour)Service rate µ = 60 (per
hour)Traffic intensity ρ = 0.5Probability that no customer in the
queue p0 = 0.5
Probability that i customers in the queue pi = 0.5i+1
Probability that an arrival has to wait for service 0.5Expected
number of customers in the system Ls = 1Expected number of
customers in the queue Lq = 0.5Expected number of customers in the
server Lc = 0.5Expected waiting time in the system Ls/λ =
1/30Expected waiting time in the queue Lq/λ = 1/60Expected waiting
time in the server Lc/λ = 1/60
Table 4.2. A summary of the system performance
82
-
4.5 Applications of Queues
4.5.1 Allocation of the Arrivals in a System of M/M/1 Queues
�µ1��
��1 Queue 1
�λ1
•••�µn��
��s Queue n �
λn
�Allocation M
Figure 4.7. The Queueing System with Allocation of Arrivals.
•We consider a queueing system consisting of n independent
M/M/1queues. The service rate of the serve at the ith queue is
µi.
• The arrival process is a Poisson process with rate M .
83
-
• An allocation process is implemented such that it diverts an
arrivedcustomers to queue i with probability
λiλ1 + . . . + λn
=λiM
.
• Then the input process of queue i is a Poisson process with
rate λi.
• The objective here is to find the parameters λi such that some
sys-tem performance is optimized.
• We remark that we must have λi < µi.
84
-
4.5.2 Minimizing Number of Customers in the System
The expected number of customers in queueing system i:
λi/µi1− λi/µi
.
The total expected number of customers in the system isn∑i=1
λi/µi1− λi/µi
.
• The optimization problem is then given as follows:
minλi
n∑i=1
λi/µi1− λi/µi
.subject to
m∑i=1
λi = M and 0 ≤ λi < µi for i = 1, 2, . . . , n.
85
-
• By consider the Lagrangian function
L(λ1, . . . , λn,m) =
n∑i=1
λi/µi1− λi/µi
−m
(n∑
i=1
λi −M
)and solving
∂L
∂λi= 0 and
∂L
∂m= 0
we have the optimal solution
λi = µi
(1− 1√
mµi
)< µi
where
m =
n∑i=1
õi
n∑i=1
µi −M
2
.
86
-
4.5.3 Minimizing Number of Customers Waiting in the System
• The expected number of customers waiting in queue i
is(λi/µi)
2
1− λi/µi.
• The total expected number of customers waiting in the queues
isn∑
i=1
(λi/µi)2
1− λi/µi.
• The optimization problem is then given as follows:
minλi
{n∑
i=1
(λi/µi)2
1− λi/µi
}.
subject tom∑i=1
λi = M
and0 ≤ λi < µi for i = 1, 2, . . . , n.
87
-
By consider the Lagrangian function
L(λ1, . . . , λn,m) =
n∑i=1
(λi/µi)2
1− λi/µi−m
(n∑
i=1
λi −M
)and solving
∂L
∂λi= 0 and
∂L
∂m= 0
we have the optimal solution
λi = µi
(1− 1√
1 +mµi
)< µi
where m is the solution ofn∑i=1
µi
(1− 1√
1 +mµi
)= M.
88
-
4.5.4 Which Operator to Employ?
• We are going to look at one application of queueing systems.
In alarge machine repairing company, workers must get their tools
fromthe tool centre which is managed by an operator.
• Suppose the mean number of workers seeking for tools per hour
is5 and each worker is paid 8 dollars per hour.
• There are two possible operators (A and B) to employ. In
averageOperator A takes 10 minutes to handle one request for tools
is paid5 dollars per hour. While Operator B takes 11 minutes to
handleone request for tools is paid 3 dollars per hour.
• Assume the inter-arrival time of workers and the processing
timeof the operators are exponentially distributed. We may regard
therequest for tools as a queueing process (M/M/1/∞) with λ =
5.
89
-
• For Operator A, the service rate is µ = 60/10 = 6 per
hour.Thus we have
ρ = λ/µ = 5/6.
The expected number of workers waiting for tools at the tool
centrewill be
ρ
1− ρ=
5/6
1− 5/6= 5.
The expected delay cost of the workers is
5× 8 = 40dollars per hour and the operator cost is 5 dollars per
hour. Thereforethe total expected cost is
40 + 5 = 45.
90
-
• For Operator B, the service rate is µ = 60/11 per hour. Thuswe
have
ρ = λ/µ = 11/12.
The expected number of workers waiting for tools at the tool
centrewill be
ρ
1− ρ=
11/12
1− 11/12= 11.
The expected delay cost of the workers is
11× 8 = 88dollars per hour and the operator cost is 3 dollars
per hour. Thereforethe total expected cost is
88 + 3 = 91.
Conclusion: Operator A should be employed.
91
-
4.5.5 Two M/M/1 Queues Or One M/M/2 Queue ?
• If one more identical operator can be employed, then which
offollowings is better? (In our analysis, we assume that λ <
µ).
(i) Put two operators separately. We have two M/M/1/∞queues. In
this case, we assume that an arrived customer caneither join the
first queue or the second with equal chance.
(ii)Put two operators together. We have an M/M/2/∞ queue.
����1 · · ·�
µ
����2 · · ·�
µ@
@@I
��
�
λ2
λ2
Figure 4.8. Case (i) Two M/M/1/∞ Queues.
����1�
µ
����2
· · ·�
µ �λ
Figure 4.9. Case (ii) One M/M/2/∞ Queue.
92
-
• To determine which case is better, we calculate the expected
number of customers(workers) in both cases. Clearly in our
consideration, the smaller the better (Why?).
In case (i), the expected number of customers in any one of the
queues will be givenby
( λ2µ)
1− ( λ2µ).
Hence the total expected number of customers (workers) in the
system is
S1 = 2×( λ2µ)
1− ( λ2µ)=
(λµ)
1− ( λ2µ).
In case (ii), the expected number of customers in any one of the
queues will begiven by (see previous section)
S2 =(λµ)
1− ( λ2µ)2.
Clearly S2 < S1.
Conclusion: Case (ii) is better. We should put all the servers
(operators) together.
93
-
4.5.6 One More Operator?
• Operator A later complains that he is overloaded and the
workers have wastedtheir time in waiting for a tool. To improve
this situation, the senior managerwonders if it is cost effective
to employ one more identical operator at the toolcentre. Assume
that the inter-arrival time of workers and the processing time
ofthe operators are exponentially distributed.
• For the present situation, one may regard the request for
tools as a queueingprocess (An M/M/1/∞) where the arrival rate λ =
5 per hour and the service rateµ = 60/10 = 6 per hour. Thus we have
ρ = λ/µ = 5/6.
• The expected number of workers waiting for tools at the tool
centre will beρ
1− ρ=
5/6
1− 5/6= 5.
The expected delay cost of the workers is 5×8 = 40 dollars per
hour and the opera-tor cost is 5 dollars per hour. Therefore the
total expected cost is 40+5 = 45 dollars.
• When one extra operator is added then there are 2 identical
operators at the toolcenter and this will be an M/M/2/∞ queue.
94
-
• The expected number of workers in the system is given by (c.f.
(4.11))
1− ρ1 + ρ
∞∑i=1
2iρi =2ρ
1− ρ2
where
ρ =λ
2µ=
5
12.
• In this case the expected delay cost and the operator cost
will be given respectivelyby
8× 2ρ1− ρ2
=8× 120119
= 8.07 and 2× 5 = 10 dollars.
• Thus the expected cost when there are 2 operators is given by
18.07 dollars.
• Conclusion: Hence the senior manager should employ one more
operator.
• How about employing three operators? (You may consider M/M/3/∞
queue).
• But it is clear that there is no need to employ four
operators. Why?
95
-
4.6 An Unreliable Machine System
• Consider an unreliable machine system. The normal time of
themachine is exponentially distributed with mean λ−1. Once the
ma-chine is broken, it is subject to a n-phase repairing
process.
• The repairing time at phase i is also exponentially
distributed withmean µ−1i (i = 1, 2, . . . , n). After the
repairing process, the machineis back to normal. Let 0 be the state
that the machine is normal andi be the state that the machine is in
repairing phase i. The Markovchain of the model is given by
-
���0 -
µ1����1 -
µ2����2 -
µn−1· · · ��
��n
?�6
µn
Figure 4.10. The Markov Chain for the Unreliable Machine
System.
96
-
• Let the steady-state probability vector be
p = (p0, p1, . . . , pn)
satisfiesA6p = 0
where
A6 =
−λ 0 µnλ −µ1
µ1 −µ2. . . . . . 0
0 µn−1 −µn
.
97
-
• From the first equation −λp0 + µnpn we have
pn =λ
µnp0.
From the second equation λp0 − µ1p1 we have
p1 =λ
µ1p0.
From the third equation µ1p1 − µ2p2 we have
p2 =λ
µ2p0.
We continue this process and therefore
pi =λ
µip0.
Since p0 + p1 + p2 + . . . + pn = 1, we have
p0
(1 +
n∑i=1
λ
µi
)= 1.
Therefore
p0 =
(1 +
n∑i=1
λ
µi
)−1.
98
-
4.7 A Reliable One-machine Manufacturing System
• Here we consider an Markovian model of reliable one-machine
manufacturingsystem. The production time for one unit of product is
exponentially distributedwith a mean time of µ−1.
• The inter-arrival time of a demand is also exponentially
distributed with a meantime of λ−1.
• The demand is served in a first come first serve manner. In
order to retain thecustomers, there is no backlog limit in the
system. However, there is an upper limitn(n ≥ 0) for the inventory
level.
• The machine keeps on producing until this inventory level is
reached and theproduction is stopped once this level is attained.
We seek for the optimal value ofn (the hedging point or the safety
stock) which minimizes the expected running cost.
• The running cost consists of a deterministic inventory cost
and a backlog cost.In fact, the optimal value of n is the best
amount of inventory to be kept in thesystem so as to hedge against
the fluctuation of the demand.
99
-
• Let us summarized the notations as follows.
I , the unit inventory cost;B, the unit backlog cost;n ≥ 0, the
hedging point;µ−1, the mean production time for one unit of
product;λ−1, the mean inter-arrival time of a demand.
• If the inventory level (negative inventory level means
backlog) isused to represent the state of the system, one may write
down theMarkov chain for the system.
�
-
µ
���n
�
-
µ
λ����n− 1 · · · � -
µ
���1 ��
��0
�
-
µ
λ· · ·
Figure 4.11. The Markov Chain for the Manufacturing System.
100
-
• Here we assume that µ > λ, so that the steady-state
probabil-ity distribution of the above M/M/1 queue exists and has
analyticsolution
q(i) = (1− p)pn−i, i = n, n− 1, n− 2, · · ·where
p = λ/µ
and q(i) is the steady-state probability that the inventory
level is i.
• Hence the expected running cost of the system (sum of the
inventorycost and the backlog cost) can be written down as
follows:
E(n) = In∑i=0
(n− i)(1− p)pi︸ ︷︷ ︸inventory cost
+B∞∑
i=n+1
(i− n)(1− p)pi︸ ︷︷ ︸backlog cost
. (4.13)
101
-
Proposition 4 The expected running cost E(n) is minimized ifthe
hedging point n is chosen such that
pn+1 ≤ II +B
≤ pn.
Proof: We note that
E(n− 1)− E(n) = B − (I +B)(1− p)n−1∑i=0
pi = −I + (I +B)pn
and
E(n+ 1)−E(n) = −B + (I +B)(1− p)n∑i=0
pi = I − (I +B)pn+1.
Therefore we have
E(n−1) ≥ E(n) ⇔ pn ≥ II +B
and E(n+1) ≥ E(n) ⇔ pn+1 ≤ II +B
.
Thus the optimal value of n is the one such that pn+1 ≤ II+B ≤
pn.
102
-
4.8 An Inventory Model with Returns and Lateral
Transshipments
• In the world of limited resources and disposal capacities,
there is aenvironmental pressure in using re-manufacturing system,
a recyclingprocess to reduce the amount of waste generated.
• A major manufacturer of copy machines Xeron reported on
annualsavings of several hundred million dollars due to the
re-manufacturingand re-use of equipment.
• A return is first repaired/tested and then re-sell to the
market. Theresult of re-manufacturing is that the manufacturers
have to take intoaccount of returns in their production plans.
• M. Fleischmann (2001) Quantitative Models for Reverse
Logis-tics, Lecture Notes in Economics and Mathematical Systems,
501,Springer, Berlin.
103
-
(i) λ−1, the mean inter-arrival time of demands,(ii) µ−1, the
mean inter-arrival time of returns,(iii) a, the probability that a
returned product is repairable,(iv) Q, maximum inventory
capacity,(v) I , unit inventory cost,(vi) R, cost per replenishment
order.
Returns-
µCheck/Repair -aµ
6
Disposal (1− a)µ?
Replenishment
-1 0 1 Q· · · · · ·Demands
- λ
figure 4.16. The Single-item Inventory Model.
• W. Ching, W. Yuen and A. Loh, An Inventory Model with Returns
and LateralTransshipments, J. Operat. Res. Soc., 54 (2003)
636-641.
104
-
�
-
λ
aµ����0
�
-
λ
aµ����1 · · ·
�
-
λ
aµ����Q− 1 ��
��Q
6
λfigure 4.17. The Markov Chain.
• The (Q + 1)× (Q + 1) system generator matrix is given as
follows:
A =
01......Q
λ + aµ −λ 0−aµ λ + aµ −λ
. . . . . . . . .
−aµ λ + aµ −λ−λ −aµ λ
. (4.14)• The steady state probability distribution p is given
by
pi = K(1− ρi+1), i = 0, 1, . . . , Q (4.15)
where
ρ =aµ
λand K =
1− ρ(1 +Q)(1− ρ)− ρ(1− ρQ+1)
.
105
-
Proposition 5 The expected inventory level is
Q∑i=1
ipi =
Q∑i=1
K(i−iρi+1) = K
(Q(Q + 1)
2+QρQ+2
1− ρ− ρ
2(1− ρQ)(1− ρ)2
),
the average rejection rate of returns is
µpQ = µK(1− ρQ+1)and the mean replenishment rate is
λ× p0 ×λ−1
λ−1 + (aµ)−1=
λK(1− ρ)ρ(1 + ρ)
.
106
-
Proposition 6 If ρ < 1 and Q is large then K ≈ (1+Q)−1 and
theapproximated average running cost (inventory and
replenishmentcost)
C(Q) ≈ QI2
+λ(1− ρ)ρR
(1 + ρ)(1 +Q).
The optimal replenishment size
Q∗ + 1 ≈
√2λ(1− ρ)ρR(1 + ρ)I
=
√2aµR
I
(2λ
λ + aµ− 1). (4.16)
107
-
4.9 Queueing Systems with Two Types of Customers
In this section, we discuss queueing systems with two types of
customers. Thequeueing system has no waiting space. There are two
possible cases: infinite-servercase and finite-server case.
4.9.1 Infinite-Server Queue
Consider the infinite-server queue with two types of customers.
The arrival processof customers of type i (i = 1, 2) is Poisson
with rate λi and their service times areindependent, identically
distributed, exponential random variables with mean µ−1i(i = 1,
2).
• We define the 2-dimensional states {Ej1,j2}, where ji is the
number of customersof type i in the system, with corresponding
equilibrium distribution {p(j1, j2)},then clearly the Markov
property still holds.
• Here p(j1, j2) is the steady-state probability that there are
j1 type 1 customersand j2 type 2 customers in the system.
108
-
• By equating expected rate out to expected rate in for each
state, the equilib-rium state equations are
(λ1 + λ2 + j1µ1 + j2µ2)p(j1, j2) = λ1p(j1 − 1, j2) + (j1 +
1)µ1p(j1 + 1, j2)+λ2p(j1, j2 − 1) + (j2 + 1)µ2p(j1, j2 + 1)
and [p(−1, j2) = p(j1,−1) = 0 ; j1 = 0, 1, . . . ; j2 = 0, 1, .
. . .]
Ej1,j2 Ej1+1,j2Ej1−1,j2
Ej1,j2+1
Ej1,j2−1
6
?
?
6
λ2
λ2 j2µ2
(j2 + 1)µ2
�- -
�
λ1λ1
(j1 + 1)µ1j1µ1
Figure 4.12. The Markov Chain of the System at State Ej1,j2.
109
-
• In addition, the probabilities must satisfy the normalization
equation∞∑
j1=0
∞∑j2=0
p(j1, j2) = 1.
• In this case, we already know the answer. Since the number of
servers is infinite,the two types of customers do not affect one
another.
• Thus the marginal distribution of the number of customers of
each type is thatwhich would be obtained by solving the
corresponding one-dimensional problem,namely the Poisson
distribution:
p1(j) =
∞∑k=0
p(j, k) =(λ1/µ1)
j
j!e−(λ1/µ1),
p2(j) =∞∑k=0
p(k, j) =(λ2/µ2)
j
j!e−(λ2/µ2) .
(4.17)
110
-
• Since the number of customers present of each type is
independent of thenumber present of the other type, therefore
p(j1, j2) = p1(j1)p2(j2)
=(λ1/µ1)
j1
j1!
(λ2/µ2)j2
j2!e−[(λ1/µ1)+(λ2/µ2)].
(4.18)
• Solution of Product Form:
The fact that the solution p(j1, j2) can be decomposed into a
product of twofactors has enabled us to solve the problem with
ease.
111
-
• In fact one may try
p(j1, j2) =(λ1/µ1)
j1
j1!
(λ2/µ2)j2
j2!C (4.19)
where the constant C is determined from the normalization
equation. In this case∞∑
j1=0
∞∑j2=0
p(j1, j2) =
∞∑j1=0
∞∑j2=0
(λ1/µ1)j1
j1!
(λ2/µ2)j2
j2!C
= Ceλ2/µ2∞∑
j1=0
(λ1/µ1)j1
j1!
= Ce[(λ1/µ1)+(λ2/µ2)].
HenceC = e−[(λ1/µ1)+(λ2/µ2)].
• In practice, a good strategy for finding solutions to
equations of the form (4.17) isto assume a product solution of the
form (4.19); and see if such a solution satisfies(4.17).
• If it goes, then the solution has been obtained. If it
doesn’t, then try a differentapproach. In this case it works!
112
-
4.9.2 Multiple-server Queue with Blocked Customers Cleared
• The situation is similar to that of the previous example
except nowthe system has finitely many servers.
• The system is again described by equation (4.17), which is
validnow only for j1 + j2 < s.
• When j1 + j2 = s, then the states Ej1+1,j2 and Ej1,j2+1
cannotoccur and the equation becomes
(j1µ1 + j2µ2)p(j1, j2) = λ1p(j1 − 1, j2) + λ2p(j2, j2 − 1).
(4.20)• Observe that (4.20) can be obtained from (4.17) by deleting
thefirst two terms on the left and the last two terms on the
right.
113
-
• Since the product-form solution (4.19) satisfies the equation
(4.17) and also theequation with only the deleted terms
(λ1 + λ2)p(j1, j2) = (j1 + 1)µ1p(j1 + 1, j2) + (j2 + 1)µ2p(j1,
j2 + 1),
therefore it also satisfies (4.20). Thus the product solution
(4.19) is a solution ofthis problem.
• In particular, if we don’t distinguish the two types of
customers, then the prob-ability p(j) that there are j customers
(including type 1 and type 2) in service isgiven by
p(j) =∑
j1+j2=j
p(j1, j2) =
j∑j1=0
p(j1, j − j1).
• With the help of binomial theorem, we have
p(j) = C
j∑j1=0
(λ1µ1)j1
j1!
(λ2µ2)j−j1
(j − j1)!=
C
j!
j∑j1=0
j!
j1!(j − j1)!(λ1µ1
)j1(λ2µ2
)j−j1 = C1
j!
(λ1µ1
+λ2µ2
)j.
114
-
• The normalization equations∑
k=0
p(k) = 1
implies that
C =
{s∑
k=0
1
k!(λ1µ1
+λ2µ2
)k
}−1.
We conclude that
p(j) =aj/j!s∑
k=0
ak/k!(j = 0, 1, . . . , s)
where
a = (λ1µ1
) + (λ2µ2
).
• We note that for the case of infinite-server queue (we let s →
∞) we have
p(j) =aje−a
j!(j = 0, 1, . . . , ).
115
-
4.10 Queues in Tandem
• Consider two sets of servers arranged in tandem, so that the
output from the firstset of servers is the input of the second set
of servers.
• Assume that the arrival process at the first stage of this
tandem queueing systemis Poisson with rate λ, the service times in
the first stage are exponentially dis-tributed with mean µ−11 , and
the queueing discipline is blocked customers delayed.
• The customers completing service in the first stage will enter
the second stage(and wait if all servers in second stage are busy),
where the service times are as-sumed to be exponentially
distributed with mean µ−12 . The number of servers instage i is
si(i = 1, 2) .
116
-
· · · · · ·... ...
� � �
Second Set of Servers First Set of Servers
Figure 4.13. Two Queues in Tandem.
• Let p(j1, j2) be the probability that there are j1 customers
in stage 1 and j2customers in stage 2. Let
µi(j) =
{jµi (j = 0, 1, . . . , si)siµi (j = si + 1, si + 2, . . .)
be the departure rates. Then equating rate in to rate out for
each state, weobtain
(λ + µ1(j1) + µ2(j2)) p(j1, j2) = λp(j1 − 1, j2) + µ1(j1 +
1)p(j1 + 1, j2 − 1)+µ2(j2 + 1)p(j1, j2 + 1)
(4.21)
[p(−1, j2) = p(j1,−1) = 0 ; j1 = 0, 1, . . . ; j2 = 0, 1, . .
.]
117
-
• Since the first stage of this system is precisely an Erlang
delay system, sothat the marginal distribution of the number of
customers in stage one is given bythe Erlang delay
probabilities.
• Let us try (hopefully it would work) a product solution of the
form
p(j1, j2) = p1(j1)p2(j2) (4.22)
with the factor p1(j1) given by the Erlang delay
probabilities:
p1(j1) =
C1
(λ/µ1)j1
j1!(j1 = 0, 1, . . . , s1 − 1) ,
C1(λ/µ1)
j1
s1!sj1−s11
(j1 = s1, s1 + 1, . . .) .(4.23)
118
-
• We shall substitute the assumed product solution (4.22) and
(4.23) into theequilibrium state equations (4.21), with the hope
that the system of equationswill be reduced to a one-dimensional
set of equations that can be solved for theremaining factor p2(j2).
Indeed, (4.21) is reduced to
[λ + µ2(j2)]p2(j2) = λp2(j2 − 1) + µ2(j2 + 1)p2(j2 + 1)
(4.24)
[p2(−1) = 0 ; j2 = 0, 1, . . .](4.24) is the equilibrium state
equations that define the Erlang delay probabilities.
• We conclude that p2(j2) is given by
p2(j2) =
C2
(λ/µ2)j2
j2!(j2 = 0, 1, 2, . . . , s2 − 1) ,
C2(λ/µ2)
j2
s2!sj2−s22
(j2 = s2, s2 + 1, . . . , ).(4.25)
119
-
• Using∞∑j=0
pi(j) = 1 (i = 1, 2)
we get
Ci =( si−1∑
k=0
ρkik!
+ρsii
si!(1− ρi/si)
)−1where ρi =
λ
µi(i = 1, 2).
This equation implies that a proper joint distribution exists
only whenλ/µ1 < s1 and λ/µ2 < s2.
• It is a remarkable result that the number of customers in the
secondstage also follows the Erlang delay distribution, that is,
the distribu-tion of customers in the second stage is the same as
if the first stagewere not present and the customers arrived
according to a Poissonprocess directly at the second stage.
120
-
• It also suggests that the output from the first stage is a
Poissonprocess. This is in fact true in general and we state
without proof theBurke’s theorem as follows.
Proposition 7 (Burke’s Theorem) The statistical equilibrium
out-put of an M/M/s queue with arrival rate λ and mean service
timesµ−1 is a Poisson process with the same rate λ.
Remark 24 In 1956 Burke showed that the departure process of
anM/M/s queue was Poisson.
P. Burke, (1956) The Output of a Queueing System, Oper. Res.
(4)699-704.
121
-
4.11 Queues in Parallel
· · ·
· · ·
...
...
�
�
� λ1
� λ2
� λ1
� CCCCCCCCCCCO �
����������� λ2
Case 2: With OverflowCase 1: No Inter-action
Figure 4.14. Two Queues in Parallel.
Case (i) We assume there is no inter-action between the two
queues.There are si(i = 1, 2) servers in queue i(i = 1, 2) and
there is infinitemany waiting spaces in each queue and we assume
blocked customersare delayed. The arrival rate of queue i is λi and
the service comple-tion rate of a serve in queue i is µi.
122
-
• Hence we have the steady-state probability that queue i has j
cus-tomers given by
pi(j) =
ρjij!Ci (j = 0, 1, · · · , si)
ρji
si!sj−sii
Ci (j = si + 1, . . .)
where ρi = λi/µi. Moreover if ρi < si then
Ci =
si−1∑k=0
ρkik!
+
∞∑k=si
ρki
si!sk−sii
−1 =si−1∑
k=0
ρkik!
+ρsii
(si − 1)!(si − ρi)
−1 .• If ρi ≥ si, the infinite geometric sum diverges then Ci =
0 andhence pi(j) = 0 for all finite j.
• If ρi < si then the steady-state probability that there are
i cus-tomers in Queue 1 and j customers in Queue 2 is given by
p(i, j) = p1(i)p2(j) i, j = 0, 1, 2, . . . .
123
-
• Case (ii) There are si(i = 1, 2) servers in queue i(i = 1, 2)
and there are finitemany waiting spaces in each queue and we assume
blocked customers are cleared.The arrival rate of queue i is λi and
the service completion rate of a serve in queuei is µi.
• We assume there is inter-action between the two queues as
follows. WheneverQueue 2(1) is full, an arrived customer of type
2(1) will overflow to Queue 1(2) pro-vided that Queue 1(2) is not
yet full. Let us consider a simple example as follows.We assume
that Queue 1 and 2 are M/M/1/1 queue. The following figure gives
theMarkov chain of the queueing system.
E1,1 E2,1E0,1
E1,2E0,2 E2,2
E0,0 E1,0 E2,0
?
6
6
?
µ2
µ2 λ2
λ2?
6
6
?
µ2
µ2 λ2
λ2?
6
6
?
µ2
µ2 λ̃ = λ1 + λ2
λ̃ = λ1 + λ2�
- -�
λ1λ1
µ1µ1
�- -
�
λ1λ1
µ1µ1
�- -
�
λ̃ = λ1 + λ2λ̃ = λ1 + λ2
µ1µ1
figure 4.15. The Markov Chain of the Two Queue Overflow
System.
124
-
• The generator matrix for this queueing problem is given by
A8 =
(0, 0)(1, 0)(2, 0)(0, 1)(1, 1)(2, 1)(0, 2)(1, 2)(2, 2)
* µ1 0 µ2 0 0 0 0 0λ1 * µ1 0 µ2 0 0 0 00 λ1 * 0 0 µ2 0 0 0λ2 0 0
* µ1 0 µ2 0 00 λ2 0 λ1 * µ1 0 µ2 0
0 0 λ̃ 0 λ1 ∗ 0 0 µ20 0 0 λ2 0 0 * µ1 0
0 0 0 0 λ2 0 λ̃ * µ10 0 0 0 0 λ̃ 0 λ̃ *
. (4.26)
• Here “∗” is such that the column sum is zero.
• Unfortunately there is no analytic solution for the
steady-state probabilities ofthis system. Direct method or
numerical method are common methods for solvingthe steady-state
probabilities.
125
-
4.12 A Summary of Learning Outcomes
• Able to use the Kendall’s notation to describe a queueing
system.
• Able to compute and interpret an M/M/s/n queue including:- the
Markov chain diagram, the generator matrix, the steady-state
probability.- Erlang loss formula, Erlang delay formula.- waiting
time distribution in an M/M/s/∞ queue.
• Able to state and show the Little’s queueing formula and
Burke’s theorem.
• Able to give a system performance analysis of a Markovian
queueing system:- Expected number of customers.- Expected number of
busy servers.- Mean waiting time.
• Able to apply queues in tandem and in parallel to real
problems such as:- Employment of operators.- Unreliable machine
system.- Manufacturing system and inventory system.
126
-
4.13 Exercises
1. Customers arrive according to a Poisson process with rate λ
at a single serverwith n waiting positions. Customers who find all
waiting positions occupied arecleared. All other customers wait as
long as necessary for service. The meanservice time is µ−1, and ρ =
λµ. Making no assumption about the form of theservice time
distribution function, show that
ρ =1− p01− pn+1
.
Here pi is the steady-state probability that there are i
customers in the system.
2. A company has 3 telephone lines. Incoming calls are generated
by the customersaccording to a Poisson process with a mean rate of
20 calls per hour. Calls thatfind all telephone lines busy are
rejected and those calls that are able to getthrough will be served
for a length of time that is exponentially distributedwith mean 4
minutes.
(a) Let the number of busy lines be the state of the system.
Write down theMarkov chain and the generator matrix for this
system. Hence solve the steady-state probability distribution for
the system.
(b) Find the proportion of calls that are rejected.
127
-
3. An company offers services that can be modeled as an s-server
Erlang loss sys-tem (M/M/s/0 queue).
Suppose the arrival rate is 2 customers per hour and the average
service timeis 1 hour. The entrepreneur earns $2.50 for each
customer served and the com-pany’s operating cost is $1.00 per
server per hour (whether the server is busyor idle).
(a) Write down the expected hourly net profit C(s) in terms of
s.
(b) Show that
lims→∞
C(s)
s= −1
and interprets this result.
(c) If the maximum number of servers available is 5, what is the
optimal numberof servers which maximizes the expected hourly net
profit ? What is the ex-pected hourly net profit earned when the
optimal number of servers is provided?
128
-
4. Consider an Erlang loss system with two servers. The arrival
rate is 1 and meanservice time is µ−1i for server i(i = 1, 2). When
the system is idle, an arrivedcustomer