Queuing Models

advertisement
Queuing Models
(Waiting Lines)
1
Introduction (1/2)
• 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.
2
Introduction (2/2)
• 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.
3
Elements of the Queuing Process
• A queuing system consists of three basic
components:
– Arrivals: Customers arrive according to some arrival
pattern.
– Waiting in a queue: Arriving customers may have to wait
in one or more queues for service.
– Service: Customers receive service and leave the system.
4
The Arrival Process (1/2)
• There are two possible types of arrival
processes
– Deterministic arrival process.
– Random arrival process.
• The random process is more common in
businesses.
5
The Arrival Process (2/2)
• Under three conditions the arrivals can be modeled as a
Poisson process
– Orderliness : one customer, at most, will arrive during a
predefined time interval.
– Stationarity : for a given time frame, the probability of arrivals
within a certain time interval is the same for all time intervals of
equal length.
– Independence : the arrival of one customer has no influence
on the arrival of another.
6
The Poisson Arrival Process
ke- lt
(lt)
P(X = k) =
k!
Where
l = 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).
7
George’s HARDWARE – Arrival Process
• Customers arrive at George’s Hardware according to
a Poisson distribution.
• Between 8:00 and 9:00 A.M. an average of 6
customers arrive at the store.
• What is the probability that k customers will arrive
between 8:00 and 8:30 in the morning (k = 0, 1, 2,…)?
8
George’s HARDWARE –
An illustration of the Poisson distribution.
• Input to the Poisson
distribution
l = 6 customers per hour.
t = 0.5 hour.
lt = (6)(0.5) = 3.
0 1 2 3 4 5 6 7 8
10k23
(lt)
e
P(X = 01k23 )=
k2!
1!
0!
3!!
lt
= 0.224042
0.149361
0.049787
0.224042
9
The Waiting Line Characteristics
• Factors that influence the modeling of queues
– Line configuration
– Priority
– Balking
– Tandem Queues
– Reneging
– Homogeneity
– Jockeying
10
Line Configuration
• A single service queue.
• Multiple service queue with single waiting line.
• Multiple service queue with multiple waiting
lines.
• Multistage service system.
11
Balking, Reneging, Jockeying
• Balking occurs if customers avoid joining the line
when they perceive the line to be too long
• Reneging occurs when customers abandon the
waiting line before getting served
• Jockeying (switching) occurs when customers
switch lines once they perceived that another
line is moving faster
12
Priority Rules
• These rules select the next customer for service.
• There are several commonly used rules:
–
–
–
–
First come first served (FCFS - FIFO).
Last come first served (LCFS - LIFO).
Estimated service time.
Random selection of customers for service.
13
Multistage Service
• These are multi-server systems.
• A customer needs to visit several service
stations (usually in a distinct order) to complete
the service process.
• Examples
– Patients in an emergency room.
– Passengers prepare for the next flight.
14
Homogeneity
• A homogeneous customer population is one in
which customers require essentially the same
type of service.
• A non-homogeneous customer population is one
in which customers can be categorized according
to:
– Different arrival patterns
– Different service treatments.
15
The Service Process
• In most business situations, 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.
16
The Exponential Service Time Distribution
f(t) = me-mt
m = the average number of customers
who can be served per time period.
Therefore, 1/m = the mean service time.
The probability that the service time X is less than some “t.”
P(X  t) = 1 - e-mt
17
Schematic illustration of the exponential
distribution
The probability that service is completed
within t time units
P(X  t) = 1 - e-mt
X=t
18
George’s HARDWARE – Service time
• George estimates the average service time to be
1/m = 4 minutes per customer.
• Service time follows an exponential distribution.
• What is the probability that it will take less than 3
minutes to serve the next customer?
19
GEORGE’s HARDWARE
• The mean number of customers served per
minute is ¼ = ¼(60) = 15 customers per hour.
• P(X < .05 hours) = 1 – e-(15)(.05) = 0.5276
3 minutes = .05 hours
20
GEORGE’s HARDWARE
Using Excel for the Exponential Probabilities
=EXPONDIST(B4,B3,TRUE)
Exponential Distribution for μ = 15
16,000
14,000
12,000
f(t)
10,000
8,000
6,000
4,000
2,000
0,000
0,000
0,075
0,150
0,225
0,300
=EXPONDIST(A10,$B$3,FALSE)
t
Drag to B11:B26
0,375
21
The Exponential Distribution Characteristics
• The memoryless property (Markov)
– No additional information about the time left for the completion of a
service, is gained by recording the time elapsed since the service
started.
– For George’s, the probability of needing more than 3 minutes is (10.52763=0.47237) independent of how long the customer has been
served already.
– P(T≥s+t / T≥s) = P(T≥t)
• The Exponential and the Poisson distributions are related to
one another.
– If customer arrivals follow a Poisson distribution with mean rate l,
their interarrival times are exponentially distributed with mean time
1/l.
22
Performance Measures (1/4)
• Performance can be measured by focusing on:
– Customers in queue.
– Customers in the system.
• Performance is measured for a system in steady
state.
23
Performance Measures (2/4)
• The transient period
occurs at the initial
time of operation.
• Initial transient
behavior is not
indicative of long run
performance.
n
Roughly, this
is a transient
period…
Time
24
Performance Measures (3/4)
• The steady state
period follows the
transient period.
• Meaningful long run
performance
measures can be
calculated for the
system when in
steady state.
n
Roughly, this
is a transient
period…
This is a
steady state
period………..
Time
25
Performance Measures (4/4)
In order to achieve steady state, the
effective arrival rate must be less than
the sum of the effective service rates .
k servers
l< m
For one server
l< m1 +m2+…+mk
For k servers
with service rates mi
l< km
Each with
service rate of m
26
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).
27
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 l, and
– The system operates under a steady state condition.
L=lW
Lq = l Wq
For the case of an infinite population
L = Lq + l/m
28
Classification of Queues
• Queuing system can be classified by:
–
–
–
–
–
Arrival process.
Service process.
Number of servers.
System size (infinite/finite waiting line).
Population size.
Example:
M / M / 6 / 10 / 20
• Notation
– M (Markovian) = Poisson arrivals or exponential service time.
– D (Deterministic) = Constant arrival rate or service time.
– G (General) = General probability for arrivals or service time.
29
M/M/1 Queuing System - Assumptions
– Poisson arrival process.
– Exponential service time distribution.
– A single server.
– Potentially infinite queue.
– An infinite population.
30
M / M /1 Queue - Performance Measures
P0 = 1 – (l/m)
Pn = [1 – (l/m)](l/m)n
L = l /(m – l)
Lq = l2 /[m(m – l)]
W = 1 /(m – l)
Wq = l /[m(m – l)]
Pw = l / m
r =l/m
The probability that
a customer waits in
the system more than
“t” is P(X>t) = e-(m - l)t
31
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.
32
MARY’s SHOES - Solution
– Input
l = 1/12 customers per minute = 60/12 = 5 per hour.
m = 1/ 8 customers per minute = 60/ 8 = 7.5 per hour.
– Performance Calculations
P0 = 1 - (l/m) = 1 - (5/7.5) = 0.3333
Pw = l/m = 0.6667
Pn = [1 - (l/m)](l/m)n = (0.3333)(0.6667)n
r = l/m = 0.6667
L = l/(m - l) = 2
Lq = l2/[m(m - l)] = 1.3333
W = 1/(m - l) = 0.4 hours = 24 minutes
Wq = l/[m(m - l)] = 0.26667 hours = 16 minutes
33
M/M/k Queuing Systems
• Characteristics
– Customers arrive according to a Poisson process at a
mean rate l.
– Service times follow an exponential distribution.
– There are k servers, each of who works at a rate of m
customers (with km> l).
– Infinite population, and possibly infinite line.
34
M / M /k Queue - Performance Measures
P0 =
Pn =
Pn =
1
1l 
1  l   km 

 +

 


