Queuing Theory
Queuing Theory
Queuing Theory
This project deals with the Queueing Theory and some mathematical models
of queueing systems. Starting with the historical backgrounds it gives an overview
of different basic concepts that are needed in queueing theory. Then the elements
of queue and list of symbols are introduced. It highlights several recent advances
and developments of the theory and new applications fields are listed. It briefly
describes different queueing modes and problems based on them. Later various
applications of queueing theory are explained. It ends with the References of the
most important sources.
Keywords:
Queueing theory, probability, means, variance, arrival, service, time,
distribution, Poisson, queuing models.
1
Acknowledgement
Working on this project “Queueing Theory ( Waiting Line Models)” has been an
source of immense knowledge and learning for me. I would like to express my
deep gratitude to Professor Mrs. Rekha R Jaichanderfor her guidance and support
throughout the entire course of this project. I acknowledge with deep sense of
gratitude, the encouragement and help received from the staff of Department of
Mathematics which has helped in successful completion of my project.
2
Contents:
Sr. no. Topic Page no.
1.1 Introduction to Queueing Theory 5
1.2 Definition 7
1.3 Examples 7
1.4 Basic concepts from Probability Theory 9
1.4.1 Variable 9
1.4.2 Random Variable 9
1.4.3 Probability Distribution 10
1.4.4 Discrete vs. Continuous Variables 11
1.4.5 Discrete Probability Distributions 11
1.4.6 Continuous Probability Distributions 12
1.4.7 Generating function 14
1.5 Useful probability distributions 14
1.5.1 Poisson Distribution 15
1.5.2 Exponential distribution 16
1.5.3 Erlang distribution 17
1.6 Queuing Disciplines 18
1.7 Elements of Queuing Systems 19
1.8 Queueing Problem 22
1.9 Transient and steady states 23
1.10 Terminology and Notation 24
1.11 Traffic Intensity 26
1.12 KENDALL’S Notation for representing queueing 26
models
1.13 Queueing models 27
1.13.1 The M/M/1 Queuing System 27
1.13.2 M/M/c queue 38
1.13.3 M/M/∞ queue 41
1.13.4 M/D/1 queue 43
1.13.5 M/D/c queue 45
1.13.6 M/G/1 queue 46
1.13.7 M/G/k queue 49
1.14 Problems 50
1.15 Applications Of Queueing Theory 57
1.15.1 Traffic Flow 57
1.15.2 Scheduling 63
3
1.15.3 Facility Design and Employee Management 64
1.15.4 A Mail Sorting Office 67
1.15.5 Queueing Theory in a Restaurant Operation 68
1.15.6 Applying Queueing Model to the Airspace Control 70
sytems
1.16 Limitations of queuing theory 71
4
1.1. Introduction to Queueing Theory
Queueing theory is a branch of mathematics that studies and models the act
of waiting in lines. It is a common phenomenon in everyday life to see a large
number of persons waiting in front of a booking counter, in a railway station or in a
theatre or in a ration shop to have some service carried out. This waiting problem
led the Danish engineer A.K. (Agner Krarup) Erlang, who worked for the
Copenhagen Telephone Exchange to find a solution. He developed in 1903
the Queueing theory.[3] Queueing theory analyze the shared facility needs to be
accessed for service by a large number of jobs or customers. The first paper on
queuing theory, “The Theory of Probabilities and Telephone Conversations” was
published in 1909 by A.K. Erlang, now considered the father of the field. His work
with the Copenhagen Telephone Company is what prompted his initial foray into
the field.
5
path for modern queuing theory. His works inspired engineers, mathematicians to
deal with queueing problems using probabilistic methods.
6
Nevertheless queuing systems are practically very important because of the
typical trade-off between the various costs of providing service and the costs
associated with waiting for the service (or leaving the system without being
served). High quality fast service is expensive, but costs caused by customers
waiting in the queue are minimum. On the other hand long queues may cost a lot
because customers (machines e.g.) do not work while waiting in the queue or
customers leave because of long queues. So a typical problem is to find an
optimum system configuration (e.g. the optimum number of servers). The solution
may be found by applying queuing theory or by simulation.
1.2. Definition
In computer science, queueing theory is the study of queues as a technique
for managing processes and objects in a computer. A queue can be studied in terms
of: the source of each queued item, how frequently items arrive on the queue, how
long they can or should wait, whether some items should jump ahead in the queue,
how multiple queues might be formed and managed, and the rules by which items
are enqueued and dequeued.
The queues that a computer manages are sometimes viewed as being in stacks. In
most systems, an item is always added to the top of a stack. A process that handles
queued items from the bottom of the stack first is known as a first-in first-out
(FIFO) process. A process that handles the item at the top of the stack first is
known as a last-in first-out (LIFO) process.
1.3. Examples
Below we briefly describe some situations in which queueing are important.
Example 1. Supermarket.
How long do customers have to wait at the checkouts? What happens with
the waiting 7 time during peak-hours? Are there enough checkouts?
7
A machine produces different types of products. What is the production lead
time of an order? What is the reduction in the lead time when we have an extra
machine? Should we assign priorities to the orders?
8
Example 8. Traffic lights.
How do we have to regulate traffic lights such that the waiting times are
acceptable?
Example 9. Hospital emergency department.
In a hospital emergency department patients arrive with various kinds of
injuries and medical issues that require urgent treatment. How many nurses and
doctors need to be on staff to provide patients with proper care in a timely manner?
How many intensive care units are needed to hospitalize patients?
1.4.1. Variable.
A variable is a symbol (A, B, x, y, etc.) that can take on any of a specified set of
values.
9
Generally, statisticians use a capital letter to represent a random variable and
a lower-case letter, to represent one of its values. For example,
X represents the random variable X.
P(X) represents the probability of X.
P(X = x) refers to the probability that the random variable X is equal to a
particular value, denoted by x. As an example, P(X = 1) refers to the
probability that the random variable X is equal to 1.
The table below, which associates each outcome with its probability, is an
example of a probability distribution.
Number of
Probability
heads
0 0.25
1 0.50
2 0.25
Table 1.1
The above table represents the probability distribution of the random
variable X.
10
All probability distributions can be classified as discrete probability
distributions or as continuous probability distributions, depending on whether
they define probabilities associated with discrete variables or continuous variables.
Some examples will clarify the difference between discrete and continuous
variables.
Suppose the fire department mandates that all fire fighters must weigh
between 150 and 250 pounds. The weight of a fire fighter would be an
example of a continuous variable; since a fire fighter's weight could take on
any value between 150 and 250 pounds.
Suppose we flip a coin and count the number of heads. The number of heads
could be any integer value between 0 and plus infinity. However, it could
not be any number between 0 and plus infinity. We could not, for example,
get 2.5 heads. Therefore, the number of heads must be a discrete variable.
An example will make this clear. Suppose you flip a coin two times. This
simple statistical experimentcan have four possible outcomes: HH, HT, TH, and
TT. Now, let the random variable X represent the number of Heads that result from
this experiment. The random variable X can only take on the values 0, 1, or 2, so it
is a discrete random variable.
11
Number of heads Probability
0 0.25
1 0.50
2 0.25
Table 1.2
The above table represents a discrete probability distribution because it relates
each value of a discrete random variable with its probability of occurrence. In
subsequent lessons, we will cover the following discrete probability distributions.
Note: With a discrete probability distribution, each possible value of the discrete
random variable can be associated with a non-zero probability. Thus, a discrete
probability distribution can always be presented in tabular form.
12
function, a PDF, or a pdf. For a continuous probability distribution, the density
function has the following properties:
For example, consider the probability density function shown in the graph
below. Suppose we wanted to know the probability that the random variable X was
less than or equal to a. The probability that X is less than or equal to a is equal to
the area under the curve bounded by a and minus infinity - as indicated by the
shaded area.
Note: The shaded area in the graph represents the probability that the random
variable X is less than or equal to a. This is a cumulative probability. However, the
probability that X is exactly equal to a would be zero. A continuous random
variable can take on an infinite number of values. The probability that it will equal
a specific value (such as a) is always zero.
13
The expected value or mean of X is denoted by E(X) and its variance by σ2(X)
where σ(X) is the standard deviation of X.
An important quantity is the coefficient of variation of the positive random
variable X defined as
𝜎(𝑋)
Cx =
𝐸(𝑋)
The coefficient of variation is a (dimensionless) measure of the variability of
the random variable X.
14
1.5.1. Poisson Distribution
A Poisson distribution is the probability distribution that results from a
Poisson experiment.
15
Given the mean number of successes (μ) that occur in a specified region, we
can compute the Poisson probability based on the following formula:
Poisson Formula
Suppose we conduct a Poisson experiment, in which the average number of
successes within a given region is μ. Then, the Poisson probability is:
P(x; μ) = (e-μ) (μx) / x!
where x is the actual number of successes that result from the experiment, and eis
approximately equal to 2.71828.
The Poisson distribution has the following properties:
The mean of the distribution is equal to μ .
The variance is also equal to μ .
Example
The average number of homes sold by the Acme Realty company is 2 homes per
day. What is the probability that exactly 3 homes will be sold tomorrow?
Solution: This is a Poisson experiment in which we know the following:
μ = 2; since 2 homes are sold per day, on average.
x = 3; since we want to find the likelihood that 3 homes will be sold
tomorrow.
e = 2.71828; since e is a constant equal to approximately 2.71828.
We plug these values into the Poisson formula as follows:
P(x;μ) = (e-μ) (μx) / x!
P(3;2) = (2.71828-2) (23) / 3!
P(3;2) = (0.13534) (8) / 6
P(3; 2) = 0.180
Thus, the probability of selling 3 homes tomorrow is 0.180 .
1.5.2. Exponential distribution
The exponential distribution with parameter λ is given by
λe−λt , for t ≥ 0
If T is a random variable that represents inter arrival times with the exponential
distribution, then
P(T ≤ t) = 1 − e −λt and P(T > t) = e −λt
16
This distribution lends itself well to modeling customer inter arrival times or
service times for a number of reasons. The first is the fact that the exponential
function is a strictly decreasing function of t. This means that after an arrival has
occurred, the amount of waiting time until the next arrival is more likely to be
small than large. Another important property of the exponential distribution is what
is known as the no-memory property. The no-memory property suggests that the
time until the next arrival will never depend on how much time has already passed.
This makes intuitive sense for a model where we’re measuring customer arrivals
because the customers’ actions are clearly independent of one another. It’s also
useful to note the exponential distribution’s relation to the Poisson distribution.
We find that if we set n = 0, the Poisson distribution gives us
e −λt
which is equal to P(T > t) from the exponential distribution.
The relation here also makes sense. After all, we should be able to relate the
probability that zero arrivals will occur in a given period of time with the
probability that an interarrival time will be of a certain length. The interarrival time
here, of course, is the time between customer arrivals, and thus is a period of time
with zero arrivals.
1.5.3. Erlang distribution
A random variable X has an Erlang-k (k = 1, 2, . . .) distribution with mean
k/µ if X is the sum of k independent random variables X1, . . . , Xk having a common
exponential distribution with mean 1/µ. The common notation is Ek(µ) or briefly
Ek .
f (t) =
(µt)k−1 e−µtµ t > 0.
(k − 1)!
𝑘−1
1 (µ𝑡)
F(t) = 1 − ∑ , 𝑡<0
𝑒µ𝑡 1!
𝑗=0
17
The parameter µ is called the scale parameter, k is the shape parameter. A phase
diagram of the Ek distribution is shown in figure 1.
In figure 2 we display the density of the Erlang-k distribution with mean 1 (so
µ = k) for various values of k.
1 2 k
µ µ µ
Figure 1: Phase diagram for the Erlang-k distribution with scale parameter µ
− −
(µ𝑡)𝑘 2 − (µ𝑡)𝑘 1 −
f(t) = 𝑝𝜇 (𝑘−2)! 𝑒 µ𝑡
+ (1 − 𝑝)µ (𝑘−1)! 𝑒 µ𝑡
, 𝑡 >0
1.6.Queuing Disciplines.
It is easy for one to think of all queues operating like a grocery checkout
line. That is to say, when an arrival occurs, it is added to the end of the queue and
service is not performed on it until all of the arrivals that came before it are served
in the order they arrived. Although this a very common method for queues to be
handled, it is far from the only way. The method in which arrivals in a queue get
processed is known as the queuing discipline. This particular example outlines a
first-come-first-serve discipline, or an FCFS discipline. Other possible disciplines
include last-come-first-served or LCFS, and service in random order, or SIRO.
While the particular discipline chosen will likely greatly affect waiting times for
particular customers (nobody wants to arrive early at an LCFS discipline), the
discipline generally doesn’t affect important outcomes of the queue itself, since
arrivals are constantly receiving service regardless
18
1.7. Elements of Queuing Systems
Consider the following figure.
a) Population of Customers :-
Arrival defines the way customers enter the system. Mostly the arrivals are
random with random intervals between two adjacent arrivals. Typically the arrival is
19
described by a random distribution of intervals also called Arrival Pattern. The arrival
pattern can be described in terms of probabilities and consequently the probability
distribution for inter-arrival times or the distribution of number of customers arriving in
unit time must be defined.
The figure 1.6.2 shows a queueing system with single service station.
Fig.1.6.2. Queueing system with single queue and single service station.
c) Queue Length :-
Queue represents a certain number of customers waiting for service (of course the
queue may be empty). Typically the customer being served is considered not to be in the
queue. Sometimes the customers form a queue literally (people waiting in a line for a
bank teller). Sometimes the queue is an abstraction (planes waiting for a runway to
land).
d) Queuing Discipline:-
Queuing Discipline represents the way the queue is organised (rules of inserting
and removing customers to/from the queue). There are these ways:
1) FIFO (First In First Out) also called FCFS (First Come First Serve) - orderly queue.
2) LIFO (Last In First Out) also called LCFS (Last Come First Serve) - stack.
3) SIRO (Serve In Random Order).
4) Priority Queue, which may be viewed as a number of queues for various priorities.
5) Many other more complex queuing methods that typically change the customer’s
position in the queue according to the time spent already in the queue, expected service
duration, and/or priority. These methods are typical for computer multi-access systems.
Most quantitative parameters (like average queue length, average time spent in
the system) do not depend on the queuing discipline. That’s why most models either do
20
not take the queuing discipline into account at all or assume the normal FIFO queue. In
fact the only parameter that depends on the queuing discipline is the variance (or
standard deviation) of the waiting time. There is this important rule (that may be used
for example to verify results of a simulation experiment):
The two extreme values of the waiting time variance are for the FIFO queue (minimum)
and the LIFO queue (maximum).
Theoretical models (without priorities) assume only one queue. This is not considered as
a limiting factor because practical systems with more queues (bank with several tellers
with separate queues) may be viewed as a system with one queue, because the
customers always select the shortest queue. Of course, it is assumed that the customers
leave after being served. Systems with more queues (and more servers) where the
customers may be served more times are called Queuing Networks.
It represents some activity that takes time and that the customers are waiting for.
Again take it very generally. It may be a real service carried on persons or machines, but
it may be a CPU time slice, connection created for a telephone call, being shot down for
an enemy plane, etc. Typically a service takes random time. Theoretical models are
based on random distribution of service duration also called Service Pattern. Another
important parameter is the number of servers. Systems with one server only are
called Single Channel Systems, systems with more servers are called Multi Channel
Systems.
f) Output:-
It represents the way customers leave the system. Output is mostly ignored by
theoretical models, but sometimes the customers leaving the server enter the queue
again ("round robin" time-sharing systems).
21
Fig .1.6.4. Round Robin time sharing system.
g) Customer’s behaviour :-
c) The busy period distribution. We can estimate the probability distribution of busy
periods. If we suppose that the server is free initially and customer arrives, he will be
served immediately. During his service time, some more customers will come and will
be served in their turn. This process will continue this way until no customer is left
unserved and the server becomes free again. Whenever this happens we say a busy
period has ended.
Let Pn(t) denote the probability that there are n units in the system at time t.
Then the queuing system is said to be stable eventually, in the sense that the
probability Pn(t) is independent of time, that is, remains the same as time passes
(t→∞). Mathematically,
𝑑
lim (Pn(t)) = 0
𝑛→∞ 𝑑𝑡
23
(iii) Explosive State:
In a situation, where arrival rate of the system is larger than its service rate, a
steady state cannot be reached regardless of the length of the elapsed time. Here queue
length will increase with time and theoretically it could build up to infinity. Such case
is called the explosive state.
24
1/ is the expected service time.
When the mean service rate per busy server is a constant for all n 1, this
constant is denoted by
/(s ) is the utilization factor for the service facility, i.e., the expected
o fraction of time the individual servers are busy.
More notations are defined in a steady-state condition.
Pn = steady state probability of exact n customers in queueing system.
Ls = expected number of customers in queueing system =∑∞
𝑛=0 𝑛 Pn.
25
1.11.Traffic Intensity.
Traffic intensity is a measure of the average occupancy of a server or
resource during a specified period of time, normally a busy hour. It is measured
in traffic units (Erlangs) and defined as the ratio of the time during which a facility
is cumulatively occupied to the time this facility is available for occupancy.
λ
ρ= μ
For a single-server system like this rho is the average utilization of that server.
A / B / m / K / n/ D,
Where,
A: distribution function of the interarrival times,
B: distribution function of the service times, m: number of servers,
K: capacity of the system, the maximum number of customers in the system
including the one being serviced,
n: population size, number of sources of customers,
D: service discipline.
26
Hence M/M/1 denotes a system with Poisson arrivals, exponentially distributed
service times and a single server. M/G/m denotes an m-server system with Poisson
arrivals and generally distributed service times. M/M/r/K/n stands for a system
where the customers arrive from a finite-source with n elements where they stay for
an exponentially distributed time, the service times are exponentially distributed, the
service is carried out according to the request’s arrival by r severs, and the system
capacity is K.
1.13.Queueing models.
Poisson arrivals and exponential service make queueing models Markovian
that are easy to analyze and get usable results. Historically, these are also the models
used in the early stages of queueing theory to help decision-making in the telephone
industry. The underlying Markov process representing the number of customers in
such systems is known as a birth and death process, which is widely used in
population models. The birth-death terminology is used to rep- resent increase and
decrease in the population size. The corresponding events in queueing systems are
arrivals and departures. In this chapter we present some of the important models
belonging to this class.
27
2) P[more than one arrivals in the interval (t, t+h), for h →0] → 0.
3) The above probabilities do not depend on t ("no memory" property = time
independence = stationarity).
Let pn(t) = P[n arrivals in the time interval (0, t)].
Using the above assumptions 1) and 2), it is possible to express the
probability pn(t+h), h ® 0:
pn(t+h) =pn(t)[1 - lh]+ pn-1(t)l h
, …(2)
Because of small h the terms at the left sides of (2) may be considered as
derivatives:
, …(3)
Equations (3) represent a set of differential equations. To solve them let’s start
by p0(t):
(to prove it, compute the derivative of p0(t) and compare with (3) )
Using p0(t) it is possible to compute p1(t):
…(4)
Because of the assumption 3) the formula (4) holds for any interval (s, s+t),
28
in other words the probability of n arrivals during some time interval depends only
on the length of this time interval (not on the starting time of the interval).
Number of arrivals Nt during some time interval t is a discrete random variable
associated with the Poisson process. Having the probabilities of the random values
- (4), it is possible to find the usual parameters of the random variable Nt.
Let E[x] be the mean (average) value, Var[x] the variance, and Std[x] the standard
deviation of the random variable x:
…(5)
(5) gives the interpretation of the constant l , that is the average number of arrivals
per time unit. That’s why the l is called Arrival rate.
…(6)
…(7)
Another random variable associated with the Poisson process is the random
interval between two adjacent arrivals. Let x be the random interval. To find its
distribution, let’s express the Distribution function F(x):
F(x) = P[interval < x] = P[at least one arrival during the interval x]
= 1 - p0(x)
= 1 - e-l x
Because the interval is a continuous random variable, it is possible to compute
the Probability density as a derivative of the Distribution function:
f(x) = dF(x)/dx
= l e-l x
These two functions define the probability distribution:
F(x) = 1 - e-l x , f(x) = l e-l x …(8)
29
…(9)
(9) gives another interpretation of the constant l . Its inverted value is the average
interval between arrivals. Like the number of arrivals, the distribution of intervals
between arrivals does not depend on time. Note the big value of the standard
deviation (equal to the average value). It means, that the exponential distribution is
"very random". In fact all intervals from 0 to ¥ are theoretically possible. So it may
happen, that there will be clusters of very close arrivals separated by very long
intervals. Of course not all practical distributions can be treated as exponential
ones. There is this general rule:
If a large number of independent event streams are merged together, and if events
in each stream occur at a very low rate, then the resulting stream is approximately
a Poisson process with exponential intervals.
This rule is more or less satisfied for arrivals in systems with large populations
(each potential customer represents one low rate stream).
When applied to a service, the rate is called Service rate (m ). The
parameter m is the average number of completed services per time unit (provided
there are always customers waiting in the queue), its inverted value 1/m is the
average duration of the exponential service. The variance and the standard
deviation can be computed by replacing l by m in the formulae (9). Unlike arrival,
exponential service is an abstraction that is hardly satisfied by real systems,
because mostly it is very unlikely to have very short and/or very long services.
Real service duration will be typically "less random" than the theoretical
exponential distribution.
Another very important parameter of queuing systems is the ratio r of the
arrival and the service rates called Traffic rate (sometimes called Traffic intensity
or Utilisation factor):
…(10)
30
The value of r shows how "busy" is the server. It is obvious, that for r > 1
the queue will grow permanently. Later we shall see that in fact r must not be even
equal to one.
…(12)
Because of small h the terms at the left sides of (12) may be considered as
derivatives:
31
… (13)
Equations (13) represent a set of differential equations called Kolmogorov
Differential Equations. Their solution is a set of equations showing how each
probability changes with time. Fortunately we actually do not need these
functions. Because of the third assumption (stationarity) after some transition
period the system will become stable. Of course the state will permanently change,
but the probabilities of various numbers of customers in the system will be
constant. So the functions pn(t) become constants pn. Constant functions have zero
derivatives, so the set (13) becomes a set of algebraic equations for the stable state:
, …(14)
By dividing the equations (14) by m we get this set of equations that contain the
only parameter r - the traffic rate:
, …(15)
In the set (15) p1 is expressed by p0. By inserting p1 and p0 to the equation for p2,
we get:
p2 = (1+r )p1 - r p0
= (1+r )r p0 - r p0
= r 2p0
Similarly p2 and p1 may by used to express p3, etc. which gives the general formula
for pn:
pn = r np0 = (l /m )np0 …(16)
The value p0 can be computed by using the obvious requirement, that the sum of
all probabilities must be equal to 1:
giving: …(17)
In (17) the sum of geometric progression has been used. From (17) it is also
obvious that the traffic rate r must be less than 1, otherwise the sum of
32
probabilities would not be 1 (not even limited). Inserting (17) to (16) gives the
general formula for pn:
…(18)
The equations (18) represent a very important result used later to obtain all the
characteristics of the M/M/1 system. The relatively simple derivation of (18) was
enabled by the Poisson process assumptions used when expressing the
probabilities in (11). The equations (18) may be used directly to express these
probabilities:
P[service idle] = P[not queuing on arrival]
= p0
=1-r
= 1 - l /m
33
Now the formula (18) will be used to derive quantitative characteristics of the
M/M/1 system. (18) actually represents a distribution of a discrete random
variable Number of customers in the system(probabilities of all possible random
values). So it is possible to compute the mean value, that is the average number of
customers in the system:
…(19)
In (19) the formula for geometric progression has been used. Note again,
that r must be less than 1, otherwise the number of customers in the system will
grow permanently. In a similar way it is possible to find the average number of
customers in the queue. We assume, that the customer being served is not a part of
the queue. So n customers in the system means the queue length is n-1.
…(20)
In (20) we have used the fact, that the second sum is a complement to p0 and (17).
Note, that (20) may be also used to compute LQ provided LS is known or vice
versa. It is also possible to find an average queue length LQQ provided there is a
queue. For this we need the conditional probability pn/q = P[queue length is
n / there is a queue]. To find the conditional probability, let’s use the general
formula:
34
…(21)
The average queue length is a parameter that represents the quality of
service especially from user’s point of view. Another parameters we need is the
average time WS spent in the system and the average timeWQ spent in the queue.
These parameters are necessary to compute costs caused by customers waiting for
service. There is a very important the so called Little’s formula, that gives the
relation between the average number of customers in the system LS and the average
time WS spent in the system and between the average number of customers in the
queue LQ and the average time WQ spent in the queue:
LS = l WS LQ = l WQ ...(22,23)
This is the justification (not the exact proof) of the formula (22): let’s
assume the average time spent in the system is WS. During this time the average
number of newcomers is WSl, because l is the arrival rate (average number of
arrivals per time unit). So at the instant a customer is leaving the systems, it sees
(on the average) WSl customers left in the system. Because in the stable state the
average number of customers in the system is LS, we have the above formula.
Similar justification can be given for LQ and WQ (average number of arrivals
during the time spent in the queue is lWQ, that is the average number left in the
queue when leaving the queue, that is LQ). Using the Little’s formula we get these
formulae:
… (24)
…(25)
There is another obvious relationship between the average time spent in the
system and the average time spent in the queue, because the total time spent is
made of the time in the queue (that may be zero) and the time of the service:
35
…(26)
(26) can also be obtained from (24). Using the Little’s formula, it is possible to
express a similar relation between LS and LQ by multiplying both sides of (26)
by l :
…(27)
LSERV = r is the average number of customers being served (that of course must be
less than one). For a customer it is also important to know the probability, that the
time spent in the system (or in the queue) will be greater than a certain value.
Together with the queue length this probability represents a quality of service from
user’s point of view. Without proof (that is less trivial) these formulae may be
used:
…(28)
Of course the probabilities of spending less than t in the system (or in the queue)
are complements of the above values to 1. Because the time spent is a continuous
random variable, the probability of spending exactly the time t in system (queue) is
zero, but using the formulae (28), we can compute the probability, that the time
spent will be in certain range (t1, t2):
P[spending more than t1 and less than t2] = P[more than t1] - P[more than t2]
Variances
And finally the variances (squares of standard deviations) of the four
characteristics:
…(29)
36
A mathematical example of M/M/1 Queue
We are in a train station and we see, that a arriving train join a single queue
for the runway. We have an exponentially distributed service time with a rate μ=
30 arrivals / hour ( as we computed that in 5 minutes 1 train arrived the station)
and we have poisson arrivals with a rate λ= 25 arrivals / hour.
Now we want to calculate W, L, Wq and Lq.
W =1/μ–λ
= 1/ ( 30-25)
= 0,20 hours
≈ 12 min
L = λW
= λ / (μ - λ)
= 25/ (30-25)
= 5 trains
Wq = W- (1/μ)
= 1/ (μ - λ) - 1/μ
= 1/ ( 30-25) - (1/30)
= 0.167 hours
≈ 10 min
Lq = λW
= λ2 / μ ( μ - λ )
= 25 ^ 2 / 30 ( 30-25)
≈4,167 trains
37
1.13.2.M/M/c queue
Model definition
An M/M/c queue is a stochastic process whose state space is the set {0, 1, 2, 3,
...} where the value corresponds to the number of customers in the system,
including any currently in service.
Arrivals occur at rate λ according to a Poisson process and move the process
from state i to i+1.
Service times have an exponential distribution with parameter μ in the M/M/c
queue.
There are c servers, which serve from the front of the queue. If there are less
than c jobs, some of the servers will be idle. If there are more than c jobs, the
jobs queue in a buffer.
The buffer is of infinite size, so there is no limit on the number of customers it
can contain.
The model can be described as a continuous time Markov chain with transition rate
matrix
on the state space {0, 1, 2, 3, ...}. The model is a type of birth–death process. We
write ρ = λ/(c μ) for the server utilization and require ρ < 1 for the queue to be
stable. Ρ represents the average proportion of time which each of the servers
38
is occupied (assuming jobs finding more than one vacant server choose their
servers randomly).
The state space diagram for this chain is as below.
Stationary analysis
Number of customers in the system
If the traffic intensity is greater than one then the queue will grow without bound
The probability that an arriving customer is forced to join the queue (all servers
are occupied) is given by
39
1.13.3. M/M/∞ queue
Transient solution
The transient distribution can be written using moment generating
functions and formulas for transient means and variances computed by solving
differential equations.Assuming the system starts in state 0 at time 0, then the
40
probability the system is in state j at time t can be written as
from which the mean queue length at time t can be computed (writing N(t) for
the number of customers in the system at time t given the system is empty at
time zero)
Response time
The response time for each arriving job is a single exponential distribution
with parameter μ. The average response time is therefore 1/μ.
Maximum queue length
Given the system is in equilibrium at time 0, we can compute the cumulative
distribution function of the process maximum over a finite time horizon T in
terms of Charlier polynomials.
Congestion period
The congestion period is the length of time the process spends above a fixed
level c, starting timing from the instant the process transitions to state c + 1.
This period has mean value
41
Writing Nt for the number of customers in the system at time t as ρ → ∞
the scaled process
Model definition
An M/D/1 queue is a stochastic process whose state space is the set {0,1,2,3,...}
where the value corresponds to the number of customers in the system,
including any currently in service.
Arrivals occur at rate λ according to a Poisson process and move the process
from state i to i + 1.
Service times are deterministic time D (serving at rate μ = 1/D).
A single server serves customers one at a time from the front of the queue,
according to a first-come, first-served discipline. When the service is
complete the customer leaves the queue and the number of customers in the
system reduces by one.
The buffer is of infinite size, so there is no limit on the number of customers
it can contain.
42
Stationary distribution
The number of jobs in the queue can be written as an M/G/1 type Markov
chain and the stationary distribution found for state i (written πi) in the
case D = 1 to be
Delay
Define ρ = λ/μ as the utilization; then the mean delay in the system in an M/D/1
queue is
Busy period
The busy period is the time period measured from the instant a first customer
arrives at an empty queue to the time when the queue is again empty. This time
period is equal to D times the number of customers served. If ρ < 1, then the
number of customers served during a busy period of the queue has a Borel
distribution with parameter ρ.
Stationary distribution
A stationary distribution for the number of customers in the queue and mean
queue length can be computed using probability generating functions.
Transient solution
The transient solution of an M/D/1 queue of finite capacity N, often written
M/D/1/N, was published by Garcia et al in 2002
43
1.13.5.M/D/c queue
In queueing theory, a discipline within the mathematical theory of
probability, an M/D/c queue represents the queue length in a system
having c servers, where arrivals are determined by a Poisson process and job
service times are fixed (deterministic). The model name is written in Kendall's
notation. Agner Krarup Erlang first published on this model in 1909, starting
the subject of theory. The model is an extension of the M/D/1 queue which has
only a single server.
Model definition
An M/D/c queue is a stochastic process whose state space is the set
{0,1,2,3,...} where the value corresponds to the number of customers in the
system, including any currently in service.
Arrivals occur at rate λ according to a Poisson process and move the process
from state i to i + 1.
Service times are deterministic time D (serving at rate μ = 1/D).
c servers serve customers from the front of the queue, according to a first-
come, first-served discipline. When the service is complete the customer
leaves the queue and the number of customers in the system reduces by one.
The buffer is of infinite size, so there is no limit on the number of customers
it can contain.
44
1.13.6. M/G/1 queue
Model definition
A queue represented by a M/G/1 queue is a stochastic process
whose state space is the set {0,1,2,3...}, where the value corresponds to the
number of customers in the queue, including any being served. Transitions from
state i to i + 1 represent the arrival of a new customer: the times between such
arrivals have an exponential distribution with parameter λ. Transitions from
state i to i − 1 represent a customer who has been served, finishing being served
and departing: the length of time required for serving an individual customer
has a general distribution function. The lengths of times between arrivals and of
service periods are random variables which are assumed to be statistically
independent.
Scheduling policies
Customers are typically served on a first-come, first-served basis, other
popular scheduling policies include
processor sharing where all jobs in the queue share the service capacity
between them equally
last-come, first served without preemption where a job in service cannot be
interrupted
last-come, first served with preemption where a job in service is interrupted
by later arrivals, but work is conserved.
generalized foreground-background (FB) scheduling also known as least-
attained-service where the jobs which have received least processing time so
far are served first and jobs which have received equal service time share
service capacity using processor sharing.
shortest job first without preemption (SJF) where the job with the smallest
size receives service and cannot be interrupted until service completes
45
preemptive shortest job first where at any moment in time the job with the
smallest original size is served.
shortest remaining processing time (SRPT) where the next job to serve is
that with the smallest remaining processing requirement.
Service policies are often evaluated by comparing the mean sojourn time in the
queue. If service times that jobs require are known on arrival then the optimal
scheduling policy is SRPT.
Policies can also be evaluated using a measure of fairness.
Queue length
Pollaczek–Khinchine method
The probability generating function of the stationary queue length
distribution is given by the Pollaczek–Khinchine transform equation
where g(s) is the Laplace transform of the service time probability density
function.[8] In the case of an M/M/1 queue where service times are
exponentially distributed with parameter μ, g(s) = μ/(μ + s).
This can be solved for individual state probabilities either using by direct
computation or using the method of supplementary variables. The Pollaczek–
Khinchine formula gives the mean queue length and mean waiting time in the
system.
Matrix analytic method
Consider the embedded Markov chain of the M/G/1 queue, where the
time points selected are immediately after the moment of departure. The
customer being served (if there is one) has received zero seconds of service.
Between departures, there can be 0, 1, 2, 3,… arrivals. So from state i the chain
can move to state i –1, i, i + 1, i + 2, ….
The embedded Markov chain has transition matrix,
where
46
and F(u) is the service time distribution and λ the Poisson arrival rate of jobs to
the queue.
Markov chains with generator matrices or block matrices of this form are called
M/G/1 type Markov chains, a term coined by M. F. Neuts. The stationary
distribution of an M/G/1 type Markov model can be computed using the matrix
analytic method.
Busy period
The busy period is the time spent in states 1, 2, 3,… between visits to the
state 0. The expected length of a busy period is 1/(μ−λ) where 1/μ is
the expected length of service time and λ the rate of the Poisson process
governing arrivals. The busy period probability density function can be
shown to obey the Kendall functional equation.
Waiting/response time
Writing W*(s) for the Laplace–Stieltjes transform transform of the
waiting time distribution, is given by the Pollaczek–Khinchine transform as
47
1.13.7. M/G/k queue
In queueing theory, a discipline within the mathematical theory of
probability, an M/G/k queue is a queue model where arrivals are Markovian
(modulated by a Poisson process), service times have a General distribution and
there are k servers. The model name is written in Kendall's notation, and is an
extension of the M/M/c queue, where service times must be exponentially
distributed and of the M/G/1 queue with a single server. Most performance
metrics for this queueing system are not known and remain an open problem.
Model definition
A queue represented by a M/G/k queue is a stochastic process whose state
space is the set {0,1,2,3...}, where the value corresponds to the number of
customers in the queue, including any being served. Transitions from
state i to i + 1 represent the arrival of a new customer: the times between such
arrivals have an exponential distribution with parameter λ. Transitions from
state i to i − 1 represent the departure of a customer who has just finished being
served: the length of time required for serving an individual customer has a
general distribution function. The lengths of times between arrivals and of
service periods are random variables which are assumed to be statistically
independent.
48
where C2 is the coefficient of variation of the service time distribution. Ward
Whitt described this approximation as “usually an excellent approximation,
even given extra information about the service-time distribution."
However, it is known that no approximation using only the first two moments
can be accurate in all cases.
A Markov–Krein characterisation has been shown to produce tight bounds on
the mean waiting time.
Inter-departure times
It is conjectured that the times between departures, given a departure
leaves n customers in a queue, has a mean which as n tends to infinity is
different from the intuitive 1/μresult.
Two servers
For an M/G/2 queue (the model with two servers) the problem of determining
marginal probabilities can be reduced to solving a pair of integral equations or
the Laplace transform of the distribution when the service time distribution is a
mixture of exponential distributions. The Laplace transform of queue
length and waiting time distributions can be computed when the waiting time
distribution has a rational Laplace transform.
Average number
1.14.Problems
1. A system is being designed. The inter-arrival times of customers are expected
to be exponentially distributed with mean 1/λ = 50 msec.
(a) One single-server queue with infinite buffer space. The service times are
exponentially distributed with mean 1/µ = 20 msec.
(b) Two single-server queues, each with infinite buffer space. Customers are
randomly dispatched to each queue with an equal probability. The service
times are exponentially distributed with mean 1/µ = 40 msec at each
server.
49
Find the response time in each option using queueing analysis
Solution:
(a) This option is an M/M/1 queue with λ = 0.02 customers per msec and µ
= 0.05 customers per msec. Using the M/M/1 mean response time
formula, we have
𝟏 𝟏
T= = = 33.3 msec
µ−𝐗 𝟎.𝟎𝟓−𝟎.𝟎𝟐
(b) In this option, the arrival rate at each queue is half of the system arrival
rate. Ef- fectively, we have two M/M/1 queues, each with λ = 0.01
customers per msec and
µ= 0.025 customers per msec. Using the M/M/1 mean response time
formula, we have,
𝟏 𝟏
T= = = 66.7 msec
µ−𝛌 𝟎.𝟎𝟐𝟓−𝟎.𝟎𝟎𝟏
i. A per son will have to wait if the service facility is not idle.
Probability that the service facility is idle= Probability of no customer
50
in the system (Po)
∴ Probability of waiting = 1 – Po = 1-(1- p)= p= λ/ μ=6/10=0.6
Let λ be the arrival rate when a second booth is justified, i.e. , Wq ≥10
minutes.
𝜆 1⁄
48
Wq = =1
𝜇(𝜇−𝜆) ⁄36 (1⁄ − 1⁄ )
36. 48
= (0.6)6
3.Customers arrive at sales counter manned by a single person accoding to a
Poisson process with a mean rate of 20 per hour. The time required to serve a
customer has an exponential distribution with a mean of 100 seconds. Find the
average waiting time of a customer.
51
The average waiting time of a customer in the system is given by:
1 1 1
Wq = = = hr or 225 seconds.
(𝜇−𝜆) (36−20) 16
4. A refinery distributes its products by trucks, loaded at the loading dock. Both
company trucks and independent distributor’s trucks are loaded. The
independent firms complained that sometimes they must wait in line and thus
lose money paying for a truck and driver. That is only waiting. They have asked
refinery either to put in a second loading dock or to discount prices equivalent
to the waiting time. Extra loading cock cost Rs. 100/- per day whereas the
waiting time for the independent firms cost Rs. 25/- per hour. The following
data have been accumulated. Average arrival rate of all trucks is 2 per hour and
average service rate is 3 per hour. Thirty percent of all trucks are independent.
Assuming that these rates are random according to the Poisson distributions,
determine:
(c) The expected cost of waiting time of independent trucks per day
𝜆 2
ρ= = = 0.66
𝜇 3
b) The waiting time of a truck that waits is
(W|W>0) = Ws/ P(W>0)
𝜆
= /(λ/µ)
𝜇(𝜆−𝜇)
1 1
= = = 1 hr
(−𝜆+𝜇) (3−2)
(c ) The total expected waiting time of independent trucks per day is given by:
Expected waiting time
= Trucks per day × % Independent truck × Expected waiting time per truck.
52
2
= (2×8)(0.3Wq) =4.8 × = 3.2 hour per day
3(3−2)
5. Consider a telephone booth for which the average arrival rate is 15/hr, and on
average calls last 3 minutes during the daytime. Compare properties of queues
which form for the phone, with similar properties in the situations where one or
two additional booths are installed.
P0ρc+1
Lq = = 1/68 = 0.015
(c − 1)!(c − ρ)
53
An additional property to investigate would be the probability of having to wait in
the queue for more than a given time, say 5 minutes (or 1/12 hours). With one
booth, this is
∞
(1-P0) ∫1/12 𝑓(𝑡)𝑑𝑡
Where
f(t) = (µ −λ)e−(µ−λ)t = 5e−5t,
so
∞
P(W ait > 5 minutes) = 0.75 [−e−5t 1/12
]
= 0.75e−5/12
= 0.494.
so
P(W ait > 5 minutes) = 9/44 [e-25t]1/12∞
= 0.025.
The probability of a non-trivial waiting time would therefore be considerably reduced by the
introduction of just one extra booth.
6. A car servicing station has 3 stalls where service can be offered simultaneously.
The cars wait in such a way that when a stall becomes vacant, the car at the head
o the line pulls up to it. The station can accommodate at most four cars waiting
(seven in the station) at one time. The arrival pattern is Poisson with a mean of
one car per minute during the peak hours. The service time is exponential with
mean 6 minutes. Find the average number of crs per hour that cannot enter the
station because of full capacity.
Solution: Here λ = 1 car per minute, µ = 1/6 car per minute, C = 3, N = 7,
ρ=λ/µ=6 and
3−1
1 1 1
P0 = ∑ 6𝑛 + ∑7𝑛=3 6𝑛 =
𝑛=0 n! 3!3𝑛−1 1141
54
(i) Expected number of cars in the queue is
𝐶
𝜌(Cρ)
E(m) = 2 Po (1-ρN – C + 1 – (1-ρ)(N – C + 1) ρN-C)
𝐶!(1−ρ)
6(3x6)3 1
= x ( 1- (6)5 – (-5)(5)(6)4 )
3!(−5)2 1141
= 3.09 cars
(ii) Expected number of cars in the service station
(3−𝑛)
E(n) = 3.09 + 3 – Po ∑2𝑛=0 (6)n = 6.06 cars.
𝑛!
(iii) Expected waiting time of cars in the service station
0.06 0.06
E(v) = = 279936 1 = 12.3 minutes
1(1−𝑃) 1(1− × )
3!(81) 1141
(iv) Expected number of cars per hour that cannot enter the station is
279936 1
60λPN = 60 × 1 × P7 = 60 × × = 30.3 cars per hour.
3!(81) 1141
7. A telephone exchange has two long distance operators. The telephone company
finds that during the peak loak, long distance calls arrive in a Poisson fashion at
an average rate of 15 per hour. The length of service on these calls is
approximately distributed with mean length 5 minutes.
(a) What is the probability that a subscriber will have to wait for his long
distance call during the peak hours of the day?
(b) If the subscribers will wait and serviced in turn, what is the expected
waiting time?
Establish the formula used.
Solution: Here s = 2, λ = 15/60 = 1 /4 , μ = 1/5
Therefore, first compute
55
1
= 5 25
1+ + ×1/2×8/3
4 16
3
=
13
(𝜆/µ)𝑠
(a) P(W>0) = P0
𝑠!(1−𝜌)2
2 3
(5/4)
= 2
2!(1−5/8) 13
= 0.48
(b) Wq = Lq/λ
1 ρ(𝑠𝜌)𝑠
= P0
𝜆 𝑠!(1−𝜌)2
5/8(5/4)2 3
=4×
2!(1−5/8) 2 × 13
125
=
39
= 3.2 minutes.
1.Queueing on Roads
56
Introduction
The study of vehicle flow along a road can be classed as a deterministic flow,
because the number of cars flowing within a particular time span can be predicted by
averaging previously collected data for that day of the week and time.
For the purposes of analysing the vehicle flow on roads it is normal to monitor
the frequency of vehicles in small time groups, over a period of months, and then
average out the days in the months, to obtain an average flow for each day of the
week. This will have the effect of removing, or at least reducing the effect of, unusual
days, when the traffic flow was very different to normal. There is little use in trying
to accommodate for these days as the change in traffic flow when something does
upset the system is very hard to predict, if it is at all predictable.
I have covered two different types of queues that commonly occur on roads:
58
T Time to travel from between points 1 and 2, when there is no queueing
Capacity of the motorway between points 1 and 2 (how many vehicles
c
can queue in that stretch of motorway)
Modelling the traffic flow
As the traffic on the motor way can come from either the entry slip road or from
the motorway we can say that A2(t) = A2s(t) + A2m(t). At first sight the number of
cars (and hence the length) of the queue would appear to be A2(t) - D2(t), however
this is not strictly the case, as the length of the queue is this, plus the number of cars
that would have been in the area taken up by the queue, had there not been a queue.
However the area between D2(t) and A2(t) on a graph of time against cumulative
count gives the total delay to all vehicles that pass point 2.
Most motorway junctions are designed so that when there is a large hold up the traffic
on the entry slip road will enter the motorway alternately with the traffic on the "slow
lane". Thus s = /2, and so the service rate on the motorway for through traffic
is - s. This also means that the through traffic on the motorway is occupying m-
1/2 lanes of the motorway.
If through traffic on the motorway isn't using all of its service rate then the entry slip
road's traffic can use up the slack in the system (up to the maximum limit of the slip
road), and thus effectively the joining traffic gets service priority, and vice versa,
when the entry slip road's traffic isn't using its full service rate then motorway through
traffic can use up the slack, and so it gets service priority.
Most commonly what happens is that a queue builds up on the motorway, but the slip
road remains free of queueing traffic,. as the slip road operates under its full
capacity, s.
It can be said that:
D2m(t) = D2(t) - D2s(t), as the vehicles to depart from point 2 must have come
from either the motorway or the slip road
D1m(t) = D2m(t) + c
A1m(t) = A2m(t + t), as if there were no queueing then the number of vehicles
arriving at point 2 must be equal to the number arriving at point 1, t units of
time ago, that were going to carry onto point 2
If the queue has not yet reached point 1 then A1m(t) - D2m(t) is the number of
vehicles between points 1 and 2, either in a queue or moving along that stretch of
motorway. Thus A1m(t) - D2m(t) - c = The number of through cars that have been
59
delayed that have yet to reach point 1.
If we presume that there isn't a lane reserved soley for the use of exiting traffic
then the exiting traffic will have to share a lane with through traffic, thus the delay for
exiting traffic arriving at point 1 at a time T will be the same for a through vehicle
arriving at point 1 at time T.
The delay for all through vehicles will be equal to the area between the curve of
A1m(t) (which equals A2m(t + t)), and D1m(t) (which equals D2m(t) + c). Thus the
delay for a single vehicle is the integral from 0 to T of (A2m(t + t) - D2m(t) - c) with
respect to t / the number of vehicles:
In order for there to be no effect on traffic leaving the motorway there would
need to be one lane reserved solely for traffic exiting the motorway at point 1, and in
which case:
The exit junction would not affect the delay time in the queue
The queue would actually be longer, and so the speed of the queue traffic
would be higher
The queue wouldn't affect the exiting of traffic
This is a solution used on many stretches of motorway, where there is enough space.
Introduction
This example discusses how it is possible to model the build up of traffic in the
rush hour, and thus to see when queues form on a straight road, without junctions,
relative to the arrival rate of cars on the section of road.
Symbols Used
60
D(t) Cumulative departures from the queue at time t
In the rush hour the arrival rate, (t), will rise until it reaches a maximum rate (i.e.
the time when the most people reach the point of road, when they are trying to get
to work), after this point the arrival rate will decrease. There are four main points
in this flow, as follows:
t0 The first point at which (t) equals the maximum service rate,
t3 The point where the queue has gone, and so (t) = (t)
The above details tend to imply that a graph of (t) is quadratic, and so would be
differentiable twice at or near t1. This means that (t) has a taylor expansion
about the point t1:
for constant :
61
For small t-t1, i.e. this is valid where t0 < t < t3
This means that t0 and t2 can be estimated, by substitution:
The length of the queue is the area between the curves of (t) and (t), i.e.:
By the using similar substitutions to those used in the previous derivation we can
simplify this to:
1.15.2. Scheduling
A] Computer Scheduling
There are many different strategies used for scheduling in computers. This
section examines a simple strategy, with no allowance for process prioritisation,
this is the Batch Processing algorithm, and has the following properties:
62
It is clear that the average response time of the system for a process that takes x
seconds to complete, T(x), will be the time spent waiting in the queue, plus the
time to complete the process:
Notice how the wait time is totally independent of the job's length, thus batch
processing is completely indiscriminate of job length, but this does have the
disadvantage that short jobs get no priority and thus batch processing isn't suitable
for a time shared system. From the above we can substitute in W0 to give:
A] Queues in a Bank
Introduction
As a rule people dislike queueing in banks, and so in order to improve the level
of service a bank manager is interested to find out:
1. The average number of people waiting in the bank (i.e. the queue length)
2. How much of the cashiers' time is spent idle (as a percentage of their time)
Depending on how many tellers she employs during lunchtime. She is prepared
to employ up to 5 cashiers, but not less than 1.
63
The distribution of the length of time it takes the cashiers to carry out a task
is exponential, with mean 2 minutes and standard deviation of 5/4 minutes
There is virtually no limit on the queue length, as the bank has a large floor
area
Customers arrive in a Poisson distribution, with mean of 25 per hour
Service is done on a first come first serve basis
This is an M/M/c queue, where 1 =< c =< 5
Symbols
Calculations
From the above we can easily calculate the following values, which are used to
work out Lq and W:
p0 and Lq, W and the idle time can be calculated using the following equations:
64
The results of these equations for 1 to 5 cashiers are summarised in the following
table:
From the table it can be seen that either 1 or 2 cashiers should be employed, as this
will keep a short queue, but without the cashiers being idle too much of the time.
65
the mail, i.e. all workers were initially made to help at the start of the sorting line,
to reduce the backlog, and then were gradually moved along the sorting line, as the
backlog moved along it. However Queueing Theory can be used to see if this is
indeed the quickest way to sort mail, or to suggest the quickest way, if this isn't it.
For this example stage refers to a stage in the process of sorting, and server refers
to a worker who sorts letters, at any stage.
Symbol Represents
Ak(t) Cumulative number of letters that have arrived at the stage number k
Cumulative number of letters that have departed the queue for stage
Dkq(t)
number k
66
in the server.
By the fact that k(t) is the service rate of the kth stage then:
We want to either:
a. minimise the total delay through the system (i.e., each letter is in the system
for the smallest possible time), or:
b. maximise the number of letter that have departed the system after a given
time
Hence all the stages should have the highest possible service rate, which is thus
/n, this would yield the highest Dk(t) for all k.
It is never good to have a (k-1)> k, as this will create a queue between stages
k-1 and k, and the excess service rate used to create the queue could have been
better used at the next stage to avoid the queue forming in the first place.
Summary of Results
67
1. It is best to have the Postal Workers sorting mail distributed evenly between
all the stages
2. It is never advantageous to have a k greater then the next stage.
So how does one apply Queueing Theory in a restaurant operation? Suppose the
following information below for a typical restaurant:
Assumptions:
The restaurant operates 180 minutes on the evening shift, which starts at 7:30
PM and closes at 10:30 PM.
This restaurant is unusual because the guests arrive and leave exactly at the
half hour mark (this is to make it simpler)
Read the data above like: The number of guests in the restaurant between 8:00
and 8:30 is 85. The number of arrivals at 8:30 is exactly 25. The number of
guests that depart at 8:30 is 30.
So, given our restaurant data, we arrive at the following questions:
1. What is the average throughput of customers, using the unit of (customers per
minute) of operation?
68
2. What is the average cycle time of a customer in minutes?
Restaurant Operations Management
The questions above are important because:
The lower the cycle time per restaurant customer, then the restaurant manager
can accept more guests and increase the restaurant revenue.
Knowing the throughput of the restaurant can give the restaurant manager
more ability to manage the restaurant to a drum beat. This is typically
called Takt Time in the language of lean manufacturing.
Okay, so how can one apply queueing theory to answer the questions above?
100.83 / 1.33 = 75.64 minutes is the average cycle time of a restaurant customer
So, if one’s goal is to increase restaurant revenue, then the restaurant manager can
do the following, given the data above:
lower the average cycle time of the restaurant guests, which allows for other
guests to occupy that spot and thereby increase revenue
do nothing to cycle time, but try to increase the average order value per guests
through menu up-sell or cross-sell
do nothing to cycle time, but investigate menu pricing and increase menu item
prices as appropriate, but done with wisdom and care, otherwise customers will
leave if prices aren’t in line with their expectations
Additionally, if one is interested in reducing cycle time per restaurant guest, this is
also an area in which Queueing Theory and Lean can work together. Perhaps there
69
are process steps that do not add value, which contribute to the current cycle time
calculation. Perhaps eliminating wastes in the restaurant operations processes can
thereby reduce cycle time per customer.
70
REFERENCES
[1] Kanti Swarup, R.K. Gupta, Man Mohan. Operations Research, Sultan Chan
Publications.
[2] Sundarapandian, V. (2009). "7. Queuing Theory". Probability, Statistics and
Queuing Theory. PHI Learning. ISBN 8120338448.
[3] Kendall, D. G. (1953). "Stochastic Processes Occurring in the Theory of
Queues and their Analysis by the Method of the Imbedded Markov Chain". The
Annals of Mathematical Statistics 24 (3): 338. doi:10.1214/aoms/1177728975.
JSTOR 2236285. edit American Journal of Engineering Research (AJER) 2014 w
w w . a j e r . o r g Page 11 doi:10.1214/aoap/1029962815.
[4] Bose, S. An introduction to queueing systems. Kluwer Academic/Plenum
Publishers, New York, 2002. [
[5] Lawrence W. Dowdy, Virgilio A.F. Almeida, Daniel A. Menasce (Thursday
Janery 15, 2004). "Performance by Design: Computer Capacity Planning By
Example". p. 480
[6]Adan, I., and Resing, J. Queueing Theory.
http://web2.uwindsor.ca/math/hlynka/qonline.html.
[7] http://www.andrewferrier.com/oldpages/queueing_theory/Henry/
[8] stattrek.com/probability-distributions/probability-distribution.aspx.
71