Ees 402

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

QUEUING THEORY

At one time or another you have waited in a line for service of some kind e.g. waiting in a bank

to be served, waiting in a health unit for or even in a supermarket for the next available cashier

etc.

Such a waiting line is referred to as a queue. Queues involve more than just people e.g. when a

car breaks down and requires some service, it will wait in a queue for the mechanic to reach it.

Therefore, a queue forms when some units require service but the service is not instantly

forthcoming. The field of knowledge developed from the study of queues is referred to as

queuing theory.

A queuing system refers to all components that make up the queuing arrangements. They

include,

 Units demanding service. One looking for the service

 Actual waiting line.

 Service facilities.

 Units leaving after the service.

Many parameters of queuing model are not known with certainty i.e. they are stochastic rather

than deterministic. Such parameters as arrival rates and service rates are described by probability

distributions. Therefore, averages or expected values are employed in the queuing model.

In order to check whether or not a given queuing situation fits a known model we need a method

of classifying waiting lines. Such a classification must answer the following questions.

1. Does the queuing system have only one stage of service or multiple service stages?

Page 1 of 14
2. Is it a single service facility system or multiple service facilities system?

3. Do the units that require service arrive in any pattern or is it random?

4. Does the time required for service occur in any pattern or is it random?

To answer question one and two, we must first decide whether a unit must pass through one

service point or a series of service points. A one service stage system will have only one input to

the service point and one output from the service point.

However, if the output from the first service point becomes the input to the second service point

and so on, then we have a multiple stage queuing system. This system is complex/ difficult to

analyze hence we consider only the single stage system.

If we restrict ourselves to the single stage system we now consider the number and arrangement

of waiting lines in a single stage where we have three options.

1. Single facility/single line.

ooo input output ooo


Service

2. Multiple service facilities with multiple waiting lines

ooo Service 1 ooo

oooo Service 2 ooo

ooo Service 3 ooo

ooo Service 4 ooo

Page 2 of 14
3. Multiple service facilities with a single waiting line.

Output
Service 1 000

XXX Input Service 2 000

Service 3 000

The arrival of units for service and the service rates are generally not known with

certainty, i.e. the arrivals and the service rates must be described by probability

distributions and the distributions chosen must describe the manner in which arrivals and

the service times occur.

There are three fairly common distributions used in queuing theory which include:

1. Markovian distribution. Its random M

Determined D S 2+ service lines.


2. Deterministic distribution.

3. General distribution.

 A Markovian distribution is used to describe random occurrences. These are occurrences

that can be said to have no memory of the past events i.e. they are memory less or

random walk.

 A deterministic distribution is one which the events occur in a constant unchanging

manner.

 A general distribution will be any other distribution. It is quite possible for the arrival

pattern to be described by one probability distribution and the service pattern by another.

Page 3 of 14
To allow easy communication about the various queuing system, Kendall, a British

mathematician, set up a short hand notation to describe parameters of a queuing system. In the

Kendall notation a queuing system is designated as A/B/C where

A – is replaced by a letter that denotes the arrival distribution.

B – is replaced by a letter that describes the service distribution

C – is replaced by a positive integer that denotes the number of service facilities/channels.

e.g. a queuing system described as M/D/3 will be interpreted as,

M – Markovian (arrivals are random.)

D – Service is determined.

3 – Three service facilities

Other queuing considerations

Other attributes to be considered in a queuing system include the:

1. Size of the population from which those that will enter the queuing system are selected. It

is referred to as the calling population, which could be finite or infinite.

2. The manner in which the units arrive to enter the queuing system i.e. is it singly or in

groups.

3. The queue discipline – this is the order in which the units are served i.e. are units served

in the order in which they arrive?

Page 4 of 14
The queuing behavior/discipline of the units plays a major role in queuing analysis. As

such units may move from one queue to another in the hope of reducing their waiting

time, such units are said to be jockey. Others may withdraw from joining a queue

altogether because they anticipate a long delay, such behavior is referred to as balking.

Others may leave the queue because they have been waiting for too long; such behavior

is referred as Reneging.

4. Consider whether or not there is enough room from all arrivals to join the waiting line.

However, we first restrict ourselves to the simplest case where we assume:

 An infinite calling population

 Arrivals come singly/individually

 Arrivals are serviced in a FIFS manner

 A single waiting line

 Arrivals neither balk nor renege at the length of the waiting line

 There is always enough room for the waiting line to form

Page 5 of 14
TYPES OF QUEUING CHARACTERISTICS.

1. M/M/1

Random occurrences/arrivals have been found to be described by a well-known discrete

probability distribution referred to as the Poisson distribution. This special type of random

arrivals assumes two characteristics about the input stream.

a) Arrivals are completely independent of each other or the state of the system.

b) The probability of a given arrival during a specific time period does not depend on

when the time period occurs but rather only in the length of the interval. Such

occurrences are said to be memory less.

As with random arrivals, the occurrence of random service times that are memoryless is a fairly