m
m




n= 0 n !
k!
 km  l 
n
k 1
 l 
 m
n!
n
 l 
 m
k !k
n k
k
P0
for n  k.
P0
for n > k.
n
35
M / M /k Queue - Performance Measures
k
 l  m
 m
1
W=
P +
2 0
m
(k  1) !(km l)
1  l   km 

 
Pw =
 P0
m


k!
 km  l 
k
l
r=
km
The performance measurements L, Lq, Wq,, can be obtained
from Little’s formulas.
36
LITTLE TOWN POST OFFICE
• Little Town post office is open on Saturdays
between 9:00 a.m. and 1:00 p.m.
• Data
– On the average 100 customers per hour visit the office
during that period. Three clerks are on duty.
– Each service takes 1.5 minutes on the average.
– Poisson and Exponential distributions describe the
arrival and the service processes respectively.
37
LITTLE TOWN POST OFFICE
• The Postmaster needs to know the relevant
service measures in order to:
– Evaluate the current service level.
– Study the effects of reducing the staff by one clerk.
38
LITTLE TOWN POST OFFICE - Solution
• This is an M / M / 3 queuing system.
– Input
l = 100 customers per hour.
m = 40 customers per hour (60/1.5).
Does steady state exist (l < km )?
l = 100 < km = 3(40) = 120.
39
LITTLE TOWN POST OFFICE – solution
continued
• First P0 is found by
P0 =
1
n
3
1  100  1  100   3( 40) 


 + 
 

