0% found this document useful (0 votes)
16 views58 pages

3.Queuing Theory Editted

Queuing Theory is the mathematical study of waiting lines, applicable in both manufacturing and service sectors. It analyzes customer waiting times, queue lengths, and service facilities to optimize profit and minimize waiting times. Key elements include arrival processes, service characteristics, and various queuing models that help evaluate system performance.

Uploaded by

Misgna Arefe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views58 pages

3.Queuing Theory Editted

Queuing Theory is the mathematical study of waiting lines, applicable in both manufacturing and service sectors. It analyzes customer waiting times, queue lengths, and service facilities to optimize profit and minimize waiting times. Key elements include arrival processes, service characteristics, and various queuing models that help evaluate system performance.

Uploaded by

Misgna Arefe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 58

Chapter 3

Queuing Theory

Leake Weleabzgi (MSc)


Ethiopian Institute of Technology (EiT-M)
Mekelle University
What is Queuing Theory?
 is the mathematical study of queuing, or waiting in lines.
 Waiting lines are common situations in our daily life's.
 Useful in both manufacturing and service areas.

Queue
Arrivals Service Departures
facility after service
2
Queuing Theory…cont’d
 Queuing theory is a mathematical approach to the analysis of
systems that involve waiting in line or queues.

 When a customer leaves a waiting line, the opportunity to


make a profit by providing the service is lost.

 The decision is a question of balancing this opportunity cost


against the expense of additional capacity.

3
Queuing Theory…cont’d
 In general, queuing analysis are used to find out more about:

 Waiting time of customers,


 Queue length,
 The number of service facilities, and the busy period.
 Information from the analysis (models) would help to take
action either to reschedule the arrivals or to change the type
and number of service facilities.
 Maximizing total profit
 Minimizing average waiting time for customers
 Meeting a desired service level

4
Elements of Queuing System
Queue: A line of waiting customers who require service from one
or more service providers.
Queuing system: Waiting room + customers + service provider
Arrival of Service Served
Customers
Customers Facility (SF)
leaving the SF

Queue Service

System

5
Characteristics of Queuing System
 Arrivals process: The arrival process is simply how customers arrive. They may come
into a queue alone or in groups, and they may arrive at certain intervals or randomly.

 Behavior: How do customers behave when they are in line? Some might be willing to
wait for their place in the queue; others may become impatient and leave.

 How customers are serviced: This includes the length of time a customer is serviced, the
number of servers available to help the customers

 Service discipline: refers to the rule by which the next customer is selected. Although
many retail scenarios employ the “first come, first served” rule, other situations may call
for other types of service

 Waiting room: The number of customers allowed to wait in the queue may be limited
based on the space available
6
Characteristics …cont’d
 Arrival Characteristics
 Size of the population
 Unlimited (infinite) or limited (finite)
 Pattern of arrivals
 Scheduled or random, often a Poisson distribution
 Behavior of arrivals
 Wait in the queue and do not switch lines
 No balking or reneging
 Single or bulk arrivals

7
Characteristics …cont’d

Service system

Waiting
Arrival customers
Queuing
Departure
In
process discipline
Input Queuing Service
Source process process
Serviced
customers

Balk Renege Jockey

8
Poisson Arrival Process

 Required conditions:

 Orderliness: At most one customer will arrive in any small


time interval of t.

 Stationarity: For time intervals of equal length, the


probability of n arrivals in the interval is constant.

 Independence: The time to the next arrival is independent of


when the last arrival occurred.

9
Poisson Arrival Process

 Number Of Arrivals in Time t:

 Assume  = the average number of arrivals per hour (The


Arrival Rate)

 For a Poisson process, the probability of k arrivals in t hrs


time interval has the following Poisson distribution:

(t) k e  t
P(k arrivals in time t) 
k!

10
Time Between Arrivals

 The average time between arrivals is 1/

 For a Poisson process, the time between arrivals in hours


has the following exponential distribution:

f(t) = e-t

 This means:

 P(T<=t) = 1- e-t

 P(T > t) = e-t

11
Characteristics …cont’d
 Queue discipline

 First-come-first served (FIFO) –Most common

 Last-come-first-served (LCFS)

 Service in random order (SIRO)

 Priority

12
Characteristics …cont’d

 Service Characteristics
 Queuing system designs

 Single-channel system, multiple-channel system

 Single-phase system, multiphase system

 Service time distribution

 Constant service time

 Random service times

