3.Queuing Theory Editted
3.Queuing Theory Editted
Queuing Theory
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.
3
Queuing Theory…cont’d
In general, queuing analysis are used to find out more about:
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
8
Poisson Arrival Process
Required conditions:
9
Poisson Arrival Process
(t) k e t
P(k arrivals in time t)
k!
10
Time Between Arrivals
f(t) = e-t
This means:
P(T<=t) = 1- e-t
11
Characteristics …cont’d
Queue discipline
Last-come-first-served (LCFS)
Priority
12
Characteristics …cont’d
Service Characteristics
Queuing system designs
13
Poisson Service Process
Required conditions:
14
Poisson Service Process
( t) k e t
P(k potential services in time t)
k!
15
The Service Time
f(t) = e-t
This means:
16
Characteristics …cont’d
f(t) = µe-µt
Probability that service time ≥ t
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
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
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
Delays of customers
Applications:
2 parallel servers,
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
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
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
Single phase
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
21
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
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
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
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
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
'
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.
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
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.
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.
53
Example 7…..continued
1 20
Service time per phase = --- = ----
3 3
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.
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