Waiting Times

advertisement
Waiting Times
Chapter 7
1
utdallas.edu/~metin
Learning Objectives
‹ Interarrival
and Service Times and their variability
‹ Obtaining the average time spent in the queue
‹ Pooling of server capacities
‹ Priority rules
utdallas.edu/~metin
2
Where are the queues?
utdallas.edu/~metin
3
A Queue is made of a server and a queue in front
Buffer
Input:
Passengers in an airport
Customers at a bank
Patients at a hospital
Callers at a call center
Arrival rate
Queues
Processing
Resources:
Check-in clerks at an airport
Tellers at a bank
Nurses at a hospital
Customer service representatives
(CRS) at a call center
Capacity
We are interested in the waiting times in the queue and the queue length.
utdallas.edu/~metin
An Example of a Simple Queuing System
Incoming
calls
Answered
Calls
Reps
processing
calls
Calls
on Hold
‹
Call center
‹
‹
Blocked calls
(busy signal)
Lost throughput
utdallas.edu/~metin
Abandoned calls
(tired of waiting)
Holding cost
Lost goodwill
Lost throughput (abandoned)
At peak, 80% of calls
dialed received a busy
signal.
Customers getting
through had to wait on
average 10 minutes
Extra phone line
expense per day for
waiting was $25,000.
Financial consequences
Cost of capacity
Cost per customer
$$$ Revenue $$$
5
A Somewhat Odd Service Process
Constant Arrival Rate (0.2/min) and Service Times (4 min)
Arrival
Time
Service
Time
1
0
4
2
5
4
3
10
4
4
15
4
5
20
4
6
25
4
7
30
4
8
35
4
9
40
4
10
45
4
11
50
4
12
55
4
Patient
7:00
utdallas.edu/~metin
7:10
7:20
7:30
7:40
7:50
8:00
6
Where is Variability?
‹ There
certainly is significant (actually infinite) amount
waiting when the arrival rate is greater than the service
rate
– Equivalently, the processing capacity is less than the flow rate
‹ More
interestingly, variability can cause long waiting
times. Variability in
–
–
–
–
Arrival process
Processing times
Availability of resources
Routing of flow units; Recall the Resume Validation Example.
utdallas.edu/~metin
7
Variability: Where does it come from? Examples
Tasks:
• Inherent variation
• Lack of Standard Operating Procedures
• Quality (scrap / rework)
Buffer
Processing
Input:
• Unpredicted Volume swings
• Random arrivals (randomness is the rule,
not the exception)
• Incoming quality
• Product Mix
Especially relevant in service operations
(what is different in service industries?):
• emergency room
• air-line check in
• call center
• check-outs at cashier
utdallas.edu/~metin
Resources:
• Breakdowns / Maintenance
• Operator absence
• Set-up times
Routes:
• Variable routing
• Dedicated machines
A More Realistic Service Process
Random Arrival Rate and Service Times
Arrival
Time
Service
Time
1
0
5
2
7
6
3
9
7
4
12
6
5
18
5
6
22
2
Patient
Patient 1 Patient 3
Patient 5 Patient 7
Patient 2
Patient 6
Patient 4
Patient 9
Patient 8
Patient 11
Patient 10
Patient 12
Time
7:00
7:10
7:20
7:30
7:40
7:50
8:00
7
25
4
8
30
3
9
36
4
10
45
2
11
51
2
12
55
3
Number of cases
3
2
1
0
2 min.
3 min.
4 min.
5 min.
Service times
utdallas.edu/~metin
6 min.
7 min.
9
Variability Leads to Waiting Time
Average Arrival Rate (0.2/min) and Service Times (4 min)
Arrival
Patient Time
Service
Time
Service time
1
0
5
2
7
6
3
9
7
4
12
6
5
18
5
6
22
2
7
25
4
8
30
3
9
36
4
5
10
45
2
4
11
51
2
12
55
3
Wait time
3
2
Inventory
(Patients at lab)
utdallas.edu/~metin
1
0
7:00
7:10
7:20
7:30
7:40
7:50
8:00
10
Is the incoming call rate stationary?
Number of customers
Per 15 minutes
160
140
120
100
80
60
40
20
utdallas.edu/~metin
23:00
21:15
19:30
17:45
16:00
14:15
12:30
10:45
9:00
7:15
5:30
3:45
2:00
0:15
0
Time
11
How to test for stationary?
Cumulative
Number of
Customers
Cumulative
Number of
Customers
700
70
600
60
500
50
Expected arrivals
if stationary
400
40
300
30
200
Actual, cumulative
arrivals
20
100
10
0
0
6:00:00
7:00:00
8:00:00
9:00:00
10:00:00
Time
utdallas.edu/~metin
7:15:00
7:18:00
7:21:00
7:24:00
7:27:00
7:30:00
Time
12
Exponential distribution for Interarrival times
Probability{Interarrival time ≤ t}
Number of calls with given duration t
100
90
80
70
60
50
40
30
20
1
0.8
0.6
0.4
0.2
10
0
0
time
Duration t
Prob { IA <=t } = 1-exp(-t/a)
E(IA)=a, expected time between arrivals
StDev(IA)=a
utdallas.edu/~metin
13
Comparing empirical and theoretical distributions
Distribution Function
1
Exponential distribution
0.8
0.6
0.4
Empirical distribution
0.2
-
0
0:00:00
utdallas.edu/~metin
Interarrival time
0:00:09
0:00:17
0:00:26
0:00:35
0:00:43
0:00:52
0:01:00
0:01:09
14
Analyzing the Arrival Process
‹ CVa=StDev(IA)/E(IA)
Stationary
Arrivals?
YES
NO
Exponentially distributed
inter-arrival times?
YES
• Compute a: average interarrival time
• CVa=1
• All results of chapters 7 and 8 apply
utdallas.edu/~metin
Break arrival process up
into smaller time
intervals
NO
• Compute a: average interarrival time
• CVa= St.dev. of interarrival times / a
• Results of chapter 7 or 8 do not apply,
require simulation or more complicated models
15
Analyzing the Service Times
Seasonality and Variability
Call duration
[minutes]
2.5
Week-end averages
2
1.5
Week-day averages
1
0.5
Time of the
day
0
0:00
23:00
800
Frequency
600
CVp: Coefficient of variation
of service times
400
200
Std. Dev = 141.46
Mean
127.2
Call =durations
N = 2061.00
0
utdallas.edu/~metin
[seconds]
A
16
Computing the expected waiting time Tq
Inventory
waiting Iq
Inventory
in service Ip
Inflow
Outflow
Entry to
system
Begin
Service
Waiting Time Tq
Departure
Service Time p
Flow Time T=Tq+p
utdallas.edu/~metin
17
Utilization
FlowRate 1 / a p
Utilizatio n = u =
=
=
Capacity 1 / p a
Example: Average Activity time=p=90 seconds
Average Interarrival time=a=300 seconds
Utilization=90/300=0.3=30%
utdallas.edu/~metin
18
The Waiting Time Formula
Waiting Time Formula for Exponential Arrivals
2
2
⎛ utilization ⎞ ⎛⎜ CVa + CV p ⎞⎟
Time in queue = Activity Time ∗⎜
⎟∗⎜
⎟
2
⎝ 1 − utilization ⎠ ⎝
⎠
Variability factor
Utilization factor
Service time factor
Example: Average Activity time=p=90 seconds
Average Interarrival time=a=300 seconds
CVa=1 and CVp=1.333
2
2
⎛ 0.3 ⎞ ⎛ 1 + 1.333
Average time in queue = 90 ∗⎜
⎟∗⎜⎜
2
⎝ 1 − 0 .3 ⎠ ⎝
utdallas.edu/~metin
⎞
⎟⎟ = 53 .57 sec
⎠
19
Bank Teller Example
‹
An average of 10 customers per hour come to a bank teller who serves each
customer in 4 minutes on average. Assume exponentially distributed
interarrival and service times.
(a) What is the teller’s utilization?
(b) What is the average time spent in the queue waiting?
(c) How many customers would be waiting for this teller or would be serviced by this
teller on average?
(d) On average, how many customers are served per hour?
Answer: p=4 mins; a=6 mins=60/10
p 4
= = 0.66
a 6
2
2
⎛ 0.66 ⎞ ⎛ 1 + 1 ⎞
⎟⎟ = 8
b) Tq = 4 ∗⎜
⎟∗⎜⎜
1
−
0
.
66
2
⎝
⎠⎝
⎠
a) u =
utdallas.edu/~metin
⎛1⎞
⎛1⎞
c) I =⎜ ⎟ * (Tq + p) = ⎜ ⎟ * (8 + 4) = 2
⎝a⎠
⎝6⎠
d) If teller is busy wp2/3, outputs15 per hour.
If teller is idle wp1/3, outputs 0 per hour.
Averageoutput = (2/3)*15 + (1 / 3) * 0 = 10 per hour = Averageinput !!!
20
The Flow Time Increase Exponentially in Utilization
Average flow
time T
Increasing
Variability
Theoretical Flow Time
Utilization
utdallas.edu/~metin
100%
21
Computing Tq with m Parallel Servers
Inventory in the system I=Iq+ Ip
Inventory
in service Ip
Inventory
waiting Iq
Outflow
Inflow
Entry to system
Begin Service
Waiting Time Tq
Departure
Service Time p
Flow Time T=Tq+p
utdallas.edu/~metin
22
Utilization with m servers
1/ a
FlowRate
p
=
=
Utilizatio n = u =
Capacity
m/ p a m
Example: Average Activity time=p=90 seconds
Average Interarrival time=a=11.39 secs over 8-8:15
m=10 servers
Utilization=90/(10x11.39)=0.79=79%
utdallas.edu/~metin
23
Waiting Time Formula for Parallel Resources
Approximate Waiting Time Formula for Multiple (m) Servers
2
2
2 ( m +1) −1 ⎞
⎛
⎛
⎞
+
CV
CV
⎛ Activity time ⎞ ⎜ utilization
a
p
⎟
⎜
⎟
∗
Time in queue ≅⎜
⎟∗⎜
⎟
m
2
⎝
⎠ ⎝ 1 − utilization ⎟⎠ ⎜⎝
⎠
Example: Average Activity time=p=90 seconds
Average Interarrival time=a=11.39 seconds
m=10 servers
CVa=1 and CVp=1.333
2 (10 +1) −1 ⎞
2
2
⎛
⎞
1
1
.
333
+
⎛ 90 ⎞ ⎛⎜ 0.79
⎟
⎟⎟ = 24 .94 sec
Time in queue ≅⎜ ⎟∗
∗⎜⎜
⎜
⎟
2
⎝ 10 ⎠ ⎝ 1 − 0.79 ⎠ ⎝
⎠
T = Tq + p = 24 .94 + 90 = 114 .94 sec = 1.916 min
utdallas.edu/~metin
24
Online Retailer Example
Customers send emails to a help desk of an online retailer every 2
minutes, on average, and the standard deviation of the inter-arrival time
is also 2 minutes. The online retailer has three employees answering
emails. It takes on average 4 minutes to write a response email. The
standard deviation of the service times is 2 minutes.
(a) Estimate the average customer wait before being served.
(b) How many emails would there be -- on average -- that have been
submitted to the online retailer, but not yet answered?
Answer: a=2 mins; CVa=1; m=3; p=4 mins; CVp=0.5
a) Find Tq. b) Find Iq=(1/a)Tq
utdallas.edu/~metin
25
Service Levels in Waiting Systems
Fraction of
customers who
have to wait x
seconds or less
90% of calls had to
wait 25 seconds or
less
1
Waiting times for those customers
who do not get served immediately
0.8
0.6
0.4
Fraction of customers who get served
without waiting at all
0.2
0
0
50
100
150
200
Waiting time [seconds]
• Target Wait Time (TWT)
• Service Level = Probability{Waiting Time≤TWT}; needs distribution of waiting time
• Example: Deutsche Bundesbahn Call Center
- now (2003): 30% of calls answered within 20 seconds
- target: 80% of calls answered within 20 seconds
utdallas.edu/~metin
26
Bank of America’s Service Measures
utdallas.edu/~metin
27
Waiting Lines: Points to Remember
• Variability is the norm, not the exception
- understand where it comes from and eliminate what you can
- accommodate the rest
• Variability leads to waiting times although utilization<100%
• Use the Waiting Time Formula to
- get a qualitative feeling of the system
- analyze specific recommendations / scenarios
• Adding capacity is expensive, although some safety capacity is necessary
• Next case:
- application to call center
- use CV=1
- careful in interpreting March / April call volume
utdallas.edu/~metin
Summary of the formulas
1. C ollect the follow ing data:
- num ber of servers, m
- activity tim e, p
- interarrival tim e, a
- coefficient of v ariation for interarrival (C V a ) and processin g tim e (C V p )
2. C om pute utilization: u=
p
a×m
3. C om pute ex pected w aiting tim e
2 ( m + 1 ) −1
⎛ Activity time ⎞ ⎛⎜ utilizatio n
T q =⎜
⎟× ⎜
m
⎠ ⎝ 1 − utilizatio n
⎝
⎞ ⎛ CV a2 + CV
⎟× ⎜
⎟ ⎜
2
⎠ ⎝
2
p
⎞
⎟
⎟
⎠
4. B ased on T q , w e can com pute the rem ainin g perform ance m easu res as
F low tim e T = T q + p
Inventory in service I p = m *u
Inventory in the qu eue= I q = T q /a
Inventory in the system I= I p + I q
utdallas.edu/~metin
29
Staffing levels
Cost of direct labor per serviced unit
Cost of Direct Labor =
Total wagesper time
m x (wagesper time) p x (wagesper time)
=
=
Flow rate = Arrivalrate
1/a
u
Ex: $10/hour wage for each CSR; m=10
Activity time=p=90 secs; Interarrival time=11.39 secs
1-800 number line charge $0.05 per minute
p
90
=
= 0.79
m x a 10 x11.39
1.5 min/call x (16.66 cents/min)
= 31.64 cents/call
Cost of Direct Labor =
0.79
Recall T = 1.916; Cost of line charge per call = 1.916 x 0.05 = $0.0958 / call
Utilization = u =
utdallas.edu/~metin
30
Cost of Staffing Levels
m
u
Labor cost Line cost
Total cost
charge per call per call
per call
8
1.3458
9
0.4201
10 0.790
0.3164
0.0958
0.4122
11
0.4323
12
0.4593
13
0.4887
14
0.5193
15
0.5503
The optimal staffing level m=10
utdallas.edu/~metin
31
Staffing Levels under various Interarrival Times
Number of
CSRs
Number of customers
Per 15 minutes
160
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
140
120
100
80
60
40
20
utdallas.edu/~metin
Time
23:00
21:15
19:30
17:45
16:00
14:15
12:30
10:45
9:00
7:15
5:30
3:45
2:00
0:15
0
32
The Power of Pooling
Independent Resources
2x(m=1)
Waiting
Time Tq
70.00
m=1
60.00
50.00
40.00
m=2
30.00
20.00
m=5
Pooled Resources
(m=2)
10.00
m=10
0.00
60%
65% 70%
75%
Implications:
+ balanced utilization
80%
85%
90%
95%
Utilization u
+ Shorter waiting time (pooled safety capacity)
utdallas.edu/~metin
- Change-overs / set-ups
Service-Time-Dependent Priority Rules
• Flow units are sequenced in the waiting area (triage step)
• Shortest Processing Time (SPT) Rule
- Minimizes average waiting time
• Do you want to wait for a short process or a long one?
A
Service times:
A: 9 minutes
B: 10 minutes
C: 4 minutes
D: 8 minutes
C
B
9 min.
19 min.
23 min.
4 min.
D
12 min.
C
D
Total wait time: 9+19+23=51min
21 min.
B
Total wait time: 4+12+21=37 min
• Problem of having “true” processing times
utdallas.edu/~metin
A
Service-Time-Independent Priority Rules
•Sequence based on importance
- emergency cases; identifying profitable flow units
•First-Come-First-Serve
- easy to implement; perceived fairness
•The order in which customers are served does Not affect the average waiting time.
•W(t): Work in the system
•An arrival at t waits until the work W(t) is completed
W(t)
p2
p1
utdallas.edu/~metin
First
arrival
Second
arrival
Last
departure
Time t
Service-Time-Independent Order does not
affect the waiting time
Order: 1-1-2
Order: 1-2-1
W(t)
W(t)
First finishes
Time t
Second finishes
Time t
Work is conserved even when the processing order changes.
No matter what the order is, the third arrival finds the same amount of work W(t).
utdallas.edu/~metin
Summary
‹ Interarrival
and Service Times and their variability
‹ Obtaining the average time spent in the queue
‹ Pooling of server capacities
‹ Priority rules
utdallas.edu/~metin
37
Download