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

QUEUING THEORY

By
Ms. Erandika Gamage
University of Kelaniya
o What is a Queue?
o Queue is a linear arrangement of items waiting to be served
o Queuing Theory is the Mathematical Study of Waiting Lines/Queues

Ex: • Waiting in line at a bank for a teller


• Waiting for a customer service representative to answer a call
• Waiting for a train/bus to come
• Waiting for a computer to perform a task or respond
• Waiting for an automated car wash to clean a line of cars

By Ms. Erandika Gamage


• People - Bus queue, Cinema queue
• Items - Vehicle queue, Queue of applications
• Events - Queue of telephone calls, Queue of births

o Queues/Waiting Lines are formed when people or items come faster than
they can be served (due to limited resources for providing a service and
resources and demand mismatched)

By Ms. Erandika Gamage


By Ms. Erandika Gamage
o At its core, a queuing situation involves two parts.
o Someone or something that receive the service—People, Items, Events
o Someone or something that provides the service—Server

Ex: • At a bank - the customers are people seeking to deposit or withdraw money,
and the servers are the bank tellers.
• When looking at the queuing situation of a printer, the customers are the
requests that have been sent to the printer, and the server is the printer.

By Ms. Erandika Gamage


o Those that receive service would like to know
§ How long the queue will be ?
§ How long will I have to wait in the queue ?

o Those who provides service would like to know

§ How many hours the server idle ?


§ Should we have two servers ?

By Ms. Erandika Gamage


§ To find the best level of service that a firm should provide

Ex: • Supermarket
Should decide how many cash register checkout position should be opened
• Petrol station
How many pumps should be opened and how many attendants should be on
duty
• Bank
Should decide how many teller windows to keep open to serve customers
during various hours of the day

By Ms. Erandika Gamage


Units in Queuing System

Server
Unit currently
Population Arrival Units in Queue/Waiting Line Departure
being served

By Ms. Erandika Gamage


System Customers Servers
Reception Desk People Receptionist

Hospital Patients Nurses


Airport Airplanes Runway
Road network Cars Traffic light
Grocery Shoppers Checkout
Station Computer Jobs CPU, disk, CD

By Ms. Erandika Gamage


o Telecommunications

o Traffic Control
o Determining the sequence of computer operations

o Predicting computer performance


o Healthcare (hospital bed assignments)
o Airport traffic, airline ticket sales

o Layout of manufacturing system

By Ms. Erandika Gamage


1) Pattern of arrivals
2) Pattern of service provision
3) Number of servers
4) Queue discipline
5) Size of waiting room
6) Size of population

By Ms. Erandika Gamage


Units in Queuing System
Server

Unit currently
Population Arrival Units in Queue/Waiting Line Departure
being served

o Arrival Characteristics o Waiting Line Characteristics o Service Characteristics


• Pattern of arrival • Size of waiting room • Pattern of service provision
• Size of population • Queue discipline • Number of servers

By Ms. Erandika Gamage


There are different pattern of arrivals
I. Poisson Distribution
II. Uniform Distribution
III. Earlang Distribution

By Ms. Erandika Gamage


I. Poisson Distribution
Arrivals are considered random when they are independent of one another and
their occurrence can’t be predicted exactly
Probability of “x” occurrences/arrivals within a given unit of time or space “t” is
given by

e!"# λt $

x!
𝜆 – Average rate of arrivals

Ex: 20 customers per hour


10 lorries per day
5 items per minute
By Ms. Erandika Gamage
Ex:
The average number of telephone calls received per hour is 2.What is the
probability of receiving 3 telephone calls within the next hour?
𝜆 = 2 per hour x = 3 t = 1 hour
!!"# "# $
=
$!

!!% & &


= '!

By Ms. Erandika Gamage


There are different pattern of service provision
I. Poisson Distribution
II. Uniform Distribution
III. Earlang Distribution

By Ms. Erandika Gamage


