Lecture 5: Fluid Models
Service Engineering
Galit B. Yom-Tov
Content
• Predictable Variability: Call Centers, Transportation, Emergency Department.
• Four “pictures”: rates, queues, outflows, cumulative graphs.
• Phases of Congestion. • From Data to Models: Scales. (Movies) • A fluid model of one station queue. • A fluid model of call centers with abandonment and
retrials. • Bottleneck Analysis, via National Cranberry
Cooperative. • Summary of the Fluid Paradigm.
Current waiting time in ER
Sample Path vs. Averages
From “Predicting Emergency Department Status” Houyuan Jiang, Lam Phuong Lam, Bowie Owens, David Sier, and Mark Westcott
Predictable vs. Unpredictable
Time variation of the mean vs. process variability
Predictable Variability
From “Predicting Emergency Department Status” Houyuan Jiang, Lam Phuong Lam, Bowie Owens, David Sier, and Mark Westcott
Predictable variability
From Empirical Models to Fluid Models
• Recall Empirical Models, cumulative arrivals and departure functions.
• For large systems (bird’s eye) the functions look smoother.
The Bird’s Eye
• Movies:
– Road transportation
– Air transportation
– Visa add
From Empirical Models to Fluid Models
• Derived directly from event-based (call-by-call) measurements.
• For example, an isolated service-station: – A(t) = cumulative # arrivals from time 0 to time t;
– D(t) = cumulative # departures from system during [0, t];
– L(t) = A(T) − D(t) = # customers in system at t.
Arrivals and Departures from a Bank Branch Face-to-Face Service
Phases of Congestion via Cumulates Hall, pg 189:
Four points of view
• Cumulates
• Rates (⇒ Peak Load)
• Queues (⇒ Congestion)
• Outflows (⇒ end of rush-hour)
Phases of Congestion via Rates
• Time-lag
• Change Service Rate
Aggregate Planning via “cumulative picture”
A(•): given and seasonal
What should be the service rate?
• Option a) Chase demand D=A – Costly, variable workforce
• Option b) Constant workforce with no queue – Excess capacity
• Option c) Least constant capacity that accommodate all arrivals (no queue at end)
• Option d) Add capacity during peak hours
Queueing System as a Tub (Hall, p.188)
• A(t) – cumulative arrivals function. • D(t) – cumulative departures function. • – arrival rate. • – processing (departure) rate. • c(t) – maximal potential processing rate. • q(t) – total amount in the system.
Fluid Models: General Setup
)()( tDt
)()( tAt
Mathematical Fluid Models
Deferential equations:
• λ(t) – arrival rate at time t ∈ [0,T].
• c(t) – maximal potential processing rate.
• δ(t) – effective processing (departure) rate.
• q(t) – total amount in the system.
Then q(t) is a solution of
].,0[,)0();()()( 0 Ttqqtttq
Mathematical Fluid Models: Multi-server queue
• n(t) statistically-identical servers, each with service rate μ.
• c(t) = μn(t): maximal potential processing rate.
• : processing rate.
i.e.,
How to actually solve? Discrete-time approximation: Start with Then, for
].,0[,)0());(),(min()()( 0 Ttqqtqtnttq
.))(),(min()()()( 1111 ttqtntttqtq nnnnn
))(),(min()( tqtnt
.)(,0 000 qtqt :1 ttt nn
.))(),(min()()0()(00 tt
duuqunduuqtq
Mathematical Fluid Models: Multi-server queue with abandonment
• θ – Abandonment rate of customers in queue
• Processing rate:
• The fluid model:
].,0[,)0(
;)]()([))(),(min()()(
0 Ttqq
tntqtqtnttq
)]()([))(),(min()( tntqtqtnt
Fluid Model as Approximation
• Let Q(t) be the number of customer in a queue. (Q(t) is a random process)
• Increase the arrival rate and the capacity, such that and define as the number of customer in the “η” queue.
• Then by the Functional Strong Law of Large Numbers, as
uniformly on compacts, a.s. given convergence at t=0.
(the fluid approximation) is the solution to the differential balance equations of the system.
,, tttt nn
,
),()(1 )0( tQtQ
)(tQ
)()0( tQ
Example: Time-varying analysis
“Fluid Models and Diffusion Approximations for Time-Varying Queues with Abandonment and Retrial” Based on a series of papers of Bill Massey, Avishai Mandelbaum, Marty Reiman, Brian Rider, and Sasha Stolyar.
Primitives
Confidence interval are calculated using Diffusion approximations
National Cranberry
Queue Build-up Diagram: National Cranberry Case Study
• A peak day: – 18,000 bbl (barrels of 100 lbs. each)
– 70% wet harvested (requires drying)
– Trucks arrive from 7:00 a.m., over 12 hours
– Processing starts at 11:00 a.m.
– Processing bottleneck: drying, at 600 bbl per hour (Capacity = max. sustainable processing rate)
– Bin capacity for wet: 3200 bbl’s
– 75 bbl per truck (avg.)
Queue Build-up Diagram: National Cranberry Case Study
• Draw inventory build-up diagrams of wet berries, arriving to RP1.
• Identify berries in bins; where are the rest? Analyze it!
• Q: Average wait of a truck?
• Process (bottleneck) analysis:
– What if buy more bins? buy an additional dryer?
– What if start processing at 7:00 a.m.?
Flow Diagram: National Cranberry
Total inventory build-up: Wet berries (bins & trucks)
Processing capacity 600 bbl/hr; Start at 11:00; Peak day 18k*70% over 12 hours.
Trucks inventory build-up Wet berries
Trucks queue analysis
• Area over curve =
Divide by 75. • Truck hours waiting = 40,533/75 bbl/truck = 540
truck•hours • Ave throughput rate =
• Ave WIP = 540/162/3=32.4 trucks (a “biased”
average) • Given that a truck waits, it will wait on average
32.4/7.52 = 4.3 hours (Little’s Law)
hoursbbl 533,403
2746002
18]46001000[
2
111000
2
1
hourtrucks/52.7]753
216/[]3
21560010[
Total inventory build-up: Wet berries
Processing capacity 600 bbl/hr; Start at 7:00; Peak day 18k*70% over 12 hours.
# trucks in queue
5
17
29
Total inventory build-up: Wet berries
Processing capacity 800 bbl/hr (i.e., add 4th dryner); Start at 7:00; Peak day 18k*70% over 12 hours.
Summery
• More examples: EOQ (inventory models) • Service analogy:
– Front-office + back-office (banks, telephones) – Hospitals (operating rooms, recovery rooms) – Ports (inventory in ships; bottlenecks = unloading crews,
router) – More?
• Reminder: Bottleneck operation – Add resources, use alternative resources, reduce setup
(change IT system), reduce wasted times (e.g., synchronization), improve work conditions, work overtime, subcontract, higher skilled personnel.
Summery: Types of Queues • Perpetual Queues: every customers waits.
– Examples: public services (courts), field-services, operating rooms, . . .
– How to cope: reduce arrival (rates), increase service capacity, reservations (if feasible), . .
– Models: fluid models.
• Predictable Queues: arrival rate exceeds service capacity during predictable time-periods.
– Examples: Traffic jams, restaurants during peak hours, accountants at year’s end, popular concerts, airports (security checks, check-in, customs) . . .
– How to cope: capacity (staffing) allocation, overlapping shifts during peak hours, flexible working hours, . . .
– Models: fluid models, stochastic models.
• Stochastic Queues: number-arrivals exceeds servers’ capacity during stochastic (random) periods.
– Examples: supermarkets, telephone services, bank-branches.
– How to cope: dynamic staffing, information (e.g. reallocate servers), standardization (reducing std.: in arrivals, via reservations; in services, via TQM) ,. . .
– Models: stochastic queueing models.
Summery: Why Fluid models? • Predictable variability is dominant (std<<Mean) • The value of the fluid-view increases with the complexity of
the system from which it originates • Legitimate models of flow systems
– Often simple and sufficient; empirical, predictive • Capacity analysis • Inventory build-up diagrams • Mean-value analysis
• Approximations – First-order fluid approximation of stochastic systems
• Strong laws of large numbers (vs. second-order diffusion approximation, Central limits)
– Long-run • Long horizon, smooth-out variability (strategic)
• Technical tools – Lyapunov functions to establish stability (Long-run) – Building blocks for stochastic models