3!  40   3( 40)  100 
n= 0 n!  40 
1
=
= .045
6.25
1 + 2.5 +
+ 15.625
2
2
• P0 is used to determine all the other performance
measures.
40
LITTLE TOWN POST OFFICE
41
LITTLE TOWN POST OFFICE
42
M/G/1 Queuing System
• Assumptions
– Customers arrive according to a Poisson process with a
mean rate l.
– Service time has a general distribution with mean rate m.
– One server.
– Infinite population, and possibly infinite line.
43
M/G/1 Queuing System –
Pollaczek - Khintchine Formula for L


l

(l) +  m
2
L=
2 1  l 
m

2
l
+
m
Note: It is not necessary to know the particular service time distribution.
Only the mean and standard deviation of the distribution are needed.
44
VASSILIS’S TV REPAIR SHOP (1/2)
• Vassilis repairs television sets and VCRs.
• Data
– It takes an average of 2.25 hours to repair a set.
– Standard deviation of the repair time is 45 minutes.
– Customers arrive at the shop once every 2.5 hours on the
average, according to a Poisson process.
– Vassilis works 9 hours a day, and has no help.
– He considers purchasing a new piece of equipment.
• New average repair time is expected to be 2 hours.
• New standard deviation is expected to be 40 minutes.
45
VASSILIS’S TV REPAIR SHOP (2/2)
Vassilis wants to know the effects of using the new
equipment on –
1. The average number of sets waiting for repair;
2. The average time a customer has to wait
to get his repaired set.
46
VASSILIS’S TV REPAIR SHOP - Solution
• This is an M/G/1 system (service time is not
exponential (note that   1/m).
• Input
– The current system (without the new equipment)
l = 1/ 2.5 = 0.4 customers per hour.
m = 1/ 2.25 = 0.4444 costumers per hour.
 = 45/ 60 = 0.75 hours.
– The new system (with the new equipment)
m = 1/2 = 0.5 customers per hour.
 = 40/ 60 = 0.6667 hours.
47
VASSILIS’S TV REPAIR SHOP - Results
48
M / M / k / F Queuing System
• Many times queuing systems have designs that
limit their line size.
• When the potential queue is large, an infinite
queue model gives accurate results, even
though the queue might be limited.
• When the potential queue is small, the limited
line must be accounted for in the model.
49
Characteristics of M/M/k/F Queuing System
• Poisson arrival process at mean rate l.
• k servers, each having an exponential service
time with mean rate m.
• Maximum number of customers that can be
present in the system at any one time is “F”.
• Customers are blocked (and never return) if
the system is full.
50
M/M/k/F Queuing System –
Effective Arrival Rate
•
•
•
A customer is blocked if the system is full.
The probability that the system is full is PF (100PF% of
the arriving customers do not enter the system).
The effective arrival rate = the rate of arrivals that
make it through into the system (le).
le = l(1 - PF)
51
ANTONIS’S ROOFING COMPANY (1/3)
• Antonis gets most of its business from customers
who call and order service.
– When a telephone line is available but the secretary
is busy serving a customer, a new calling customer is
willing to wait until the secretary becomes available.
– When all the lines are busy, a new calling customer
gets a busy signal and calls a competitor.
52
Antonis’s ROOFING COMPANY (2/3)
• Data
– Arrival process is Poisson, and service process is
Exponential.
– Each phone call takes 3 minutes on the average.
– 10 customers per hour call the company on the
average.
– One appointment secretary takes phone calls from
3 telephone lines.
53
ANTONIS’S ROOFING COMPANY (3/3)
• Management would like to design the following system:
– The fewest lines necessary.
– At most 2% of all callers get a busy signal.
• Management is interested in the following information:
– The percentage of time the secretary is busy.
– The average number of customers kept on hold.
– The average time a customer is kept on hold.
– The actual percentage of callers who encounter a busy signal.
54
ANTONIS’S ROOFING COMPANY Solution
M/M/1/4
system
• This isM/M/1/5
an M/M/1/system
3 system
• Input
l = 10 per hour.
See spreadsheet next
= 20 per
(1/3 per
P0 = m0.516,
P1 =hour
0.258,
P2 =minute).
0.129, P3 = 0.065, P4 = 0.032
• Excel spreadsheet gives:
P0 = 0.508, PP1 ==0.254,
PP2 == 0.133,
0.127,PP3= =0.06
0.063, P4 = 0.032
0.533,
1
3.2% of 0the customers
get the3 busy signal
P5 = 0.016
Still
above
the
goal
of
2%
6.7% of the
customers
get
a
busy
signal.
1.6% of the customers get the busy signal
The goal
of 2%
has been achieved.
This is above
the goal
of 2%.
55
ANTONIS’S ROOFING COMPANY Spreadsheet Solution
56
Probability Analysis, F=1, 2, 3, 4, 5
57
Sensitivity Analysis for F
58
M / M / 1 / / m Queuing Systems
• In this system the number of potential customers is
finite and relatively small.
• As a result, the number of customers already in the
system affects the rate of arrivals of the remaining
customers.
• Characteristics
– A single server.
– Exponential service time, Poisson arrival process.
– A population size of a (finite) m customers.
59
Progress Homes
• Progress Homes runs four different development projects.
• Data
– At each site running a project is interrupted once every 20 working
days on the average.
– The V.P. for construction handles each stoppage.
• How long on the average a site is non-operational?
– If it takes 2 days on the average to restart a project’s progress (the
V.P. is using the current car).
– If it takes 1.875 days on the average to restart a project’s progress
(the V.P. is using a new car)
60
Progress Homes – Solution
• This is an M/M/1//4 system, where:
– The four sites are the four customers.
– The V.P. for construction is the server.
• Input
l = 0.05
m = 0.5
(1/2 days, using the current car)
(1/20)
m = 0.533
(1/1.875 days, using a new car).
61
Progress Homes – Computer Output
62
Progress Homes – Summary of Results
Performance
Measures
Average number of customers in the system
Average number of customers in the queue
Average number of days a customer is in the system
Average number of days a customer is in the queue
The probability that an arriving customer will wait
Oveall system effective utilization-factor
The probability that all servers are idle
L
Lq
W
Wq
Pw
r
Po
Current
New
Car
Car
0,467
0,113
2,641
0,641
0,353
0,353
0,647
0,435
0,100
2,437
0,562
0,334
0,334
0,666
63
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.
64
WILSON FOODS (1/2)
• Wilson Foods has an 800 number to answer
customers’ questions.
• If all the customer representatives are busy when a
new customer calls, he/she is asked to stay on the
line.
• A customer stays on the line if the waiting time is
not longer than 3 minutes.
65
WILSON FOODS (2/2)
• Data
–
–
–
–
–
On the average 225 calls per hour are received.
An average phone call takes 1.5 minutes.
A customer will stay on the line waiting at most 3 minutes.
A customer service
representative
is paid $16 per hour.
How many
customer
Wilson pays service
the telephone
company $0.18 per minute when the
representatives
customer is on hold or when being served.
should be used
– Customer goodwill cost is $0.20 per minute while on hold.
to minimize the
– Customer goodwill cost while in service is $0.05.
hourly cost of operation?
66
WILSON FOODS – Solution
• The total hourly cost model
Total hourly wages
Average hourly goodwill
cost for customers on hold
TC(K) = Cwk + CtL + gwLq + gs(L - Lq)
Total average
hourly Telephone charge
Average hourly goodwill
cost for customers in service
TC(K) = Cwk + (Ct + gs)Lq + (Ct + gs)(L – Lq)
67
WILSON FOODS – Solution continued
• Input
Cw= $16
Ct = $10.80 per hour
[0.18(60)]
gw= $12 per hour
[0.20(60)]
gs = $3 per hour
[0.05(60)]
– The Total Average Hourly Cost =
TC(K) = 16K + (10.8+3)L + (12 - 3)Lq = 16K + 13.8L + 9Lq
68
WILSON FOODS – Solution re-continued
• Assuming a Poisson arrival process and an Exponential
service time, we have an M/M/K system.
l = 225 calls per hour.
m = 40 per hour (60/1.5).
– The minimal possible value for K is 6 to ensure that
steady state exists (l<Km).
69
WILSON FOODS – Solution re-re-continued
Summary of results of the runs for k=6,7,8,9,10
K
6
7
8
9
10
L
18.1255
7.6437
6.2777
5.8661
5.7166
Lq
12.5
2.0187
0.6527
0.2411
0.916
Wq
0.05556
0.00897
0.0029
0.00107
0.00041
TC(K)
458.64
235.65
220.51
227.12
239.70
Conclusion: employ 8 customer service representatives.
70
WILSON FOODS – Results for k=6
71
WILSON FOODS – Sensitivity Analysis
72
Download