common event in the waiting line situations. The random service times are described by the

negative exponential distribution.

Assumptions about M/M/1 queues

In order to use the M/M/1 queues we must assume;

1) Poisson arrivals and negative exponential service distributions.

2) A single service facility.

3) Infinite calling population.

4) Infinite waiting room.

5) First in first served service discipline.

6) No balking and reneging.

Page 6 of 14
Let λ represents the average arrival rates.

Let µ represent the average service rates.

It is assumed that 𝜆 < µ otherwise the average arrivals will outnumber the average number

being served and the units waiting will become infinitely large.

𝜆
If we let 𝜌 = 𝜇; ρ (utilization factor) is the average fraction of time that the system is busy. Busy

here is defined as one or more units waiting to be served or being served.

ρ can be interpreted as the average number of units being served at any point in time.

Let 𝑃𝑤 be the probability that the system is busy.

𝜆
𝑃𝑤 = 𝜌 =
𝜇

This means that the probability that the system is idle is;

𝑃𝑜 = 1 – 𝑃𝑤

𝜆
= 1−
𝜇

Therefore the probability of 𝒏 units is the system𝑷𝒏 is given by 𝑷𝒐 multiplied by𝜌𝑛 .

Therefore;

𝑃𝑛 = 𝑃𝑜 𝑋 𝜌𝑛

𝜆 𝑛
= 𝑃𝑜 𝑋 ( ) 𝑤ℎ𝑒𝑟𝑒 𝑛 > 0.
𝜇

Page 7 of 14
We can therefore compute the average number of units in the system either waiting or being

served.

Let L represent the average number of units in the system

𝐿 = ∑ 𝑛𝑃𝑛
𝑛=0

𝛼
𝜆 𝑛
𝐿 = ∑ 𝑛𝑃𝑜 𝑋 { }
𝜇
𝑛=0

𝜆
𝐿=[ ]
𝜇−𝜆

We can use 𝑳 to compute other desired characteristics e.g.

The average number of units that are waiting to be served 𝑳𝒒

Recall that ρ represents the average number of units being served at any one time and therefore

𝐿 = 𝐿𝑞 + 𝜌

𝐿𝑞 = 𝐿 – 𝜌

𝜆 𝜆
= −
𝜇−𝜆 𝜇

𝜇𝜆 − 𝜇𝜆 + 𝜆2
=
𝜇(𝜇 − 𝜆)

Page 8 of 14
𝝀𝟐
=
𝝁(𝝁 − 𝝀)

The waiting time

Let 𝑊 represent the average time that a unit takes in the system.

𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑢𝑛𝑖𝑡𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑠𝑦𝑠𝑡𝑒𝑚


𝑊=
𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑢𝑛𝑖𝑡𝑠 𝑡ℎ𝑎𝑡 𝑎𝑟𝑟𝑖𝑣𝑒𝑑 𝑡𝑜 𝑏𝑒 𝑠𝑒𝑟𝑣𝑒𝑑 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 𝑝𝑒𝑟𝑖𝑜𝑑.

𝐿
𝑊 =
𝜆

𝜆
=
𝜇−𝜆

𝜆 1
= ×
𝜇−𝜆 𝜆

1
=
𝜇−𝜆

Similarly the expected/average time a unit has to wait for service is given by;

𝐿𝑞
𝑊𝑞 =
𝜆

𝜆2 1
𝑊𝑞 = 𝑋
𝜇(𝜇 − 𝜆) 𝜆

𝜆
=
𝜇(𝜇 − 𝜆)

OR

Page 9 of 14
𝑊 = 𝑊𝑞 + 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒

1
𝑊 = 𝑊𝑞 +
𝜇

1
𝑊𝑞 = 𝑊 −
𝜇

1 1
= –
𝜇−𝜆 𝜇

𝜇−𝜇+𝜆
=
𝜇(𝜇 − 𝜆)

𝜆
=
𝜇(𝜇 − 𝜆)

Example:

Assume that λ = 20/ hr , u = 30/ hr

Pw = λ/ u = 2/3

How many units are expected in the system at any particular time?

𝜆
𝐿 =
𝜇−𝜆

20
30 − 20

20
=
10

= 2 𝑢𝑛𝑖𝑡𝑠

Page 10 of 14
How many units are waiting to be served?

Solution:

20
𝑁𝑢𝑚𝑏𝑒𝑟 𝑏𝑒𝑖𝑛𝑔 𝑠𝑒𝑟𝑣𝑒𝑑 =
30

2
=
3

𝑢𝑛𝑖𝑡𝑠 𝑒𝑥𝑝𝑒𝑐𝑡𝑒𝑑 𝑖𝑛 𝑡ℎ𝑒 𝑠𝑦𝑠𝑡𝑒𝑚 𝑎𝑡 𝑎 𝑔𝑖𝑣𝑒𝑛 𝑝𝑒𝑟𝑖𝑜𝑑 𝑎𝑟𝑒 2.