13
Poisson Service Process
 Required conditions:

 Orderliness: At most one customer will depart in any small


time interval of t.

 Stationarity: For time intervals of equal length, the


probability of completing n potential services in the
interval is constant.

 Independence: The time to the completion of a service is


independent of when it started.

14
Poisson Service Process

 Number Of Potential Services In Time t:

 Unlike the arrival process, there must be customers in the


system to have services.

 Assume  = the average number of potential services per


hour (Service Rate).

 For a Poisson process, the probability of k potential


services in t hours has the following Poisson distribution:

( t) k e  t
P(k potential services in time t) 
k!
15
The Service Time

 The average service time is 1/

 For a Poisson process, the service time has the following


exponential distribution:

 f(t) = e-t

 This means:

 P(the service will take t additional hours) = e-t

 P(the remaining service will take longer than t hours)


= 1- e-  t

16
Characteristics …cont’d

f(t) = µe-µt
Probability that service time ≥ t

Probability that service time is greater than t = e -µt


1.0 –
µ = Average service rate
0.9 – e = 2.7183
0.8 –
0.7 – Average service rate (µ) = 3 customers per hour
 Average service time = 20 minutes per customer
0.6 –
0.5 –
Average service rate (µ) = 1 customer per hour
0.4 –  Average service time = 60 minutes per customer
0.3 –
0.2 –
0.1 –
0.0 – | | | | | | | | | | | | |
0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 3.00
Time t (hours)

17
Examples
 Example1: The time between arrivals at the State Revenue
Office is exponential with mean value 0.05 hour. The office
opens at 8:00 A.M.
1. Write the exponential distribution that describes the inter-arrival
time.
2. Find the probability that no customers will arrive at the office by
8:15 A.M.
3. It is now 8:30 A.M. The last customer entered the office at 8:00.
What is the probability that the next customer will arrive before
9:00 A.M.? That the next customer will not arrive before 9:00
A.M.? That the next customer will not arrive by 9:30 A.M.?
18
Exercise
 Births in a state are spaced over time according to the
exponential distribution with one birth occurring every 7 minutes
on average. Determine the average number of births per year
and probability of no births in a given year.

19
Exercise

Example: Suppose the time between break downs for a machine is


exponential with a mean of 6 hours. If the machine has worked
without failure during the last 3 hours, what is the probability that it
will continue without failure during the next one hour? That it will
breakdown during the next 0.5 hour?

20
Example 1
 Consider a single server queuing situation in which the arrival
and departure rates are constant and given by λ =3 arrivals
per hour and μ =8 departures per hours for all n≥0.
Determine the steady state probability.
 Solution:

21
Exercise
 A Grocery operates with three checkout Counters. The
manager uses the following schedule to determine the
number of counters in operation depending on the number of
customers in the store.
№ Customers in the store № counter in operation
1 to 3 1
4 to 6 2
More than 6 3

 Customers arrive in the counter area according Poisson distribution


with mean rate 10 customers per hour. The average checkout per
customer is exponential with mean 12 Minutes.
 Steady state probability

 Probability of customers are between one to three

 Probability of customers are four to six


22
Example 2….Continued
 Solution: λ=10

n 0 1 2 3 4 5 6 7 8 9
Pn .018 .036 .072 0.145 0.145 0.145 0.145 0.097 0.065 0.043
23
Queuing Models
 Widely used to estimate desired performance measures of the
system, Typical measures:

 Server utilization

 Length of waiting lines (both in the queue and in the system)

 Delays of customers

 Applications:

 Determine the minimum number of servers needed at a


service center.
 Detection of performance bottleneck or congestion.

 Evaluate alternative system designs.


24
Queuing Models…cont’d
 The conventional notation for the characteristics of queuing
situation can be given in the following format, it is also called
Lee Kendall’s Notation→ (a/b/c):(d/e/f)
 Where:
a =Arrivals distribution, Poisson (M), Deterministic(D)
b = Departures (service time) distribution, constant (D), Exponential
(M), General (G) and Erlang (Ek)
c = Number of parallel servers; (C)=1, 2,3,4,…
d = Queue discipline; FIFO, LIFO, SIRO, GD (any type)
e = Maximum number allowed in the system (in queue plus in
service); finite ( Q numbers), infinite (∞)
f = Size of calling source ; finite (N) or infinite (∞)
25
Queuing Models…cont’d
 For example, the model (M/D/2) : ( FIFO/N/∞) uses :

 Poisson inter arrival time,

 Constant service time or deterministic service time,

 2 parallel servers,

 The queue discipline is First come first served,

 There is a limit of N customers in the entire system, and

 The size of the source from which customers arrive is


