39
Lecture 5: Fluid Models Service Engineering Galit B. Yom-Tov

Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Lecture 5: Fluid Models

Service Engineering

Galit B. Yom-Tov

Page 2: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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.

Page 3: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Current waiting time in ER

Page 4: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Sample Path vs. Averages

From “Predicting Emergency Department Status” Houyuan Jiang, Lam Phuong Lam, Bowie Owens, David Sier, and Mark Westcott

Page 5: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Predictable vs. Unpredictable

Page 6: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Time variation of the mean vs. process variability

Page 7: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Predictable Variability

From “Predicting Emergency Department Status” Houyuan Jiang, Lam Phuong Lam, Bowie Owens, David Sier, and Mark Westcott

Page 8: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Predictable variability

Page 9: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

From Empirical Models to Fluid Models

• Recall Empirical Models, cumulative arrivals and departure functions.

• For large systems (bird’s eye) the functions look smoother.

Page 10: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

The Bird’s Eye

• Movies:

– Road transportation

– Air transportation

– Visa add

Page 11: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 12: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Phases of Congestion via Cumulates Hall, pg 189:

Page 13: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Four points of view

• Cumulates

• Rates (⇒ Peak Load)

• Queues (⇒ Congestion)

• Outflows (⇒ end of rush-hour)

Page 14: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Phases of Congestion via Rates

• Time-lag

• Change Service Rate

Page 15: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 16: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 17: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 18: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 19: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 20: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 21: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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.

Page 22: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Primitives

Page 23: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires
Page 24: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Confidence interval are calculated using Diffusion approximations

Page 25: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires
Page 26: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires
Page 27: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires
Page 28: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

National Cranberry

Page 29: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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.)

Page 30: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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.?

Page 31: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Flow Diagram: National Cranberry

Page 32: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Total inventory build-up: Wet berries (bins & trucks)

Processing capacity 600 bbl/hr; Start at 11:00; Peak day 18k*70% over 12 hours.

Page 33: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

Trucks inventory build-up Wet berries

Page 34: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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[

Page 35: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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

Page 36: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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.

Page 37: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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.

Page 38: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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.

Page 39: Lecture 5: Fluid Modelsserveng/course2013spring... · 2013. 4. 28. · National Cranberry Case Study •A peak day: –18,000 bbl (barrels of 100 lbs. each) –70% wet harvested (requires

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