2
𝑇ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒; 2 −
3

𝟏
= 𝟏
𝟑

𝜆
𝑏𝑢𝑡; 𝐿 =
𝜇−𝜆

𝑎𝑙𝑡𝑒𝑟𝑛𝑎𝑡𝑖𝑣𝑒𝑙𝑦;

𝜆2
𝐿𝑞 =
𝜇(𝜇 − 𝜆)

400
=
30(30 − 20)

1
1
3

What will be the waiting time?

𝐿
𝑊=
𝜆

Page 11 of 14
2
=
20

1
= ℎ𝑟𝑠
10

1
𝑜𝑟 × 60 = 6 𝑚𝑖𝑛𝑠
10

1 1
𝑆𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒 = ℎ𝑟𝑠 𝑜𝑟 2𝑚𝑖𝑛𝑠
𝜇 30

𝑊𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑡𝑜 𝑏𝑒 𝑠𝑒𝑟𝑣𝑒𝑑 (𝑊𝑞 ) = 6 − 2 = 4 𝑚𝑖𝑛𝑠

2. M/M/S

The model that assumes random arrivals and random service times with multiple service

facilities has the same assumptions as the single service facility M/M/1 expect that now there is a

single input line feeding multiple service facilities with equal service rates.

The calculations of the M/M/S characteristics are a bit more complicated than in the previous

model; however we are primarily interested in the implications of these characteristics rather

than the formulas necessary and calculate them. In the M/M/S model if μ is the average service

rate for each of the 𝑺 service facilities then we require that 𝝁𝑺 > 𝜆 to avoid an infinite build up

of waiting lines.

In this model the key characteristics that will be used to make all other calculations is the

probability that the system is busy. A busy system is one that has 𝑺 or more units in the

system.

In that case all service facilities will be in use and so the system is said to be busy.

Page 12 of 14
𝑃{𝐵𝑢𝑠𝑦 𝑠𝑦𝑠𝑡𝑒𝑚} = 𝑃{𝑛 ≥ 𝑆}

Given by;

𝜌 𝑠 (𝜇𝑆)
𝑃{𝐵𝑢𝑠𝑦 𝑠𝑦𝑠𝑡𝑒𝑚} = 𝑋𝑃
𝑆! (𝜇𝑆 − 𝜆) 0

𝑠−1
1 𝜆 𝑛 1 𝜆 𝑠 𝜇𝑆
𝑊ℎ𝑒𝑟𝑒 𝑃0 = 1 ÷ {∑ ( ) + ( ) ( )}
𝑛! 𝜇 𝑆! 𝜇 𝜇𝑆 − 𝜆
𝑛=0

Finding the probability of a busy system will be easy given 𝑃𝑜 .

Rather than having the above calculation for 𝑷𝒐 , a table has been developed that provides the 𝑷𝒐

values of 𝜌 and 𝑺.

We may now use the system characteristic (𝑃 = 𝑏𝑢𝑠𝑦 𝑠𝑦𝑠𝑡𝑒𝑚) to calculate all other system

characteristics.

Where the number of units in the system 𝑳 is given by

𝜌
𝐿 = 𝑃 (𝑏𝑢𝑠𝑦 𝑠𝑦𝑠𝑡𝑒𝑚) + 𝜌
𝑆−𝜌

Therefore,

𝜌
𝐿𝑞 = 𝑃 ( 𝑏𝑢𝑠𝑦 𝑠𝑦𝑠𝑡𝑒𝑚)
𝑆−𝜌

Page 13 of 14
The waiting times are similarly computed as:

𝐿
𝑊=
𝜆

𝐿𝑞
𝑊𝑞 =
𝜆

Example

Assume that there are 𝑆 service facilities with an average service rate 𝜇 = 6/ℎ𝑟 and

𝜆 (𝑖𝑛𝑝𝑢𝑡 𝑟𝑎𝑡𝑒) 24/ℎ𝑟. while 𝑆 = 5

𝜇𝑆 = 30 𝑏𝑒𝑖𝑛𝑔 𝑠𝑒𝑟𝑣𝑒𝑑 𝑝𝑒𝑟 ℎ𝑜𝑢𝑟

𝜆
𝜌 =
𝜇

24
= = 4
6

𝐹𝑟𝑜𝑚 𝑡ℎ𝑒 𝑡𝑎𝑏𝑙𝑒 𝑡ℎ𝑒 𝑃 ( 𝑏𝑢𝑠𝑦 𝑠𝑦𝑠𝑡𝑒𝑚)

𝜌𝑆 𝑋 𝜇 𝑆
= 𝑃
𝑆! (𝜇𝑆 − 𝜆) 𝑜

𝑃𝑜 = 0.013

45 𝑋 30
𝑃(𝑏𝑢𝑠𝑦 𝑠𝑦𝑠𝑡𝑒𝑚) =
5! (30 − 24)

45 𝑋30
= 𝑋 0.013
5! 6

Page 14 of 14

You might also like