infinite.

26
Steady state - measure of Performance
 The most commonly used notations used to measure
performance in a queuing situation are:
λ= arrival rate Ts= mean time in the system

λ eff = effective arrival rate Ns= mean number in the system

µ = service rate Tq= mean waiting time in queue


n = number of customers in Nq= mean number in queue
system
P0= probability of zero units
c = number of channels in multiple
channel system PQ= probability of maximum
number in the system
= mean number of busy servers
Q= maximum number of arrivals Pn= probability of n units in the
that can be in system system.
 = Average number of busy
servers (utilization rate) 27
Performance measures… cont’d
 Recall the system includes both the queue and service facility.
 
N s  nPn
n 1
Ns   (n 
n C 1
C ) Pn

 The relation ship between Ns and Ts and also b/n Nq and Tq is

known as little's formula and is:

Ns = effTs
Nq = effTq
 Utilization factor: (stable system if )
 If some of the arriving customers are not joining the queuing
line then the arrival rate that is used is called effective arrival
rate(eff) which is the arrival at which customers are joining the
waiting area. 28
Performance measures… cont’d

 Recall the system includes both the queue and service


facility.
Expected Waiting Expected waiting time in the queue +
time in the system = Expected Service time

Ts = Tq + 1/µ
Ns = Nq + λ/µ
 The difference between the average number in the system
and average number in the queue will be equals the average
number of busy servers, Ć:
Ć = Ns - Nq
=λeff/µ
=ρ 29
The Variety of Queuing Models

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


 Single channel

 Single phase

 Poisson arrival rate

 Exponential service rate

 Unlimited queue length

 Using the notations of the generalized model, we have λn = λ

and μn = μ for all n= 0, 1, 2,… and also, λ eff = 1 and λ loss =0,
because all arriving customers can join the system. 30
Model 1…Cont’d
 Arrivals are served on a FIFO basis and every arrival waits to
be served regardless of the length of the queue.
 Arrivals are independent of preceding arrivals but the
average number of arrivals does not change over time.
 Arrivals are described by a Poisson probability distribution
and come from an infinite population.
 Service times vary from one customer to the next and are
independent of one another, but their average rate is known.
 Service times occur according to the negative exponential
distribution.
 The service rate is faster than the arrival rate.

31
Model 1…Cont’d

1 λ
2
Ts  Nq 
 - μ(μ - λ)
 
Ns  p0 1 
 - 
n
  λ λ
Tq  Pn  1 -   
(  -  )
 μ μ
32
Queuing Models …cont’d
(ii) Model 2: (M/G/1) : (FIFO/∞/∞)
 single channel
 single phase
 poison arrival rate
1
 General service rate Ts Tq 

μ
unlimited queue length.
2 2   2
Nq 
21   
 2 Pollaczek-Khinchin
Ns   (  1) 2
formula or PK formula
1   2(1   )
 Once Ns is determined the other can be determined from their
relations using little's formula.
 σ is standard deviation of service time distribution.
33
Queuing Models …cont’d

(iii) Model 3: (M/D/1) : (FIFO/∞/∞)


 single channel
 single phase 2
Nq 
 poison arrival rate
2     
 constant service rate
 unlimited queue length.

Tq 
2     

 If the service time is constant the 1