I. Poisson Distribution
In many cases it can be assumed that random service times are described by the
negative exponential distribution ( µe!%# )
Probability of “x” service completions within a given unit of time or space “t” is
given by

e!%# µt $

x!
µ – Average rate of service provision

Ex: 12 customers served per hour


10 vehicles serviced per day
5 items assembled per minute
By Ms. Erandika Gamage
o In a queuing system, the pattern of service completion can be expressed in 2 ways
I. Service rate (average rate of service provision)
Ex: 2 vehicles serviced per hour
II. Service time ( time taken to serve one unit)
Ex: average time taken to service a vehicle is 30 min.

The unit of measurement for pattern of arrival and pattern of service completion
should be equal.
Ex: A TV repairman finds that the average time spent on his jobs is 30 min per TV set and
is negative exponential. TV sets arrive in a Poisson fashion at the rate of 10 per eight hour
day.
Average rate of arrival = 10 per eight hour day
Average rate of service completion = 30 min per TV set
= ½ hours per TV set * 2 *8
= 16 per eight hour day
By Ms. Erandika Gamage
o Single Server Queue o Multi Server Queue

• Single Server Sigle Queue • Multi Server Single Queue


Server 1

Server Server 2

Server 3

• Single Server Multiple Queues • Multi Server Multiple Queues

Server 1

Server Server 2

Server 3
By Ms. Erandika Gamage
o Single Server Queue o Multi Server Queue

• Single Server Sigle Queue • Multi Server Single Queue


Ex: • Students arriving at a library counter Ex: • Booking at a service station
• Family doctor’s office

§ Single Server Multiple Queues § Multi Server Multiple Queues


Ex: Ex: • Different cash counters in an electricity
office
• Different boarding pass encounters at an
airport

By Ms. Erandika Gamage


o Single Server Queue o Multi Server Queue

§ Single Server Sigle Queue § Multi Server Single Queue


Server 1

Server Server 2

Server 3

By Ms. Erandika Gamage


o This is the rule in which units in the queue are being selected for service
I. First Come First Served (FCFS) / First in First Out (FIFO)
Ex: Payment counter at shops

II. Last Come First Served (LCFS)/ Last in First Out (LIFO)
Ex: Elevator

III. Service in Random Order (SIRO)


Ex: Drawing tickets out of a pool of tickets for service

IV. Priority Service


Ex: Hospital Emergency Room (patients who are critically injured will move ahead in
treatment)

By Ms. Erandika Gamage


o This is the rule in which units in the queue are being selected for service
I. First Come First Served (FCFS) / First in First Out (FIFO)
Ex: Payment counter at shops

II. Last Come First Served (LCFS)/ Last in First Out (LIFO)
Ex: Elevator

III. Service in Random Order (SIRO)


Ex: Drawing tickets out of a pool of a pool of tickets for service

IV. Priority Service


Ex: Hospital Emergency Room (patients who are critically injured will move ahead in
treatment)

By Ms. Erandika Gamage


o Maximum allowable size/number of units in the queue
I. Size of waiting room is infinity

Waiting Room Server


Ex: Tollbooth serving arriving vehicles

II. Limited size of waiting room

Waiting Room Server


Ex: A small restaurant has 10 tables and can serve no more than 50 customers
By Ms. Erandika Gamage
o This is the size of population eligible to receive the service. (Total number of
eligible units outside the queuing system)
I. Infinite Population
Ex: all people of a city or state (and others) could be the potential customers at a
milk parlor.

II. Finite Population


Ex: Customers at University Base Canteen
• In this event the rate of arrival is considered to be proportional to the size of
population

By Ms. Erandika Gamage


§ Standard system of notation used to describe and classify the queueing
model that a queueing system corresponds to.
§ The notation was first suggested by D. G. Kendall in 1953

Pattern Pattern of Number Size of


Queue Size of
of Service of Waiting
Discipline Population
Arrivals Provision Servers Room

By Ms. Erandika Gamage


§ Ex: Think of an ATM
It can serve: one customer at a time; in a first-in-first-out order; with a randomly-
distributed arrival process and service distribution time; unlimited queue capacity;
and unlimited number of possible customers.

(M / M / 1) : ( FIFO / ∞ / ∞ )

M –Markovian, Poisson process (Poisson distribution for arrival and Negative


Exponential distribution for service provision

By Ms. Erandika Gamage


1. (M / M / 1) : ( FIFO / ∞ / ∞ )
2. (M / M / 1) : ( FIFO / L / ∞ )

3. (M / M / S) : ( FIFO / ∞ / ∞ )

4. (M / M / S) : ( FIFO / L / ∞ )
5. (M / M / 1) : ( FIFO / ∞ / N )

6. (M / M / S) : ( FIFO / ∞ / N )
7. Queuing Networks

By Ms. Erandika Gamage


The system starts with empty and idle condition in the beginning (a supermarket just
open early in morning and no customers yet)
Then it gradually go in to one or more peak time where the number of customers in
the system reach the highest level and gradually reduces.
At the end of the service hour (in night before closing the supermarket) either the
arrival of the customers are cutoff or there is really no more customers.
The assumption of steady state in the queuing theory doesn’t represent the reality
But in queuing theory we assume that a queue will acquire steady state
condition(system doesn’t change anymore) after few time, which means queue has
reached equilibrium.
Queue has reached equilibrium means the probability that the system is in a given
state is not time dependent

By Ms. Erandika Gamage


By Ms. Erandika Gamage
Avg number of units in queuing system ( Ls )

Avg number of units in queue ( Lq ) Rate of service


provision (µ)
Rate of arrival ( 𝜆 )

Waiting Room Server

Average time spent by unit in queue ( Wq )

Average time spent by unit in queuing system ( Ws )

By Ms. Erandika Gamage


Probability of “n” units in queuing system
P(n) = 𝜃 P(n - 1)
P(n) = 𝜃 ) P(0)
P(n) = 𝜃 ! 1 − 𝜃

By Ms. Erandika Gamage


P(n) = θn (1 – θ) (1)
P (n) is a measure of probability and cannot be negative
P (n) = θn (1 – θ) cannot be negative
(1- θ) > 0 (since if θ >1 then θn (1 – θ) will be negative)
θ<1
λ/μ<1
λ<μ

Condition for equilibrium is that, λ < μ (*)

By Ms. Erandika Gamage


Probability that the queuing system is empty
P(n) = θn (1 – θ) (1)
If queuing system is empty then n = 0
Hence,
P(0) = θ0 (1 – θ)
P(0) = (1 – θ)
Probability that the queuing system is empty = (1 – θ) (4)

By Ms. Erandika Gamage


Probability that the server is idle
Server will idle only if the queuing system is empty.
Hence,
Probability that the server is idle = (1 – θ) (5)

Number of hours server idle per day


Suppose a working day has H hours,
Number of hours server idle per day = H (1 – θ) (6)

By Ms. Erandika Gamage


Average number of units in queuing system ( Ls )
Ls = θ / (1 – θ)

Average number of units in queue ( Lq )


Lq = θ2 / (1 – θ)

By Ms. Erandika Gamage


§ First proven by mathematician John Little in 1961

§ Long-term average number of units (L) in a queuing system is equal to the long-term
average rate of arrival (λ) multiplied by the average time that a unit spends in the
system (W)
L = λW

Note:
§ Little’s law assumes that the system is in “equilibrium”

§ Valid for any queuing model

By Ms. Erandika Gamage


Average time spent by unit in queuing system ( Ws )
According to Little’s Law,
L = λW
Hence,
Ls = λ Ws (9)

Average time spent by unit in queue ( Wq )


According to Little’s Law,
L = λW
Hence,
Lq = λ Wq (10)

By Ms. Erandika Gamage


§ Average time spent by unit in queuing system ( Ws )
Ls = λ Ws

§ Average time spent by unit in queue ( Wq )


Lq = λ Wq

Variables :
λ = Rate of arrival of units
μ = Rate of service provision
θ=λ/μ
H = Number of working hours per day
By Ms. Erandika Gamage
Ex:
A TV repairman finds that the average time spent on his jobs is 30 min per TV set and
is negative exponential. TV sets arrive in a Poisson fashion at the rate of 10 per eight
hour day.
a) What is the repairman idle time each day?
b) How many jobs are ahead of the set just taken for repairs?
c) How long on the average must a TV set be kept with the repairman?

