Queueing Theory and Its Applications

advertisement
Queueing Theory and Its
Applications
John A. Buzacott, Ph.D., Dr.h.c.
York University
Toronto, Canada
Outline
•
•
•
•
•
Motivation
Basic ideas
Applications
Key insights
The future
Everyday Queues
• Fast Food – McDonalds, Burger King,…
• Retail – supermarkets, stores, banks
• Medical – doctor’s office, access to
diagnostic procedures, specialist referrals
• Airports – check-in, baggage collection,
runway delays, waiting to land
• Traffic - congestion
Queues in Manufacturing
• Order backlogs
• Work in process inventories
• Distribution inventories
• Often queue (inventory) size is limited
– Number of Kanbans limits work in process
– Fixed number of AGVs circulate in a loop
Queueing Theory - Basics
• What determines queue lengths and waiting
times?
arrivals
•
(customers,
jobs)
queue
server
departures
Arrival rate=λ = 1/mean time between arrivals
Service rate = µ= 1/mean time to serve one customer
Key Ideas
• Queue length, waiting time determined by
(1) Utilization of server = ρ = λ/µ
= Job arrival rate × mean time to serve each job
(2) Variability of arrivals (lowest with equally
spaced arrivals)
(3) Variability of service time (lowest is when all
jobs require exactly the same time)
Sources of Service Time Variability
• Server not consistent (some variability inherent in
all repetitive tasks: depends on task (cognitive)
complexity)
• Different people performing same task have
different mean times (best 2×worst in manual
assembly tasks, ratio increases with task
complexity)
• Mixture of different customer types, each type
takes a different time
Finite Queues
• Call centers, hospitals
– Number of waiting spaces is finite (and fixed)
– If waiting spaces occupied arrivals are lost
• Quality of Service measures:
– Fraction of calls accepted
– Number of attempts to obtain service
– Fraction of customers served within 5 minutes (How
does a manager behave to meet this type of service
target?)
Closed Queue
2
1
3
4
Finite number of customers circulate in system
- Pallets in a manufacturing cell
- Kanban cards
Parallel Servers
How to allocate jobs
to servers?
1
Design: How to allocate
tasks to servers
2
3
4
Sometimes have
to match jobs
after service –
“Split and match”
Queueing Theory
• Why bother?
– It is complex math
– It is theory!
– Simulation is better and easier to understand
• What insights does it give?
– Importance of controlling and reducing variability (similar to
TQM)
• What applications does it have?
– How to reduce queues or perceptions of waiting
– How to design systems to reduce impact of variability
Number
Some Basic Theory
(1) L = λ×W
10
9
8
7
6
5
4
3
2
1
0
Arrivals
Departures
L(15)
W(2)
0
L=∫L(t)dt/T
W=∑W(n)/N
5
10
15
20
Time
∫L(t)dt =∑W(n)
L=W×N/T=W×λ
(2) Average Queue Length Formulae
• M/M/1:
ρ
L=
1− ρ
• M/G/1
ρ (1 + C )
L=
+ρ
2(1 − ρ )
2
2
S
ρ 2 (1 + C S2 ) (C a2 + ρ 2 C S2 )
+ρ
• G/G/1: (approx) L =
2
2
2 (1 − ρ ) (1 + ρ C S )
(3) Loss Systems
Fraction served less than t
Impact of varying queue size limit
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
t=10
t=5
t=2
0
0.2
0.4
0.6
0.8
Fraction admitted
Fraction admitted = 1-ρn
ρ=0.9
1
Applications
• Validating complex simulation models;
• Developing easy-to-implement models that help
narrow alternatives in the initial stages of system
design;
• Providing insights into the importance and impact
of variability in manufacturing and services;
• Suggesting alternative ways of structuring a
system and allocating tasks to people and
machines
Simulation Verification
• Verification: Model gives correct answers for
given assumptions
• Queueing theory applications:
– Checking consistency of performance measures
• L=λ×W
• ρ=λ×(1/µ)
– Comparing performance with queueing formulae
– Checking performance within bounds derived using
queueing theory
– Perturbation analysis: what if change a parameter by a
small amount?
Number
Checking consistency of measures
L = λ×W
9
8
7
6
5
4
3
2
1
0
end
start
Arrivals
Departures
0
5
10
15
20
L based on blue + yellow Time
W based on blue + green (number departing in interval)
Note: two areas not the same so L=λ×W not true
Bounds
• General single server
queue:
(1 − (1 − ρ ) 2 )Ca2 + ρ 2CS2
L≤
+ρ
2(1 − ρ )
If times between arrivals are DMRL (longer time since last
arrival, more likely arrival will occur)
ρ 2Ca2 + ρ 2CS2
+ρ
L≤
2(1 − ρ )
Useful: but hard to find bounds in literature or derive new bounds
Sample Path Approach
1
2
3
4
5
6
A1
A2
A3
A4
A5
A6
S1
S2
D1
S3
D2
S5
S4
D3
arrivals
D4
S6
D5 D6
Dn = S n + max(Dn −1, An )
Equation describes simulation directly, can use to see impact of
changes in parameters, e.g., increasing service time
System Design: Manufacturing (1)
• How many machines per operator
(machining, weaving):
– Balance between operator utilization and
throughput
– Same model describes productivity of cranes
and soaking pit/rolling mill system in
steelmaking
– Idea of model: Closed queue (fixed number of
customers)
Central Server Queue
1
Machines
2
3
4
Repairman
System Design: Manufacturing (2)
• What buffers are needed in flow
lines/transfer lines?:
– With none, any failure stops the line
– As buffer capacity increases, throughput
increases
– As variability of repair time increases, benefit
of a given buffer capacity diminishes
– If one stage much worse than rest, buffers not
much help
Flow Lines with Limited Buffers
Server blocked when storage spaces are full
1
2
3
Model (approximate) by viewing system as two 2-stage lines
1
2,1 = machine 2 + impact
of machine 1 on 2
2,3
2,1
2,3 = machine 2 + impact of
machine 3 on 2
3
System Design: Manufacturing (3)
• FMS Design Issues:
– Number of pallets required to achieve throughput
• Closed queue model
– Impact of product mix
• Products with widely different processing times cause great
variability in processing times
– Results in lowered throughput
• Multiple pallet types cause problems
– Increasing number of pallets for type A products reduces
throughput of type B products if type B uses different pallets
• Insight: FMS best for a single product family (small cell)
– Cannot handle well wide product variety (in spite of claims by
their protagonists in the 1970’s and 1980’s)
System Design: Manufacturing (4)
• What to do about job shops?:
– Job shops with a wide variety of different jobs perform
poorly
• High WIP
• Long delays and backlogs
– Insight: Due to interaction of processing time
variability and routing variability
• High processing variability: better to have high routing
variability
• Low processing variability: better to have low routing
variability
• High variability often comes from mixing jobs with short and
long processing times
Applications in Services
• Manufacturing:
– Most tasks require specialized machinery so
worker’s jobs defined by machinery
– Tasks to make a product defined when product
designed, so known before order arrives
• Services:
– Many possible task packages for each worker
– Don’t know what tasks customers require until
they arrive
Service System Design
Alternatives
• Specialization
– Customer type
– Task type
• Diagnosis (How can I help you?)
– Specialize:
• High level (Lawyers)
• Mid level (Car dealer service)
• Low level (receptionist, help lines)
– Part of service provision/rectification
• May forward to a more specialized worker if proves too
complex (family practitioner)
Using Multiple Servers
• With more than one server can be creative
about coping with variability
• All servers do same tasks
– Single queue (airline check-in/banks) vs
separate queues (McDonalds)
– Queueing theory: single queue better
• Practical issues
McDonald’s
Prepare food
Store prepared food
Assemble order, deliver,
dispense drinks, pay
Order
Burger King*
Prepare food, assemble order
(electronic
communication)
Deliver food
Dispense drinks
Order
+ pay
Freshly prepared food, preparation
in parallel with pay
* Some outlets only - others use McDonald’s format
Specialization
• Specialize some servers to specific
customer classes:
– (1) Customers know which server to go to:
• Bank: deposits vs investments
• Call center menus
– (2) Customers don’t know who to go to:
• Lawyers, doctors, etc.
• Help desks
• How much specialization should be used?
Problem Solving Approaches
1
Refer hard
problems
1-p
p
2
3
Servers
deal with
all problems
1
2
p
p
“manager”
As p decreases solution time increases
3
4
“Managers” should deal with hard
problems
20
Total Queue Length
Do everything
15
No Management
10
ReferManagement
problems
5
0
0
0.2
0.4
0.6
0.8
1
p
Fraction of arrivals that are problems
Supply Chain Coordination:
Modelling Material and Information Flow
Order Tags
s
6
u
u
u Store m − 1
6
(m−1)
PA
@
@
+ τm−1
Cards
@
H
HH @
Process
HH@
Tags
? Reqn.
H@
H Mgmt u Tags
'$
(m)
Parts
(m)
Rk
- material
Order Tags
(m)
Ak
A
k
s
-?
- -
Dk
(m)
Ak
- Cell m
(m)
Dk
&%
- information
s
6
u
u
6
Ak
Store m
- Products
Split and match queues: information and material
?
u
u
u
s -?
(m+1)
Rk
Key Insights
• Plan how to cope with variability
– Service times
– Arrivals
– Routing
• Try not to accentuate variability by mixing
long and short tasks, particularly if long
tasks are relatively rare
The Future
• Applications:
– Service system design insights
– Rapid modelling of system alternatives
• Spreadsheet implementation
• Theory:
– Bounds
– Controls and priorities
• When is scheduling worthwhile?
Download