12.1 Introduction

Download Report

Transcript 12.1 Introduction

Queuing Theory
Introduction
• Queuing is the study of waiting lines, or queues.
• The objective of queuing analysis is to design
systems that enable organizations to perform
optimally according to some criterion.
• Possible Criteria
– Maximum Profits.
– Desired Service Level.
• Analyzing queuing systems requires a clear
understanding of the appropriate service
measurement.
• Possible service measurements
– Average time a customer spends in line.
– Average length of the waiting line.
– The probability that an arriving customer must wait
for service.
•
The Arrival Process
– There are two possible types of arrival processes
• Deterministic arrival process.
• Random arrival process.
– The random process is more common in businesses.
– A Poisson distribution can describe the random
arrival process.
Types of Queuing Systems
• Single Channel Single Phase: Trucks unloading
shipments into a dock.
Types of Queuing Systems
• Single Line Multiple Phase: Wendy’s Drive
Thru -> Order + Pay/Pickup
Types of Queuing Systems
• Multiple Line Single Phase: Walgreens DriveThru Pharmacy
Types of Queuing Systems
• Multiple Line Multiple Phase: Hospital
Outpatient Clinic, Multi-specialty
Fundamentals of Queuing Theory
• Microscopic traffic flow
• Arrivals
– Uniform or random
• Departures
– Uniform or random
• Service rate
– Departure channels
• Discipline
– FIFO and LIFO are most popular
– FIFO is more prevalent in traffic engineering
Poisson Distribution
• Count distribution
– Uses discrete values
– Different than a continuous distribution

t 
Pn  
e  t
n!
n
P(n) = probability of exactly n vehicles arriving over time t
n = number of vehicles arriving over time t
λ = average arrival rate
t = duration of time over which vehicles are counted
Poisson Distribution
• Video
Poisson Ideas
• Probability of exactly 4 vehicles arriving
– P(n=4)
• Probability of less than 4 vehicles arriving
– P(n<4) = P(0) + P(1) + P(2) + P(3)
• Probability of 4 or more vehicles arriving
– P(n≥4) = 1 – P(n<4) = 1 - P(0) + P(1) + P(2) + P(3)
• Amount of time between arrival of successive vehicles

t 0 e t
P0 
0!
 e  t
Poisson Distribution Example
Group Activity
Vehicle arrivals at the Olympic National Park main gate are
assumed Poisson distributed with an average arrival rate
of 1 vehicle every 5 minutes. What is the probability of the
following:
1. Exactly 2 vehicles arrive in a 15 minute interval?
2. Less than 2 vehicles arrive in a 15 minute
interval?
3. More than 2 vehicles arrive in a 15 minute
interval?

0.20 veh min  t 
Pn  
n
n!
e
 0.20 veh min t
Example Calculations
Exactly 2:
Less than 2:
2

0.20  15 e 0.20 15
P2 
2!
 0.224  22.4%
Pn  2  P0  P1
More than 2: Pn  2  1  P0  P1  P2
The Poisson Arrival Distribution
( t) e
P( X  k ) 
k!
k
Where
 t
 = mean arrival rate per time unit.
t = the length of the interval.
e = 2.7182818 (the base of the natural logarithm).
k! = k (k -1) (k -2) (k -3) … (3) (2) (1).
The Waiting Line
– Line configuration
•
•
•
•
A Single service Queue.
Multiple service queue with single waiting line.
Multiple service queue with multiple waiting lines.
Tandem queue (multistage service system).
– Jockeying
• Jockeying occurs if customers switch lines when they
perceived that another line is moving faster.
– Balking
• Balking occurs if customers avoid joining the line when
they perceive the line to be too long.
– Priority rules
• Priority rules define the line discipline.
• These rules select the next customer for service.
• There are several commonly used rules:
–
–
–
–
First come first served (FCFS).
Last come first served (LCFS).
Estimated service time.
Random selection of customers for service.
– Homogeneity
• An homogeneous customer population is one in which
customers require essentially the same type of service.
• A Nonhomogeneous customer population is one in which
customers can be categorized according to:
– Different arrival patterns
– Different service treatments.
The Service Process
– Some service systems require a fixed service time.
– In most business situations, however, service time
varies widely among customers.
– When service time varies, it is treated as a random
variable.
– The exponential probability distribution is used
sometimes to model customer service time.
• The Exponential Service Time
Distribution
f(X) = me-mX
where m = is the average number of customers
who can be served per time period.
The probability that the service time X is less than some “t.”
P(X
 t) = 1 - e-mt