By Ms. Erandika Gamage


Ex: Answers
a) Rate of arrival of TV sets = 10 (per eight hour day)
Average time take to repair one set = 30 min = 1 / 2 hours
Number of sets repaired per day = 8 / (1/2) = 16 (per eight hour day)
Rate of service provision = 16 (per eight hour day)
λ= 10 μ= 16 θ= λ / μ = 10/16 = 5/8
Number of working hours per day = H = 8
Repairman idle time per day = H (1-θ)
= 8 (1-5 / 8)
= 3 hrs

b) Number of sets ahead of the set just taken for repair (LQ)
LQ = θ2/ (1-θ) = (5/8)2/ (1-5/8) = 1 ½4

By Ms. Erandika Gamage


Ex: Answers
c) How long must a TV set be kept with the repairman relates to WS,
LS = λ WS
WS = LS /λ
But LS = θ / (1-θ) = (5/8) / [1- (5/8)] = 5 /3
WS = ( 5 /3 ) * ( 1 /10 ) = 1 /6 (eight hour day)
= 1/6 * 8 = 1 1/3 hrs

By Ms. Erandika Gamage


Avg number of units in queuing system ( Ls )

Avg number of units in queue ( Lq ) Rate of service


provision (µ)
Rate of arrival ( 𝜆 )