standard deviation of the previous
Ts Tq 
μ
model (M/G/1:GD//) will be zero
and the other formula remains the 
same. N s N q 

34
Variety of Queuing Models …cont’d

(iv) Model 4:(M/M/1) : (FIFO/Q/∞)


 single channel
 single phase
 Poisson arrival rate
 exponential service rate
 finite or limited queue length , Q customers in the system

35
Model 4…cont’d

λ  1  Q  1λ μ   Qλ μ 
Q 1
Q

N s   
 Tq 
Nq
μ  1  λ μ [1  λ μ Q 1 ]  λ1 - PQ 

1
Ts Tq  
μ 1 -    
   
P0  Q 1 
 Q -1 Q  1 -    

2 1 - Q     
 + Q  1       
λ       
N q    
 μ    1      1      
Q
   
            Q
λ
 PQ P0  
1 -     n n μ
     λ
   P    λ 
Pn  Q 1    0   ; n≤ Q
 1 -     μ  μ
    
36
Variety of Queuing Models …cont’d
(v) Model 5: (M/M/c) : (FIFO/ ∞/ ∞)
 multiple channel

 single phase

 poison arrival rate

 exponential service rate

 unlimited queue length.

37
Model 5…cont’d

 
1  
Ts Tq   1 
μ P0   where   c
 c  1            c 
n c

   n!   c!   c    
 c
  n 0     

    
    Nq
Tq Po =
  c(c ! )(1 - /c )2   n
  
 
   
P n P o for 0 n c
n!

N s N q 
 
n

 
   ( / )c   
Nq  P 0  Pn Po ; n c
2
n c
c!c
 (c - 1)! (c  -  ) 
38
Variety of Queuing Models …cont’d
(vi) Model 6 (M/M/1) : (FIFO/ ∞/ N)
 single channel

 single phase

 poison arrival rate

 exponential service rate

 unlimited queue length

 Finite calling population

39
Model 6…Cont’d

1 1
Ts Tq  P0  N , n=population size
 N!  n
 (
n 0 ( N  n)! 
)

N s  N q (1  p0 )
N!  n
Pn  ( ) Po , n= 1,2,…N
  ( N  n)! 
N q N  (1  P0 )

Nq
Tq 
( N  N s )

40
Variety of Queuing Models …cont’d
(vii) Model 7 (M/Ek/1) : (FIFO/ ∞/ ∞)

 single channel

 Multiple phase (k)

 poison arrival rate

 Erlang service rate with shape parameter k

 unlimited queue length

 unlimited calling population

 Ek of a probability distribution is the probability distribution of a


random variable, which can be expressed as the sum of ‘k’
independently, identically distributed exponential variables. 41
Model 7…Cont’d

2
(k 2 )   2 1  k 2
Nq  
2(1   ) 2k  (    )
1
Ts Tq 

Nq
Tq 

N s Ts 
 Once the values of Nq is determined the other parameter can
be derived from it.

42
Example 3
 Arrivals at a telephone booth are considered to be Poisson
distribution with an average time of 10 minutes between
arrivals. The length of the phone call is assumed to be
distributed exponentially with average time per call equal to
3 minutes, then
a) What is the probability that a person arriving at the booth will
have to wait?
b) What is the average number of people that will be waiting in
the system?
c) The telephone department will install another booth when
convinced that a person will have to wait for 3 minutes for the
phone. By how much must the flow of rate of arrivals be
increased in order to justify a second booth? 43
Solution

The model is (M/M/1): (FIFO/∞/ ∞)

Given = 1/10 customers per min.

µ = 1/3 customers per min.

a) Probability (Nq > 0) = 1- Po = 1-(1-/ ) =1-(1-3/10)= 0.3


b) 
Ns 
 
1 / 10cust. per min .
Ns 
1 / 3cust. per min .  1 / 10cust. per min .

= 3/7= 0.43 customers


44
Solution

'
Tq 
 (   ' )
C) Tq= 3 minute, µ =1/3 customers per min.
 Solving for λ’ ,
 λ'= 1/6 customers per minute
 λ=1/15 customers per minute

1 1 10  6 4
    
6 10 60 60

45
Example 4
 The new accounts loan officer of the Bank interviews all
customers for new accounts. The customers desiring to open
new accounts arrive at the rate of four per hour according to
a Poisson distribution, and the accounts officer spends an
average of 12 minutes with each customer setting up a new
account.

a) Determine the operating characteristics (P0, Ns, Nq,Ts, and Tq)


for the system

b) Add an additional accounts officer to the system described in


the problem so that it is now a multiple-server queuing
system with two channels, and determine the operating
characteristic required in part (a).
46
Solution

 Given λ= 4 customers per hour arrive


µ= 5 customers per hour are served

a. Determine the operating characteristics for the single-


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

 4
p0 1  (1  )
 5
= .20 probability of no customers in the system

47
Solution…Cont’d

 4
Ns   = 4 customers on average in the queuing system
 - 5 4

2 2
λ (4)
Nq   = 3.2 customers on average.
μ(μ - λ) 5(5  4)

1 1
Ts   = 1 hr on average in the system
 -  5 4

 4