Schematic illustration of the exponential distribution
f(X)
The probability that service is completed
within t time units
X=t
Measures of Queuing System
Performance
• Performance can be measured by focusing on:
– Customers in queue.
– Customers in the system.
• Transient and steady state periods complicate
the service time analysis
• The transient period occurs at the initial time of
operation.
– Initial transient behavior is not indicative of long
run performance.
• The steady state period follows the transient
period.
• In steady state, long run probabilities of having “n”
customers in the system do not change as time goes on.
• In order to achieve steady state, the effective arrival rate
must be less than the sum of effective service rates .
 m
For one server
 m1 m2…mk
 km
For k servers For k servers each
with service rate m
• Steady State Performance Measures
P0 = Probability that there are no customers in the system.
Pn = Probability that there are “n” customers in the system.
L = Average number of customers in the system.
Lq = Average number of customers in the queue.
W = Average time a customer spends in the system.
Wq = Average time a customer spends in the queue.
Pw = Probability that an arriving customer must wait for
service.
r = Utilization rate for each server (the percentage of time
that each server is busy).
• Little’s Formulas
– Little’s Formulas represent important relationships
between L, Lq, W, and Wq.
– These formulas apply to systems that meet the
following conditions:
• Single queue systems,
• Customers arrive at a finite arrival rate , and
• The system operates under steady state condition.
L=W
Lq =  Wq
For the infinite population case
L = Lq +  / m
Queue Notation
Number of
service channels
Arrival rate nature
X /Y / N
Departure rate nature
• Popular notations:
– D/D/1, M/D/1, M/M/1, M/M/N
– D = deterministic distribution
– M = exponential distribution
Queuing Theory Applications
• D/D/1
– Use only when absolutely sure that both arrivals and departures are
deterministic
• M/D/1
– Controls unaffected by neighboring controls
• M/M/1 or M/M/N
– General case
• Factors that could affect your analysis:
– Neighboring system (system of signals)
– Time-dependent variations in arrivals and departures
• Peak hour effects in traffic volumes, human service rate changes
– Breakdown in discipline
• People jumping queues! More than one vehicle in a lane!
– Time-dependent service channel variations
• Grocery store counter lines
Queue Analysis – Graphical
D/D/1 Queue
Vehicles
Delay of nth arriving vehicle
Maximum queue
Maximum delay
Total vehicle delay
Queue at time, t1
t1
Time
Departure
Rate
Arrival
Rate
Queue Analysis – Numerical
r
• M/D/1
– Average length of queue
Q

m
r2
21  r 
– Average time waiting in queue
1  r 


w
2m  1  r 
– Average time spent in system
1  2 r 


t
2m  1  r 
λ = arrival rate
r  1.0
μ = departure rate
Queue Analysis – Numerical
r
• M/M/1
– Average length of queue
r  1.0
r2
Q
1  r 
– Average time waiting in queue
– Average time spent in system
λ = arrival rate

m
1  

w  
m  m  
t
1
m 
μ = departure rate
• Performance Measures for the
M / M /1 Queue
P0 = 1- ( / m)
Pn = [1 - ( / m)] (/ m)n
L =  / (m - )
Lq =  2 / [m(m - )]
W = 1 / (m - )
Wq =  / [m(m - )]
Pw =  / m
r =/m
The probability that
a customer waits in
the system more than
“t” is P(X>t)= e-(m - )t
Queue Analysis – Numerical
r
• M/M/N
– Average length of queue
r N  1.0

P0 r N 1 
1
Q


N! N  1  r N 2 
– Average time waiting in queue
– Average time spent in system
λ = arrival rate

m
r Q 1
w


m
t
r Q