Waiting Room Server

Average time spent by unit in queue ( Wq )

Average time spent by unit in queuing system ( Ws )

By Ms. Erandika Gamage


Probability of “n” units in queuing system
If n <= L , If n > L ,
P(n) = 𝜃 P(n - 1) P(n) = 0
P(n) = 𝜃 & P(0)

Probability that queuing system is empty


P (0) = (1-θ)/ (1- θL+1)

By Ms. Erandika Gamage


Probability that the server is idle
Server will idle only if the queuing system is empty.
Hence,
Probability that the server is idle = (1-θ)/ (1- θL+1)

Number of hours server idle per day


Suppose a working day has H hours,
Number of hours server idle per day = H (1-θ)/ (1- θL+1)

By Ms. Erandika Gamage


Average number of units in queuing system ( Ls )
θ ' θL
LS = { - [LθL + ]}
(1− θL+1) '!( '!(

Average number of units in queue ( Lq )


Lq = LS - [1- P(0)]

By Ms. Erandika Gamage


Average time spent by unit in queuing system ( Ws )
Ls = λ Ws

Average time spent by unit in queue ( Wq )


Lq = λ Wq

Variables :
λ = Rate of arrival of units
μ = Rate of service provision
θ=λ/μ
L = Size of waiting room
H = Number of working hours per day
By Ms. Erandika Gamage
Ex:
At a barber shop customers arrive in a Poisson fashion at the rate of 14 per hour. There is
only one barber who takes 4mins per hair cut. There are five chairs for waiting customers.
When a customer arrives if he finds that all the waiting chairs are occupied he proceeds
to another barber shop.

a) What is the probability that the barber is idle?


b) What is the probability that there are three customers at the barber shop?
c) What is the probability that a customer that arrives turns back and proceeds to
another barber shop?
d) How many customers on the average will he lose on a eight hour working day on
account of having only five chairs.
e) If the cost of a hair cut is Rs.50 then on the average how much more would he earn
per day if he has five more chairs.

By Ms. Erandika Gamage


Ex: Answers
Rate of arrival of customers (λ) = 14 per hour
Time taken for one hair cut = 4 mins
Number of haircuts completed in one hour = 60 / 4 = 15
Rate of service provision (μ) =15 per hour
Size of waiting room (L)= (5+1) = 6
θ = λ / μ =14 /15

(a) Probability that barber is idle = (1-θ) / (1- θL+1)


= (1-14/15) / [1- (14/15)7]
= (0.06669)/ (0.38304)
=0.174

By Ms. Erandika Gamage


Ex: Answers
(b) P (n) = θn (1-θ) / (1- θL+1)
If there are three customers then n=3
P (3) = θ3 (1-θ) / (1-θ7)
= (14/15)3 * (1-(14/15) / [1-(14/15)7]
= (14/15)3 * 0.174
=0.14146

By Ms. Erandika Gamage


Ex: Answers
(c) A customer arrive will leave and proceed to another barber shop only if the barber shop
is full. That is only if there are six customers in the shop.
So probability that a customer who arrives will leave for another barber shop is P (6)
P (6) = θ6 (1- θ) / (1- θL+1)
= (14/15)6 * [1-(14/15)] / [1-(14/15)7]
= (14/15)6 * 0.174
= 0.115

(d) Rate of arrival of customers = λ = 14 per hour


Number of customers that arrive on an 8 hour working day = 8*14 = 112
Probability of losing a customer = 0.115
Therefore number of customers lost per day = 112*0.115 = 12.88
By Ms. Erandika Gamage
Ex: Answers
(e) If there are five more chairs then all together there will be 10 waiting chairs and it will be a
limited waiting room size queue with size of waiting room as 11.
A customer will leave for another barber shop if the number of customers at the shop is 11.

Prob. that a customer arriving will leave for another shop = θ11 (1- θ) / (1- θL+1)
= θ11 (1- θ) / (1- θ12)
= (14/15)11 * [1-(14/15)] / [1-(14/15)12]
= 0.4681705 * (0.0666666) / (0.5630409)
= 0.0554334
Number of customers lost per day when (L =11) = 0.0554334 * 112
= 6.21
Number of customers lost per day when (L =6) = 112*0.115
= 12.88
Number of customers saved per day = 12.88 – 6.21 = 6.67
The increasing profit = Rs.6.67*50 = Rs. 333.00
By Ms. Erandika Gamage
Avg number of units in queuing system ( Ls ) Rate of service
provision (3µ)

µ Server 1
Avg number of units in queue ( Lq )

Rate of arrival ( 𝜆 )
µ Server 2

Waiting Room
µ Server 3
Average time spent by unit in queue ( Wq )

Average time spent by unit in queuing system ( Ws )


By Ms. Erandika Gamage
Case I : n <= S
§ Rate of arrival = λ
§ Rate of service completion = n μ

Case II : n > S
§ Rate of arrival = λ
§ Rate of service completion = S μ

Condition for Equlibrium


Condition for equilibrium, λ ≤ Sμ

Variables :
n = Number of units in the queuing system
S = Number of servers
By Ms. Erandika Gamage
§ Probability of “n” units in queuing system
Case I : n <= S Case II : n > S
P (n) = (θn / n!) P (0) P (n) = (SS / S!) * (θ / S)n * P(0)
P (S) = (θS / S!) P (0)

§ Evaluate P(0)

1 / P (0) = [ ∑+!'
&)* (θ /n!) + (θ /S!) { 1 / (1-( θ /S)) } ]
n S

§ Probability that queuing system is empty

P (0) = 1/ [ ∑+!'
&)* (θn /n!) + (θ /S!) { 1 / (1-( θ /S)) } ]
S

By Ms. Erandika Gamage


§ Probability that all the servers are idle
P(0) = 1/ [ ∑+!'
&)* (θn /n!) + (θ /S!) { 1 / (1-( θ /S)) } ]
S

§ Probability that “r” servers are idle


P (S-r)

§ Number of hours that servers idle per day

.∑+,)* Hr P (S−r)

By Ms. Erandika Gamage


§ Average number of units in queuing system ( Ls )
.
θn SS θ S θ 1
Ls = P(0) ∑+!'
&)' + +
&!' ! S! S '!
θ S θ
!

S '!
S

§ Average number of units in queue ( Lq )


/0' 1
SS θ 1
Lq = P(0)
S! S '!
θ
S

By Ms. Erandika Gamage


§ Average time spent by unit in queuing system ( Ws )

Ls = λ Ws

§ Average time spent by unit in queue ( Wq )

Lq = λ Wq

Variables :
λ = Rate of arrival of units
nμ = Rate of service provision (if n <= S)
Sμ = Rate of service provision (if n > S)
n = Number of units in the queuing system
S = Number of servers
r = Number of servers idle
By Ms. Erandika Gamage
H = Number of working hours per day
Ex:
At a photocopy shop there is only one photocopy machine and customers arrive in a
Poisson fashion at the rate of 14 per hour. The average service time (which is negative
exponential) is 4 minutes. The shop works eight hours a day.

a) How long on the average will a customer have to wait at the photocopying shop?
b) By how much will this waiting time be reduced if they had two photocopying
machines?

Suppose the rate of arrival of customers has suddenly increased to 50 per hour due to the
opening of new university close by,
c) How long on the average will a customer have to wait at the photocopying shop.
d) Number of hours server idle per day.

By Ms. Erandika Gamage


Ex: Answers
(a) Rate of arrival of customers (λ) = 14 per hour
Time taken to serve one customer = 4 min
Number of customers served in one hour = 60 / 4 = 15
Rate of service completion (μ) = 15 per hour
θ = λ / μ = 14 /15
LS = θ / (1- θ) = (14 / 15) / ( 1 – (14 /15)) = 14

LS = WS λ
WS = 14 /14
Waiting time (WS) =1 hour

By Ms. Erandika Gamage


Ex: Answers
(b) Number of servers (S)=2
Evaluate P (0)
1 / P (0) = [ ∑+!'
&)* (θn/n!) + (θ /S!) { 1 / (1-( θ /S)) } ]
S

1 / P (0) = [∑&)'
&)* (14 / 15) /n!)+ (14 / 15) /2!) {1 / (1-(14 /30))}]
n 2

1 / P (0) = (14 / 15) 0 /0!) + (14 / 15) 1 /1!) + (14 / 15)2 / 2! * 30 / 16


1 / P (0) = 1 + (14 / 15) + (14 / 15)2 *(½) * (15 * 2) / 16
1 / P (0) = 1 + (14 / 15) + 142 / (15 * 16) = 2.75
1 / P (0) = 2.75
P (0) = 0.363636

By Ms. Erandika Gamage Continued...


Ex: Answers
.
θn SS θ S θ 1
(b) Ls = P(0) ∑+!'
&)' &!' ! + +
S! S '!
θ S θ
!

S '!
S

We have S = 2 , θ = 14 / 15 , (θ / S) = 14 / 30 , P (0) = 0.363636

1
(14 /15) n 22 14/15 2 14/15 1
Ls = 0.363636 ∑&)'
&)' + +
&!' ! 2! 2 '!
14/15 2 14/15
!

2 '!
2

LS = 0.363636 [(14 /15) 1 / 0! + 4 / 2 (14 / 30)2 {(60 / 16) + (14 / 30)(30 / 16)2}]
LS = = 1.1931805

By Ms. Erandika Gamage Continued...


Ex: Answers
(b) WS = LS / λ
WS = 1.1931805 / 14
WS = 0.0852271 hour
WS = 5.1136 min

Waiting time when there is 1 server (WS) =1 hour


Waiting time when there are 2 servers (WS) = 5.1136 min
Waiting time is reduced by (60-5.11) = 54.89 min

By Ms. Erandika Gamage


Ex: Answers
(c) Rate of arrival of customers (λ) = 50 per hour
Service time per customer = 4 min
Number of service completions per hour = 60 / 4 = 15
Rate of service completion (μ) = 15
λ>μ
Condition for equilibrium for single server queue is λ ≤ μ
System has not met the equilibrium
Condition for equilibrium for multi server queue is λ ≤ Sμ
S≥λ/μ
S ≥ 50 / 15
S ≥ 3.33 (number of servers required for equilibrium)
Continued...
At least 4 photocopying machines required to provide service
By Ms. Erandika Gamage
Ex: Answers
(c) Rate of arrival of customers (λ) = 50 per hour
Service time per customer = 4 min
Number of service completions per hour = 60 / 4 = 15
Rate of service completion (μ) = 15
λ>μ
Condition for equilibrium for single server queue is λ ≤ μ
System has not met the equilibrium
Condition for equilibrium for multi server queue is λ ≤ Sμ
S≥λ/μ
S ≥ 50 / 15
S ≥ 3.33 (number of servers required for equilibrium)
Continued...
At least 4 photocopying machines required to provide service
By Ms. Erandika Gamage
Avg number of units in queuing system ( Ls ) Rate of service
provision (3µ)

µ Server 1
Avg number of units in queue ( Lq )

Rate of arrival ( 𝜆 )
µ Server 2

Waiting Room
µ Server 3
Average time spent by unit in queue ( Wq )

Average time spent by unit in queuing system ( Ws )


By Ms. Erandika Gamage
Case I : n <= S
§ Rate of arrival = λ
§ Rate of service completion = n μ

Case II : n > S
§ Rate of arrival = λ

§ Rate of service completion = S μ

Variables :
n = Number of units in the queuing system
S = Number of servers

By Ms. Erandika Gamage


§ Probability of “n” units in queuing system
Case I : n <= S Case II : S < n <= L
P (n) = (θn / n!) P (0) P (n) = (SS / S!) * (θ / S)n * P(0)
P (S) = (θS / S!) P (0)

Case III : n > L


P(n) = 0

§ Evaluate P(0)
(θ / S)S − (θ / S)L+1
1 / P (0) = ∑/!'
2)* (θ /n!)
n + (θS /S!)
1−θ/S

By Ms. Erandika Gamage


§ Probability that queuing system is empty
(θ / S)S − (θ / S)L+1
P (0) = 1/ ∑/!'
2)* (θn/n!) + (θS /S!)
1−θ/S

§ Probability that all the servers are idle


(θ / S)S − (θ / S)L+1
P (0) = 1/ ∑/!'
2)* (θn/n!) + (θS /S!)
1−θ/S

§ Probability that “r” servers are idle

P (S-r) =

§ Number of hours that servers idle per day

.∑+,)* Hr P (S−r)
By Ms. Erandika Gamage
§ Average number of units in queuing system ( Ls )
.
θn SS θ S θ 1
Ls = P(0) ∑+!'
&)' + +
&!' ! S! S '!
θ S θ
!

S '!
S

§ Average number of units in queue ( Lq )

Lq =

By Ms. Erandika Gamage


§ Average time spent by unit in queuing system ( Ws )

Ls = λ Ws

§ Average time spent by unit in queue ( Wq )

Lq = λ Wq

Variables :
S = Number of servers
λ = Rate of arrival of units
r = Number of servers idle
nμ = Rate of service provision (if n <= S)
H = Number of working hours per day
Sμ = Rate of service provision (if n > S)
n = Number of units in the queuing system
L = Size of waiting room
By Ms. Erandika Gamage
Avg number of units in queuing system ( Ls )

Avg number of units in queue ( Lq ) Rate of service


Rate of
provision (µ)
arrival
(N-n)𝜆

Waiting Room Server

Average time spent by unit in queue ( Wq )


Population Size (N)
Average time spent by unit in queuing system ( Ws )

By Ms. Erandika Gamage


Initial State State n

By Ms. Erandika Gamage


§ Probability of “n” units in queuing system
N!
P(n) = θn P(0)
(N−n)!

§ Evaluate P(0)
N!
1 / P (0) =∑3
&)* θn
(N−n)!
$!
**Computer software is used to evaluate ∑$
!"# θn
$ &! !

§ Probability that queuing system is empty


3!
P (0) = 1/∑3
&)* θn
3 !& !

By Ms. Erandika Gamage


§ Probability that the server is idle
N!
P (0) = 1/∑3
&)* θn
(N−n)!

§ Number of hours that servers idle per day

H P(0)
N!
H * 1/ ∑3
&)* θn
(N−n)!

By Ms. Erandika Gamage


§ Average number of units in queuing system ( Ls )
nN! n
Ls = ∑3
&)* θ P(0)
(N−n)!

§ Average number of units in queue ( Lq )


(n−1)N! n
Lq =∑3
&)' θ P(0)
(N−n)!

By Ms. Erandika Gamage


§ Average time spent by unit in queuing system ( Ws )

Ls = λ Ws

§ Average time spent by unit in queue ( Wq )

Lq = λ Wq

Variables :
λ = Rate of arrival of units
μ = Rate of service provision
θ=λ/μ
N = Size of the population
n = Number of units in the queuing system
H = Number of working hours per day
By Ms. Erandika Gamage
Avg number of units in queuing system ( Ls ) Rate of service
provision (3µ)

µ Server 1
Avg number of units in queue ( Lq )
Rate of
arrival
(N-n)𝜆
µ Server 2

Waiting Room
µ Server 3
Average time spent by unit in queue ( Wq )
Population Size (N)

Average time spent by unit in queuing system ( Ws )


By Ms. Erandika Gamage
Initial State State n

By Ms. Erandika Gamage


Case I : n <= S
§ Rate of arrival = (N-n)λ
§ Rate of service completion = n μ

Case II : n > S
§ Rate of arrival = (N-n)λ

§ Rate of service completion = S μ

Variables :
N = Size of the population
n = Number of units in the queuing system
S = Number of servers
By Ms. Erandika Gamage
§ Probability of “n” units in queuing system
Case I : n <= S Case II : n > S
N! N!
P (n) = θn P(0) P (n) = (SS / S!)(θ / S)n P(0)
(N−n)!n! (N−n)!
N!
P (S) = θS P(0)
(N−S)!S!

§ Evaluate P(0)
N! N!
1 = ∑+!'
&)* θn P(0) + ∑3
&)+ (SS / S!) (θ / S)n P(0)
(N−n)!n! (N−n)!

§ Probability that queuing system is empty


N! N!
P (0) = 1/ [∑+!'
&)* θn P(0) + ∑3
&)+ (SS/ S!) (θ / S)n P(0) ]
(N−n)!n! (N−n)!
By Ms. Erandika Gamage
§ Probability that all the servers are idle
N! N!
P (0) = 1/ [∑+!'
&)* θn P(0) + ∑3
&)+ (SS/ S!) (θ / S)n P(0) ]
(N−n)!n! (N−n)!

§ Probability that “r” servers are idle

P (S-r) =

§ Number of hours that servers idle per day

.∑+,)* Hr P (S−r)

By Ms. Erandika Gamage


§ Average number of units in queuing system ( Ls )
Ls = ∑3
&)* nP(0)

§ Average number of units in queue ( Lq )


Lq =∑3
&)' (n−1)P(n)

By Ms. Erandika Gamage


§ Average time spent by unit in queuing system ( Ws )

Ls = λ Ws

§ Average time spent by unit in queue ( Wq )

Lq = λ Wq

Variables :
(N-n)λ = Rate of arrival of units S = Number of servers
nμ = Rate of service provision (if n <= S) r = Number of servers idle
Sμ = Rate of service provision (if n > S) H = Number of working hours per day
n = Number of units in the queuing system
N = Size of the population
By Ms. Erandika Gamage
§ A queuing system where the output of one queue is the input to another is called a
queuing network.

There are 3 types of queuing networks


I. Queues in Series
II. Cyclic Queues

By Ms. Erandika Gamage


I. Queues in Series

2 3

Arrival Departure

II. Cyclic Queues

By Ms. Erandika Gamage


I. Queues in Series
µ1 µ2 µ3
𝜆
2 3

Arrival Departure
µ1

§ Now consider as a M/M/S model


§ Condition for equilibrium, λ ≤ Sμ
By Ms. Erandika Gamage
II. Cyclic Queues
A cyclic queue has a fixed number of units rotating in a cycle and in the process receiving
service from each station

In solving the problem,


1. Consider the entire network as one system and list down all possible states
2. Write down the balance equation for each state
3. Write down the equation that describes the sum of the probabilities of all the states is
one
4. Solve the equations
By Ms. Erandika Gamage
II. Cyclic Queues
Ex 1.

Possible Situations (Waiting to receive service) State Probability


Station 1 Station 2
0 3 S0 P0
1 2 S1 P1
2 1 S2 P2
3 0 S3 P3
By Ms. Erandika Gamage
II. Cyclic Queues
Ex 1.

State Balance Equation


S0 μ2P(0) = μ1P(1)
S1 (μ1+ μ2)P1 = μ2P0+ μ1P2
S2 (μ1+ μ2)P2 = μ1P3+ μ2P1
S3 μ1P3 = μ2P2

P0+ P1 + P2 + P3 = 1 [Sum of probabilities = 1]

We can solve the above equations and find P0,P1,P2 and P3 . once we find these measures
we can find expected number of units waiting to receive service from station 1 as,
(0 × P0+1× P1 +2 ×P2 +3× P3)

By Ms. Erandika Gamage


II. Cyclic Queues
Ex 2.

By Ms. Erandika Gamage


II. Cyclic Queues
Ex 2.
Possible Situations (Waiting to receive service) State Probability
Station 1 Station 2 Station 3
3 0 0 S0 P0
2 1 0 S1 P1
2 0 1 S2 P2
1 2 0 S3 P3
1 1 1 S4 P4
1 0 2 S5 P5
0 3 0 S6 P6
0 2 1 S7 P7
0 1 2 S8 P8
By Ms. Erandika Gamage
0 0 3 S9 P9
§ Determine an acceptable waiting time for customers
§ Try to divert customer’s attention when waiting
§ Inform customers of what to expect

§ Keep employees not serving the customers out of sight


§ Segment customers

§ Train the servers to be friendly


§ Encourage customers to come during the slack periods

By Ms. Erandika Gamage


In a life time, the average person will spend ,

§ SIX MONTHS Waiting at stoplights

§ EIGHT MONTHS Opening junk mail

§ ONE YEAR Looking for misplaced 0bjects


§ TWO YEARS Reading E-mail

§ FOUR YEARS Doing housework


§ FIVE YEARS Waiting in line

§ SIX YEARS Eating

By Ms. Erandika Gamage

You might also like