Tq   = 0.80 hr average time in the queue
 (  -  ) 5(5  4)
48
Solution…Cont’d

b. Determine the operating characteristics for the multiple


server system: (M/M/2): (FIFO/∞/ ∞)
 
 
 1  1
P0   
            c    1  4  o 1  4 1  1  4  2  (2)(5) 
c 1  n
  c

  n!   c!   c                
 
n 0     0!  5  1!  5   2!  5   (2)(5)  4 

= .249 probability that no customers are in the system

  c   4 2
Tq Po  2
(  / )  .249 ( 4 / 5 ) 
  c(c ! )(1 - /c )
2
  (5)( 2)( 2 ! )[1 - 4 / (5)( 2)] 
= 0.038 hr (2.5 min) average time spent waiting in line
49
Solution…Cont’d

1 1
Ts Tq  0.038 
μ 5
= 0.238 hr or (14.5 min) average time in the system

   ( / )c   (4)(5)( 4 / 5 )2 
Nq  P 0  2  0.249  2
 (c - 1)! (c  -  )   1! [( 2)(5) - 4 ] 
= 0.152 customer on average waiting to be served

 4
N s N q  0.152 
 5
= 0.952 customer on average waiting in the system
50
Example 5
 Students arrive at the registrar office according to a Poisson
input process with a mean rate of 30 per day. The time
required to serve a student has an exponential distribution
with a mean of 36 minutes. Assume that the students are
served by a single individual, and queue capacity is 9. On the
basis of this information, find the following:
 The probability of zero unit in the queue.
 The average line length and other queue system
performance measurement.

51
Example 6
 The XY Restaurant has only two waiters. Customers arrive
according to a Poisson process with a mean rate of 10 per
hour. The service for each customer is exponential with mean
of 4 minutes. On the basis of this information, find the
following:
 The probability of having to wait for service.

 The expected percentage of idle time for each waiter.

52
Example 7
 Repair of a certain type of machine requires three steps to be
completed sequentially. The time taken to perform each step
follows an exponential distribution with mean 20/3 minutes and
is independent of each other. The machine breakdown follows
a Poisson process with rate of 1 per 2 hours. Assuming that
there is only one repairman, find out:
 The expected idle time of a machine.

 The average waiting time of a broken down machine in a queue.

 The expected number of broken down machines in the queue.

 The average number of machines which are not in operation


1 20
--- = ----
3µ 3

53
Example 7…..continued
1 20
Service time per phase = --- = ----
3 3

Therefore,  = 3 per hour.

1+3 (1/2)2
The expected numbers of machines in the queue, N q =
1.33 customer per
------ X ------- =
2X3 3(3 - 1/2)
minutes

1+3 1/2
2 minutes 40
The expected waiting time before being served, T q = ------ X -------- =
seconds
2X3 3(3 - 1/2)

2 1
The expected time spent in the system, T s =
22 minutes 40
---- + ---- =
45 3
seconds

1 17
The expected numbers of machines in the system, N s =
11.33 customer per
---- X ----- =
2 45
minutes

54
Economic Analysis of Queuing Systems
 The performance measures previously developed are used
next to determine a minimal cost queuing system.
 The procedure requires estimated costs such as:
 Hourly cost per server.
 Customer goodwill cost while waiting in line.
 Customer goodwill cost while being served.

Total service (Number of channels)


=
cost x (Cost per channel)

Total service = mCs


cost
Where: m = number of channels
Cs = service cost of each channel
55
Economic Analysis of Queuing Systems
 Waiting cost when the cost is based on time in the system

Total waiting = (Total time spent waiting by all


cost arrivals) x (Cost of waiting)
= (Number of arrivals) x
(Average wait per arrival)Cw

 If waiting time cost is based on time in the queue

Total cost = Total service cost + Total waiting cost


= mCs + TsCw
56
Economic Analysis of Queuing Systems

57
Economic Analysis of Queuing Systems
 Example 8: A company is determining which of two copiers
to lease for administrative suite. A regular copier leases for $8
per hour, and it takes an employee an average of 6 minutes
(exponentially distributed) to complete a copying job. A deluxe,
high-speed copier leases for $16 per hour, and it requires an
average of 3 minutes to complete a copying job. Employees
arrive at the copying machine at a rate of 7 per hour (Poisson
distributed), and an employee's time is valued at $10 per hour.
Determine which copier the company should lease.

58

You might also like