μ = departure rate
M/M/N – More Stuff
r
– Probability of having no vehicles
P0 

m
r N  1.0
1
rN


N!1  r N 
n 0 nc !
N 1
rn
c
c
– Probability of having n vehicles
Pn 
r P0
n
n!
for n  N
Pn 
r n P0
N
n N
N!
for n  N
– Probability of being in a queue
N 1
Pn N
P0 r

N! N 1  r N 
λ = arrival rate
μ = departure rate
Example 1
You are entering a Club to watch a basketball game.
There is only one ticket line to purchase tickets. Each
ticket purchase takes an average of 18 seconds. The
average arrival rate is 3 persons/minute.
Find the average length of queue and average waiting
time in queue assuming M/M/1 queuing.
Solution
• Departure rate: μ = 18 seconds/person or 3.33
persons/minute
• Arrival rate: λ = 3 persons/minute
• ρ = 3/3.33 = 0.90
• Q-bar = 0.902/(1-0.90) = 8.1 people
• W-bar = 3/3.33(3.33-3) = 2.73 minutes
• T-bar = 1/(3.33 – 3) = 3.03 minutes
Example 2
You are now in line to get into the Arena. There are 3
operating turnstiles with one ticket-taker each. On average
it takes 3 seconds for a ticket-taker to process your ticket
and allow entry. The average arrival rate is 40
persons/minute.
Find the average length of queue, average waiting time in
queue assuming M/M/N queuing.
What is the probability of having exactly 5 people in the
system?
Solution
•N = 3
•Departure rate: μ = 3 seconds/person or 20 persons/minute
•Arrival rate: λ = 40 persons/minute
•ρ = 40/20 = 2.0
•ρ/N = 2.0/3 = 0.667 < 1 so we can use the other equations
•P0 = 1/(20/0! + 21/1! + 22/2! + 23/3!(1-2/3)) = 0.1111
•Q-bar = (0.1111)(24)/(3!*3)*(1/(1 – 2/3)2) = 0.88 people
•T-bar = (2 + 0.88)/40 = 0.072 minutes = 4.32 seconds
•W-bar = 0.072 – 1/20 = 0.022 minutes = 1.32 seconds
Since n > N (5 > 3)
•Pn = 25(0.1111)/(35-3*3!) = 0.0658 = 6.58%
Example 3
You are now inside the Arena. They are passing out Harry
the Husky doggy bags as a free giveaway. There is only
one person passing these out and a line has formed
behind her. It takes her exactly 6 seconds to hand out a
doggy bag and the arrival rate averages
9 people/minute.
Find the average length of queue, average waiting time in
queue, and average time spent in the system assuming
M/D/1 queuing.
Solution
•N = 1
•Departure rate: μ = 6 seconds/person or 10 persons/minute
•Arrival rate: λ = 9 persons/minute
•ρ = 9/10 = 0.9
•Q-bar = (0.9)2/(2(1 – 0.9)) = 4.05 people
•W-bar = 0.9/(2(10)(1 – 0.9)) = 0.45 minutes = 27 seconds
•T-bar = (2 – 0.9)/((2(10)(1 – 0.9) = 0.55 minutes = 33 seconds
MARY’s SHOES
• Customers arrive at Mary’s Shoes every 12
minutes on the average, according to a
Poisson process.
• Service time is exponentially distributed with
an average of 8 minutes per customer.
• Management is interested in determining the
performance measures for this service system.
SOLUTION
– Input
 = 1/ 12 customers per minute = 60/ 12 = 5 per
hour.
m = 1/ 8 customers per minute = 60/ 8 = 7.5 per
Pw =  / m  0.6667
hour.
P0 = 1- ( / m) = 1 - (5 / 7.5) = 0.3333
r =  / m  0.6667
– Performance Calculations
Pn = [1 - ( / m)] (/ m) = (0.3333)(0.6667)n
L =  / (m - ) = 2
Lq = 2/ [m(m - )] = 1.3333
W = 1 / (m - ) = 0.4 hours = 24 minutes
Wq =  / [m(m - )] = 0.26667 hours = 16 minutes