It is an important area of applied probability theory. A queue is a waiting line, an orderly line of one or more persons or jobs, e.g. a waiting line at a ticket booking counter at a cinema hall, railway or bus station. Queues are also common in computer systems. There are queues of enquiries waiting to be processed by an interactive computer system, e.g. queues of database records and queues of input–output requests.
They are not only of human beings or animals but also of the aeroplanes seeking to land at a busy airport, trains waiting outside the railway station for clearance of a platform and signal permitting entry of a train at a busy railway station, ships to be unloaded, machine parts to be assembled, vehicles waiting for a green light at a traffic signal point, calls arriving at a telephone switch board, jobs waiting for processing by a computer and so on.
It consists of the following elements:
We will deal with these one by one.
Customers from a population or source enter a queueing system to receive some type of service. The word ‘customer’ is used here in the generic sense. It does not necessarily refer to animate things. It may mean an enquiry message requiring transmission and processing.
If the population is finite, it is difficult to model the problem. In infinite population systems, the number of customers has no effect on the arrival pattern and it is therefore easy to model.
It is the arrival of people or things from a customer population and entering the waiting line in anticipation of their turn to receive service.
The ability of a queueing system to provide service for an arriving system of customers depends not only on the mean arrival rate λ, but also on the pattern of their arrival. If customer arrivals are evenly spaced, the service facility can provide better service than if they arrive in clusters:
0 ≤ t0 < t1 < t2 …
The random variables τk = tk − tk − 1 (k = 1, 2, …) are called inter-arrival times. It is usual to describe this by A(t) = 1 − e −λt (exponential distribution).
It is the customers or things forming into an orderly waiting line waiting to receive service when their turn comes and get served at the service point.
The exponential distribution is used to describe the service time of a server. The distribution function is
ω (t) = P(s ≤ t ) = 1 − e−μt(11.1)
where μ stands for the average service rate.
It is the point at which service is provided and the people or jobs in the queue system get the service they require. There may be one or more servers (channels) attending the waiting line or lines.
A server is an entity capable of performing the required service for a customer.
The simplest queueing system is the one with single server system. A multi server system has ‘C’ identical servers and provides service to ‘C’ customers at a time.
The rule for selecting the next customer to receive is given in detail as follows:
or FIFO: First in, first out
or LIFO: Last in, first out
or SIRO: Service in random order
Some customers get preferred treatment.
The first one is the most commonly prevalent queue discipline.
In general, some customers behave in one of the following ways.
A block diagram describing the various elements of a basic queueing system is shown in Figure 11.1.
Figure 11.1 Elements of a basic queueing system.
Some typical queueing systems are presented in Table 11.1.
Table 11.1 Typical queueing systems.
The primary random variables in a queueing system are illustrated in Figure 11.2.
Figure 11.2 Queueing theory random variables.
The different queueing systems may be classified as follows:
(a)
(b)
(c)
Figure 11.3 Queueing systems.
Figure 11.4 Machine shop as a complex queue.
The queueing theory is concerned with the statistical description of the behaviour of the queueing system, modeling and solving the queueing problem.
In a specified queueing system, the problem is to determine the following statistical parameters:
Total time spent = waiting time + service time.
In a queueing theory analysis, we have to distinguish between the following two states:
A queueing system is said to be in a transient state if its operating characteristics are dependent on time.
This occurs usually in the early stages of the operation of the queueing system.
A queueing system is said to be in a steady state if its operating characteristics are independent of time.
Let pn(t) be the probability that there are n units in the system at time t.
In the steady state, rate of change of pn(t) is zero, i.e.
(11.2)
The basic queueing theory definitions and notations are given in Table 11.2.
Table 11.2 Basic queueing theory notations and definitions.
The arrival pattern of customers in a queueing system changes from one system to another. But one pattern of common occurrence which is relatively easy to model is that of ‘completely random arrivals’, which means that the number of arrivals in unit time has a Poisson distribution. In this, the intervals between successive arrivals are distributed negative exponentially, i.e. in terms of e −λt.
The model in which only arrivals are considered is called a pure birth model. In this, departures are not taken into account. Here, ‘birth’ refers to a new calling unit in the system and ‘death’ refers to the departure of a served unit. Thus, pure birth models are not of practical importance study of pure birth models is important for understanding completely random arrival problems.
We establish in the following theorem that in a completely random arrival queueing system, the probability distribution is that of Poisson distribution.
Theorem (Probability Distribution of Arrivals) If in a queueing system, the arrivals are completely random, then the probability distribution of the number of arrivals in a fixed time-interval follows a Poisson distribution.
Proof We prove the theorem based on the following axioms:
Let pnt be the probability of n arrivals in a time intervals of length t. Clearly n ≥ 0, we now construct differential difference equations governing the process in two different situations, viz. n > 0 and n = 0.
Case 1: n > 0 There may be two mutually exclusive ways of having n units of time:
Figure 11.5
We compute the following probability:
Probability of exactly one arrival in time interval
δt = λδt(11.3)
Probability of no arrival (complement of this case) = 1 − λδt(11.4)
Now, probability of these two combined events described in (1)
= (probability of n units at time t) × (probability of no arrivals)
= pn(t) (1 − λδt) (11.5)
Figure 11.6
Probability of these two combined events described in (2)
= (probability of n − 1 units at time t) × (probability of one arrival during time interval δt)
= pn−1(t)λδt (11.6)
Adding Eqs. (11.5) and (11.6), we get the probability of n arrivals at time t + δt:
pn(t + δt) = pn(t)(1 − λδt) + pn−1(t)λδt(11.7)
Case 2: n = 0 In this case, we obtain
pn(t + δt) = p(no unit at time t) + p(no arrival during interval δt)
p0(t)(1 − λδt)(11.8)
Adding Eqs. (11.7) and (11.8), we get
pn(t + δt) − pn(t) = pn(t)(− λδt) + pn−1(t)λδt for n > 0(11.9)
p0(t + δt) − p0(t) = p0(t)(−λδt) for n = 0(11.10)
On dividing equations by δt and taking limits as δ t → 0, we obtain
(11.11)
(11.12)
We have to solve the differential difference equations under the initial conditions stated as follows:
p′0 (t) = − λp0(t), p0(0) = 1 for n = 0(11.13)
pn(t) + λpn(t) + λ pn−1(t), pn(0) = 0 for n > 0(11.14)
To Solve the Differential Equation Eq. (11.13) This is a first order and first degree differential equation. Separating the variables, we have
(11.15)
On integration, we get
log p0 = − λt + constant or p0(t) = Ae −λt
When t = 0, p0 = 1. ∴A = 1
Hence the solution is
p0(t) = e −λt(11.16)
Iterative Method of Solution for Eq. (11.14) It is a differential-cum-difference equation. We apply iterative method and solve the system for each n.
For n = 1, we have from Eq. (11.14)
p1′ (t) + λp1(t) = λp0(t) = λe −λt by Eq. (11.16) (11.17)
This is a linear equation Integrating Factor = e −λt, Now multiplying Eq. (11.17) by e −λt, we write
d[p1(t)e −λt] = λdt(11.18)
Integrating, we get
p1(t)e −λt = λt + B
When t = 0, p1 = 0 ⇒ B = 0. ∴ Therefore, we have
(11.19)
For n = 2, we have from Eq. (11.14)
Multiplying Eq. (11.19) bye −λt, we can write
(11.20)
Integrating we get
When t = 0, p2 = 0 ⇒ C = 0. Therefore, we have
(11.21)
Proceeding like this we finally obtain
(11.22)
which is the formula for Poisson distribution.
This completes the proof of the theorem.
We have known that if n is the number of arrivals during the time interval t, then the law of probability in Poisson process is given by
(11.23)
where λt is the parameter.
(11.24)
mean arrival rate (or input rate)
p0(δt) = prob (no arrival in time δt)(11.25)
Putting n = 0 and t = δt in Eq. (11.24), we get
p0(δt) = e −λδt = 1 − λδt + 0(δt)(11.26)
When δt is small
p0(δt) = 1 − λδt(11.27)
This means that the probability of no arrival in time δt is 1 − λδt. Similarly, P1 (δt) can be calculated.
= λδt + 0(δt)(11.28)
Neglecting 0(δt)
p1(δt) = λδt
(11.29)
Neglecting 0(δt)
p1(δt) = 0
Similarly p3(δt) = P4(δt) = … = 0(11.30)
Generally, pnδt = negligibly small quantity for all n >1.
Let τ be the time between two consecutive arrivals. It is called the inter-arrival time. Let a(τ) denote the probability density function of τ.
The distribution function g(x) and the probability density function are related by If p0(τ) denotes the probability distribution function for no arrival in time τ and a(τ) denotes the corresponding probability density function of t then they are related by We now prove an important theorem.
Theorem Let n, the number of arrivals in time t, follow the Poisson distribution:
(11.31)
Then the inter-arrival time obeys the negative exponential law
a(τ) = λe −λt(11.32)
and vice versa.
Proof Let t0 be the instant at which arrival occurs initially. Suppose there is no arrival in the intervals (t0, t0 + τ) and (t0 + τ, t0 + τ + δt) so that t0 + τ + δt will be instant of subsequent arrival (Figure 11.7).
Figure 11.7
Putting t = τ + δτ and n = 0 in Eq. (11.31)
= e−λτ[1 − λδt + 0(δτ)], on expanding e−λτ (11.33)
We know that p0(τ) = e−λτ. Therefore, we have from Eq. (11.33)
p0(τ + δτ) − p0(τ) = p0(τ )[-λδτ + 0(δτ)]
Dividing by δτ and taking limits as δτ → 0, we get
(11.34)
The LHS of Eq. (11.34) denotes the probability density function of τ. If we denote it by a(τ), we can write Eq. (11.34) as
a(τ) = λp0(τ)(11.35)
We know that p0(τ ) = e−λt. Putting this value of p0(τ) in Eq. (11.35), we have
a(τ) = λe−λτ(11.36)
Eq. (11.36) gives the exponential law of probability for the inter-arrival time τ with mean 1/λ and variance 1/λ2, i.e.
(11.37)
where λ is the mean arrival rate.
In a similar way, we can prove the converse of the theorem.
Theorem The Markovian property of inter-arrival times states that at any instant of the time until the next arrival occurs is independent of the time that has elapsed since the occurrence of the last arrival (Figure 11.8), i.e.
Figure 11.8 Markovian property of inter-arrivaltimes.
P(τ ≥ t1 | τ ≥ t0) = P(0 ≥ t ≤ (t1 − t0))(11.38)
Proof We have
(11.39)
Conditional Probability Since the inter-arrival times are exponentially distributed
(11.40)
Since P(0 ≤ τ ≤ t1 − t0)
P(τ ≥ t1 | τ ≥ t0) = P(0 ≥ t ≤ (t1 − t0))(11.41)
This proves the Markovian property of inter-arrival times.
Let there be N customers in the system at time t = 0. Assume that no arrivals (births) can occur in the system; departures occur at the rate of μ per unit time, i.e. the output rate is μ . We derive the distribution of departures from the system on the basis of the following three axioms (Figure 11.9):
Figure 11.9
= μδt
∵ 0((δt)2) is negligible.
First we obtain the differential difference equation in three mutually exclusive ways:
Case 1: 0 < n < N Proceeding exactly as in the pure birth process, we obtain
Pn(t + δt) = Pn(t)(1 + δt) + Pn+1(t) μδ t(11.42)
Case 2: x = N Since there are exactly N units in the system Pn+1(t) = 0 for n = N
PN(t + δt) = PN(t)(1 − μδt)(11.43)
Case 3: n = 0 Since there is no unit in the system at time t, the question of departure during the interval δt does not arise. So probability of no departure is unity in this case (Figure 11.10).
Figure 11.10
P0(t + δt) = P0(t) + P1(t) μδt(11.44)
Now, rearranging the forms, dividing by δt and taking limit as δt → 0, we obtain from Eqs. (11.42–11.44)
P′N(t) = − μPN(t) for n = N(11.45)
P′N(t) = − μPn(t) − μPn+1(t) for 0 < n < N(11.46)
P′N(t) = μPn(t) for n = 0(11.47)
To solve Eq. (11.45) This is a first-order and first-degree differential equation. Separating the variables and integrating, we get
When t = 0, PN and so A = 0, we have
PN(t) = e−μt(11.48)
To solve Eq. (11.46). Putting n = N − 1 in Eq. (11.46)
(11.48)
Multiplying this by eμt, we can write
When t = 0, PN−1 = 0 which implies that B = 0
Putting x = N − 2 in Eq. (11.46) and proceeding as above, we obtain
By induction, we obtain
(11.49)
To find P0(t)
(11.50)
Combining the results at Eqs. (11.49) and (11.50), we get
(11.51)
Thus, the number of departures in time t follows the truncated Poisson distribution.
Let τ be the random variable denoting the service time and t be the possible value of τ.
Suppose s(t) and s(τ) are the cumulative density function and probability density function of τ respectively.
To find s(t) for the Poisson departure cases, it has been observed that the probability of no service during time 0 to t is equivalent to the probability of having no departure during this period. Thus,
P(service time τ ≥ t) = P(no departure during t) = PN(t)
where these are N units in the system and no arrival takes place after N.
PN(t) = e−μt(11.52)
Now
s(t) = P(τ ≤ t) = 1 − P(τ ≥ t) or s(t) = 1 − e−μt
Differentiating both sides w.r.t. ‘t’, we get
(11.53)
The service time distribution is ‘exponential’ with mean = 1/μ and variance = 1/μ2, Mean service time = 1/μ. (11.54)
A queueing model may be completely specified in the following symbolic form (a/b/c):(d/e),
where
a = probability law for the arrival (or inter-arrival) time
b = probability law according to which customers are being served
c = number of service stations (or channels)
d = capacity of the system
e = queue discipline
We consider the following probabilistic queueing models:
Model 1 (Erlang Model): Birth and Death Model This model is symbolically represented as (M|M|1):(∞|FCFS).
Here the first M denotes Poisson arrival (exponential inter-arrival), the second M Poisson departure (exponential service time) and 1 denotes single server and (∞|FCFS) stands for first come, first served service discipline.
Model 2 (General Erlang Model) This model is also represented by the symbol (M|M|1):(∞|FCFS) as model 1. But this is a general model in which the rate of arrival and service depend on the length n of the time.
Model 3 This model is also represented by the symbol (M|M|1):(N |FCFS). In this model, capacity of the system is limited. n takes values from 0 to a finite number n, say. Clearly the number of arrivals will not exceed the number N in any case.
We first derive equations of model 1, from which steady-state equations are obtained using the following conditions:
(11.55)
which is independent of t.
The probability that there will be n units (n > 0) in the system at time t + δt may be expressed as the sum of the following three independent compound probabilities: by application of the fundamental properties of probability, Poisson arrivals and exponential service times.
Figure 11.11
The product of these three probabilities is given by
Pn−1 (t)(1 − λδt)(1 − μδt) = Pn(t) [1 − (λ + μ)δt] + 0(δt)(11.56)
Figure 11.12
The product of these probabilities is given by
Pn−1(t)(λδt)(1 − μδt) = λP n−1(t)δt + 0(δt)(11.57)
Figure 11.13
Probability that
The product of these probabilities is given by
Pn+1(t) = (1 − λδt)(μδt) = Pn+1(t)μδt + 0(δt)(11.58)
By adding the above three independent compound probabilities Eqs. (11.56–11.58), we obtain the probability of n units in the system at time t + δt:
Pn(t + δt) = Pn(t)[1 − (λ + μ) δt] + Pn−1(t)λδt + Pn+1(t)μδt + 0(δt)
Transposing, dividing both sides by δt and taking limits as δt → 0
(11.59)
(11.60)
In the same way, the probability that there will be no unit, n = 0, in the system at time t + δt will be the sum of the following two independent probabilities.
Probabilities that
= P1(t) + (1 − λδt)(μδt)) = P1(t)μδt + 0(δt)(11.61)
Adding these two probabilities, we have
P0(t + δt) = P0(t)(1 − λδt) + P1(t)μδt + 0(δt)(11.62)
Now
(11.63)
When we consider steady-state imposing the conditions
(11.64)
where Pn is independent of time.
Consequently, the steady-state difference equations obtained are
− (λ + μ)Pn + λPn−1 + μPn+1 = 0 for n > 0(11.65)
λP0 + μP1 = 0 for n = 0(11.66)
We have to solve the system of difference equations
−λP0 + μP1 = 0 for n = 0(11.67)
− (λ + μ)Pn + λPn−1 + μPn+1 = 0 for n > 0(11.68)
These equations can be written as
(11.69)
(11.70)
We will prove by induction that
(11.71)
For n = 0, it is obvious. For n = 1, it is true by Eq. (11.69). Assume that Eq. (11.71) holds for n = 0, 1, 2, …, (m − 1) and m.
So that we have among other equations
(11.72)
(11.73)
Replacing n by m in Eq. (11.71), we have
This proves by induction that Eq. (11.71) holds for n = 0, 1, 2, …
Now, using the fact that Pn = 1, we obtain
(11.74)
since arrival rate (λ) < service rate (μ) and the infinite geometric progression.
Substituting the value of P0 at Eq. (11.74) into Eq. (11.71), we get
(11.75)
where
Equations (11.74) and (11.75) give the required probability distribution of queue length.
(11.76)
where is the sum of infinite GP with CR
(11.77)
(11.78)
Ws = Expected waiting time in the system
= Expected waiting time in queue + expected service time
expected service time or mean service time
(11.79)
where
= Ls/(1 − P0) (∵ probability of an arrival not to wait is P0)
(11.80)
(11.81)
Let s = 1 + 22ρ + 32ρ 2 + …
Integrating both sides w.r.t. ρ from 0 to ρ
Now differentiating w.r.t ρ
The arrivals are Poisson and service times are exponential. So, the probability of r arrivals during the service time of any specified customer is given by
(11.82)
It can be established under general conditions of arrival, departure and service discipline that
Ls = λWs(11.83)
Lq = λWq(11.84)
hold. By definition,
(11.85)
Multiplying both sides of this equation by λ and using the above general relations, we get
Example 11.1
In a railway marshalling yard, goods trains arrive at the rate of 30 trains/day. Assuming that the inter-arrival time follows an exponential distribution and the service time (the time taken to hump a train) distribution is also exponential with an average 30 min.
Calculate
If the input of trains increases to an average 33 trains/day, what will be change in (a) and (b)? Establish the formula you use in your calculations.
Solution Here
When the input increases to 33 trains/day,
λ = 1/43, μ = 1/36
∴ ρ = λ/μ = 36/43 = 0.84
Then,
Example 11.2
In Example 11.1, calculate
Solution
= 2.25 or 2 trains
Example 11.3
A TV repairman finds that the time spent on his jobs has an exponential distribution with mean 30 min. If he repairs sets in the order in which they come in and if the arrival of sets is nearly Poisson with an average rate of 10 per an 8-h/day, what is the repairman’s expected idle time each day? How many jobs are ahead of the average set just brought in?
Solution
∴Expected numbers of jobs are
The fraction of hours for which the repairman is busy (i.e. traffic intensity) is λ/μ.
The number of hours for which the repairman remains busy in an 8h/day
The time for which the repairman remains idle in an 8-h/day = 8 − 5 = 3 h.
Example 11.4
At what average rate must a clerk at a super market work in order to ensure a probability of 0.90 that the customer will not have to wait longer than 12 min. It is assumed that there is only one customer to which customers arrive in a Poisson fashion at an average rate of 15 per hour. The length of service by the clerk has an exponential distribution.
Solution Here
P(waiting time ≥ 12) = 1 − 0.90 = 0.10
Example 11.5
Arrivals at a telephone booth are considered to be Poisson with an average time of 10 min between one arrival and the next. The length of a phone call assumed to be distributed exponentially with mean 3 min.
Solution
Since Wq = 3, and λ = λ′ (for second booth), we have ⇒ λ′ = 0.16
∴ Increase in the arrival rate = 0.16 − 0.10 = 0.06 arrivals/min.
Example 11.6
In Example 11.5, a telephone booth with Poisson arrivals spaced 10 min apart on the average and exponential call lengths averaging 3 min.
Solution Here λ = 0.1 arrival/min and μ = 0.33 service/min
To Obtain the System of Steady-state Equations Let λ = λn be the arrival rate and μ = μn be the service rate depending upon n.
Then proceeding as in the case of model 1, we get
(11.86)
(11.87)
Dividing by δt, transposing and taking the limit as δt → 0, we obtain
(11.88)
(11.89)
Taking in the steady state, we obtain
(11.90)
(11.91)
From Eq. (11.91), we get
(11.92)
From Eq. (11.90), we get
(11.93)
(11.94)
Generally, we obtain
(11.95)
Since
(11.96)
The series is meaningful only if it is convergent.
Case 1: (λn = λ, μn = μ) In this case,
(11.97)
which is exactly the result we have obtained for model 1.
Case 2: In this case, the arrival rate λn depends on n inversely and the rate of service μn is independent of n. It is called the case of queue with discouragement.
Now
(11.98)
In this case, Pn follows the Poisson distribution where = ρ is constant: ρ > 1 but finite.
Case 3: (λn = λ, μn = μ) This is a case of infinite stations. In this case,
(11.99)
which follows the Poisson distribution law.
Example 11.7
Problems arrive at a computing centre in a Poisson fashion at an average rate of 5 per day. The rules of the computing centre are that any man waiting to get his problem solved must aid the man whose problem is being solved. If the time to solve a problem with one man has an exponential distribution with mean time of day, and if the average solving time is inversely proportional to the number of people working on the problem, approximate the expected time in the centre for a person entering the line.
Solution Here λ = 5 problems/day and μ = 3 problems/day (mean service rate with one unsolved problem).
The expected number of persons working at any specified instant is
where (Case 2)
Substituting the value of λ and μ, we get
The average solving time which is inversely proportional to the number of people working on the problem is day/problem.
∴ Expected time for a person entering the line is
Consider the case where the capacity of the system is limited, say N.
The physical interpretation for this model is that
To Obtain Steady State Difference Equations The simplest way of deriving the equation is to treat the present model as a special case of Model 2 where
μn = μ for n = 1, 2, 3, …
Now, following the derivation of equation in Model 1, we get
(11.100)
(11.101)
(11.102)
Dividing the equations by δt and taking the limit as δt → 0, we get
(11.103)
(11.104)
(11.105)
In the case of steady state, as t → ∞ and Pn(t) → Pn (independent of t) and hence P′n(t) → 0, we obtain
(11.106)
(11.107)
(11.108)
(11.109)
(11.110)
Generally,
(11.111)
n = N, PN+1 = 0(11.112)
We have
(11.113)
Substituting the values of P0 into
for x = 0, 1, 2, …, n(11.114)
Measures of Model 3
(11.115)
(11.116)
(11.117)
(11.118)
Example 11.8
If for a period of 2 h in a day (8–10 am) trains arrive at the yard every 20 min, but the service time continues to remain 36 min, then calculate for this period
on the assumption that the time capacity of the yard is limited to 4 trains only.
Solution
= (0.04)(ρ + 2ρ2 + 3ρ3 + 4ρ4)
= 0.04 × 72.0 = 2.9 ≅ 3 trains
Ans: (a) 0.03, (b) 0.10, (c) 0.3 and (d) 0.43 customer
[Hint: (a) λ = 0.1 and μ = 0.33
P(waiting time ≥
(b) P(waiting time ≥
(c) Traffic intensity
(d)
= 0.43 customer]
Ans: (a) 0.6, (b) 1/4 h, (c) λ = 6.25 and μ = 60, (d) 0.27 and (e) (0.6)6
[Hint: (a) Probability of waiting = 1 − p0
(b)
(c)
(d)
(e) Probability of six or more operators waiting for service = ρ6 = (0.6)6]
Ans: (a) 0.6, (b) 7.5 min and (c) 10.8 h
[Hint: Here
(a) Probability that a truck has to wait
(b)
(c) Expected time of contractor’s truck per day
= (Number of trucks/day) × (Contractor’s percentage) × (Expected waiting time of a truck)
Ans: (a) Ls = 2 and Lq = 1.33, and (b) 15 min
[Hint: Here λ = 8 and μ = 12
(a)
(b)
Ans: first come, first served
Ans: first in, last out
Ans: first in first out
Ans: last in first out
Ans: service in random order
Ans: balking
Ans: reneging
Ans: priority
Ans: jockeying
Ans: birth
Ans: death
Ans:
Ans: parameter
Ans: 1
Ans:
Ans:
Ans:
Ans:
Ans:
Ans: