The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf ·...

88
Service Engineering November 30, 2005 The ”Fluid View” , or Flow Models Introduction: Legitimate models: Simple, General, Useful Approximations (strong) Tools Scenario analysis vs. Simulation, Averaging, Steady-State Typical scenario, or very atypical (eg. ”catastrophy”) Predictable Variability Averaging scenarios, with small “CV” A puzzle (the human factor state dependent parameters) Sample size needed increases with CV Predictable variability could also turn unpredictable Hall: Chapter 2 (discrete events); 4 Pictures: Cummulants Rates (Peak Load) Queues (Congestion) Outflows (end of rush-hour) Scales (Transportation, Telephone (1976, 1993, 1999)) Simple Important Models: EOQ, Aggregate Planning Skorohod’s Deterministic Fluid Model (of a service station): teaching note Phases of Congestion: under-, over- and critical-loading. Rush Hour Analysis: onset, end Mathematical Framework in approximations Queues with Abandonment and Retrials (=Call Centers; Time- and State-dependent Q’s). Bottleneck analysis in a (feed-forward) Fluid Network, via National Cranberry Fluid Networks (Generalizing Skorohod): The Traffic Equations Addendum 1

Transcript of The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf ·...

Page 1: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Service Engineering November 30, 2005

The ”Fluid View”, or Flow Models

• Introduction:

– Legitimate models: Simple, General, Useful

– Approximations (strong)

– Tools

• Scenario analysis

– vs. Simulation, Averaging, Steady-State

– Typical scenario, or very atypical (eg. ”catastrophy”)

• Predictable Variability

– Averaging scenarios, with small “CV”

– A puzzle (the human factor ⇒ state dependent parameters)

– Sample size needed increases with CV

– Predictable variability could also turn unpredictable

• Hall: Chapter 2 (discrete events);

• 4 Pictures:

– Cummulants

– Rates (⇒ Peak Load)

– Queues (⇒ Congestion)

– Outflows (⇒ end of rush-hour)

• Scales (Transportation, Telephone (1976, 1993, 1999))

• Simple Important Models: EOQ, Aggregate Planning

• Skorohod’s Deterministic Fluid Model (of a service station): teaching note

– Phases of Congestion: under-, over- and critical-loading.

– Rush Hour Analysis: onset, end

– Mathematical Framework in approximations

• Queues with Abandonment and Retrials (=Call Centers; Time- and State-dependent Q’s).

• Bottleneck analysis in a (feed-forward) Fluid Network, via National Cranberry

• Fluid Networks (Generalizing Skorohod): The Traffic Equations

• Addendum

1

Page 2: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 3: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 4: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

1

Predictable Queues

Fluid Models

Service Engineering Queueing Science

Eurandom September 8, 2003

e.mail : [email protected]

Website: http://ie.technion.ac.il/serveng

Page 5: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

2

3. Supporting Material (Downloadable)

Gans, Koole, and M.: “Telephone Call Centers: Tutorial, Review and Research Prospects.” MSOM.

Brown, Gans, M., Sakov, Shen, Zeltyn, Zhao: "Statistical Analysis of a Telephone Call Center: A Queueing-Science Perspective." Submitted.

Jennings, M., Massey, Whitt: "Server Staffing to Meet Time-Varying Demand." Management Science, 1996. - PRACTICAL

0. M., Massey, Reiman: "Strong Approximations for Markovian Service Networks." QUESTA, 1998.

1. M., Massey, Reiman, Rider: "Time Varying Multi-server Queues with Abandonment and Retrials", ITC-16, 1999.

2. M., Massey, Reiman, Rider and Stolyar: "Waiting Time Asymptotics for Time Varying Multiserver Queues with Abandonment and Retrials", Allerton Conference, 1999.

3. M., Massey, Reiman, Rider and Stolyar: "Queue Lengths and Waiting Times for Multiserver Queues with Abandonment and Retrials", Fifth INFORMS Telecommunications Conference, 2000

Page 6: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Labor-Day Queueing in Niagara FallsThree-station Tandem Network:Elevators, Coats, Boats

Total wait of 15 minutesfrom upper-right corner to boat

How? “Deterministic” constant motion

Page 7: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Pre Op Room

5:30-7:30 AM

to 3:00 PM

Operating Room

45 min60-90 min

Post Op Room

Patient’s Room

Dining Room

9:00 PM

Patient’s Room

6:00 AM

Dining Room

7:45-8:15 AM

Clinic Room?

Rec Room Grounds

Dining Room

9:00 PM

Dining Room

7:45-8:50 AM

Clinic •External types of abdominal hernias.•82% 1st-time repair.•18% recurrences.•6850 operations in 1986.

•Recurrence rate: 0.8% vs. 10% Industry Std.

Stay LongerGo Home

Shouldice Hospital: Flow Chart of Patients’ Experience

Waiting Room

1:00-3:00 PM

Exam Room (6)

15-20 min

Acctg. Office

10 min

Nurses’Station

5-10 min

Patient’s Room

1-2 hours

Orient’n Room

5:00-5:30 PM

Dining Room

5:30-6:00 PM

Rec Lounge

7:00-9:00 PM

Patient’s Room

9:30 PM-5:30 AM

Day 1:

Day 4:

Day 2:

Day 3:

Surgeons Admit

Remove Clips

Remove Rem. Clips

Page 8: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

6

Matching Supply and Demand (Wharton)

Page 9: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

7

Staffing Matters (on Fridays, 7:00 am)

Page 10: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 11: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 12: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 13: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 14: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Bank Queue

Catastrophic Heavy Load Regular

8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13Time of Day

0

10

20

30

40

50

60Qu

eue

415-1
I-Method
Page 15: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 16: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 17: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 18: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 19: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Q-Science

May 1959!

Dec 1995!

(Help Desk Institute)

Arrival Rate

Time 24 hrs

Time 24 hrs

% Arrivals

(Lee A.M., Applied Q-Th)

Page 20: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

(with Jennings, Massey, Whitt)

Time-Varying Queues: Predictable Variability

Arrivals

Queues

Waiting

45

Page 21: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 22: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 23: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 24: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 25: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 26: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 27: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 28: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 29: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 30: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 31: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 32: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 33: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 34: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 35: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 36: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 37: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 38: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

From Data to Models: (Predictable vs. Stochastic Queues)

Fix a day of given category (say Monday = M , as distinguished from Sat.)

Consider data of many M ’s.

What do we see ?

• Unusual M ’s, that are outliers.

Examples: Transportation : storms,...

Hospital: : military operation, season,...)

Such M ’s are accommodated by emergency procedures:

redirect drivers, outlaw driving; recruit help.

⇒ Support via scenario analysis, but carefully.

• Usual M ’s, that are “average”.

In such M ’s, queues can be classified into:

– Predictable:

queues form systematically at nearly the same time of most M ’s

+ avg. queue similar over days + wiggles around avg. are small

relative to queue size.

e.g., rush-hour (overloaded / oversaturated)

Model: hypothetical avg. arrival process served by an avg. server

Fluid approx / Deterministic queue :macroscopic

Diffusion approx = refinements :mesoscopic

– Unpredictable:

queues of moderate size, from possibly at all times, due to (un-

predictable) mismatch between demand/supply

⇒ Stochastic models :microscopic

Newell says, and I agree:

Most Queueing theory devoted to unpredictable queues,

but most (significant) queues can be classified as predictable.

3

Page 39: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 40: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Scales (Fig. 2.1 in Newell’s book: Transportation)

Horizon Max. count/queue Phenom

(a) 5 min 100 cars/5–10 (stochastic) instantaneous queues

(b) 1 hr 1000 cars/200 rush-hour queues

(c) 1 day = 24 hr 10,000 / ? identify rush hours

(d) 1 week 60,000 / – daily variation (add histogram)

(e) 1 year seasonal variation

(f) 1 decade ↑ trend

Scales in Tele-service

Horizon Decision e.g.

year strategic add centers / permanent workforce

month tactical temporary workforce

day operational staffing (Q-theory)

hour regulatory shop-floor decisions

4

Page 41: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 42: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Arrival Process

Yearly

Monthly

Daily

Hourly

415-1
Scales: Arrival Process, 1999
Page 43: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Arrival Process, in 1976 (E. S. Buffa, M. J. Cosgrove, and B. J. Luce,

“An Integrated Work Shift Scheduling System”)

Yearly Monthly

Daily Hourly

Page 44: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 45: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Custom Inspections at an Airport

Number of Checks Made During 1993:

Number of Checks Made in November 1993:

Average Number of Checks During the Day:

Source: Ben-Gurion Airport Custom Inspectors Division

Weekend Weekend Weekend Weekend

Day in Month

# C

heck

s

Holiday

Week in Year

# C

heck

s

Predictable?

# C

heck

s

Strike

Hour

Page 46: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 47: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 48: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 49: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 50: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 51: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 52: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 53: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 54: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 55: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 56: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 57: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 58: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 59: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Predictable Queues

Fluid Models andDiffusion Approximations

for Time-Varying Queues with

Abandonment and Retrials

with

Bill Massey

Marty Reiman

Brian Rider

Sasha Stolyar

1

Page 60: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Sudden Rush Hour

n = 50 servers; µ = 1

λt = 110 for 9 ≤ t ≤ 11, λt = 10 otherwise

0 2 4 6 8 10 12 14 16 18 200

10

20

30

40

50

60

70

80

90Lambda(t) = 110 (on 9 <= t <= 11), 110 (otherwise). n = 50, mu1 = 1.0, mu2 = 0.1, beta = 2.0, P(retrial) = 0.25

time

Q1−ode Q2−ode Q1−sim Q2−sim variance envelopes

2

Page 61: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Call Center: A Multiserver Queue with

Abandonment and Retrials

Q1(t)

βt ψt ( Q1(t) − nt )+

βt (1−ψt) ( Q1(t) − nt )+

λt 2

Q2(t)

21 8. . .

nt

1

.

.

.

µt Q2(t)2µt (Q1(t) nt)

1

3

Page 62: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Primitives (Time-Varying Predictably)

λt exogenous arrival rate

e.g., continuously changing, sudden peak

µ1t service rate

e.g., change in nature of work or fatigue

nt number of servers

e.g., in response to predictably varying workload

βt abandonment rate while waiting

e.g., in response to IVR discouragement

at predictable overloading

ψt probability of no retrial

1/µ2t average time to retry

Large system: η ↑ ∞ scaling parameter. Now define

Qη(·) via λt → ηλt

nt → ηnt

What do we get, as η ↑ ∞?4

Page 63: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Fluid Model

Replacing random processes by their rates yields

Q(0)(t) = (Q(0)1 (t), Q(0)

2 (t))

Solution to nonlinear differential balance equations

d

dtQ(0)

1 (t) = λt − µ1t (Q(0)

1 (t) ∧ nt)

+µ2t Q(0)

2 (t)− βt (Q(0)1 (t)− nt)

+

d

dtQ(0)

2 (t) = β1(1− ψt)(Q(0)1 (t)− nt)

+

− µ2t Q(0)

2 (t)

Justification: Functional Strong Law of Large Numbers ,

with λt → ηλt, nt → ηnt.

As η ↑ ∞,

1

ηQη(t) → Q(0)(t) , uniformly on compacts, a.s.

given convergence at t = 0

5

Page 64: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Diffusion Refinement

Qη(t)d= η Q(0)(t) +

√η Q(1)(t) + o (

√η )

Justification: Functional Central Limit Theorem

√η

[1

ηQη(t)−Q(0)(t)

]d→ Q(1)(t), in D[0,∞) ,

given convergence at t = 0.

Q(1) solution to stochastic differential equation.

If the set of critical times {t ≥ 0 : Q(0)1 (t) = nt} has Lebesque

measure zero, then Q(1) is a Gaussian process. In this case, one

can deduce ordinary differential equations for

EQ(1)i (t) , Var Q(1)

i (t) : confidence envelopes

These ode’s are easily solved numerically (in a spreadsheet, via for-

ward differences).

6

Page 65: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

What if Pr{Retrial } increases to 0.75 from 0.25 ?

0 2 4 6 8 10 12 14 16 18 200

10

20

30

40

50

60

70

80

90

time

Lambda(t) = 110 (on 9 <= t <= 11), 10 (otherwise). n = 50, mu1 = 1.0, mu2 = 0.1, beta = 2.0, P(retrial) = 0.75

Q1−ode Q2−ode Q1−sim Q2−sim variance envelopes

0 2 4 6 8 10 12 14 16 18 200

10

20

30

40

50

60

70

80

90Lambda(t) = 110 (on 9 <= t <= 11), 110 (otherwise). n = 50, mu1 = 1.0, mu2 = 0.1, beta = 2.0, P(retrial) = 0.25

time

Q1−ode Q2−ode Q1−sim Q2−sim variance envelopes

7

Page 66: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Starting Empty and Approaching Stationarity

0 2 4 6 8 10 12 14 16 18 200

10

20

30

40

50

60

70

80

90

100Lambda(t) = 110, n = 50, mu1 = 1.0, mu2 = 0.2, beta = 2.0, P(retrial) = 0.2

time

Q1−ode Q2−ode Q1−sim Q2−sim variance envelopes

0 2 4 6 8 10 12 14 16 18 200

100

200

300

400

500

600

700Lambda(t) = 110, n = 50, mu1 = 1.0, mu2 = 0.2, beta = 2.0, P(retrial) = 0.8

time

Q1−ode Q2−ode Q1−sim Q2−sim variance envelopes

8

Page 67: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 68: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Sample Mean vs. Fluid Approximation

Queue Lengths ( λt = 20 or 100)

0 2 4 6 8 10 12 14 16 18 200

10

20

30

40

50

60

70

80n=50, mu1=1, mu2=.2, beta=2, P(retrial)=.5, lambda = 20 (t in [0,2), [4,6), [8,10) etc) else 100

time

queu

e le

ngth

mea

ns

q1−odeq1−simq2−odeq2−sim

0 2 4 6 8 10 12 14 16 18 200

10

20

30

40

50

60

70n=50, mu1=1, mu2=.2, beta=2, P(retrial)=.5, lambda = 40 (t in [0,2), [4,6), [8,10) etc) else 80

queu

e le

ngth

mea

ns

time

q1−odeq1−simq2−odeq2−sim

9

Page 69: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Variances and Covariances

Queue Lengths

0 2 4 6 8 10 12 14 16 18 200

20

40

60

80

100

120

140n=50, mu1=1, mu2=.2, beta=2, P(retrial)=.5, lambda = 20 (t in [0,2), [4,6), [8,10) etc) else 100

time

queu

e le

ngth

cov

aria

nce

mat

rix e

ntrie

s

q1−variance−odeq1−variance−simq2−variance−odeq2−variance−simcovariance−ode covariance−sim

0 2 4 6 8 10 12 14 16 18 200

20

40

60

80

100

120

140

queu

e le

ngth

cov

aria

nce

mat

rix e

ntrie

s

time

n=50, mu1=1, mu2=.2, beta=2, P(retrial)=.5, lambda = 40 (t in [0,2), [4,6), [8,10) etc) else 80

q1−variance−odeq1−variance−simq2−variance−odeq2−variance−simcovariance−ode covariance−sim

13

Page 70: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Sample Density vs. Gaussian Approximation

Multi-Server Queue

20 30 40 50 60 70 80 90 1000

0.01

0.02

0.03

0.04

0.05

0.06

0.07

n=50,mu1=1,mu2=2,beta=.2,P(retrial)=.5,lambda = 20 (t in [0,2),[4,6),[8,10) etc) else 100

"x−" = queue length empirical law

"−" = queue length limit law

t=7

t=5t=6

q 1 que

ue le

ngth

den

sity

20 30 40 50 60 70 800

0.01

0.02

0.03

0.04

0.05

0.06

0.07

q 1 que

ue le

ngth

den

sity

t=5

t=6

t=7

"x−" = queue length empirical law

"−" = queue length limit law

n=50,mu1=1,mu2=2,beta=.2,P(retrial)=.5,lambda = 40 (t in [0,2),[4,6),[8,10) etc) else 80

11

Page 71: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 72: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Sample Mean vs. Fluid Approximation

Virtual Waiting Time

0 2 4 6 8 10 12 14 16 18 200

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

virt

ual w

aitin

g tim

e m

ean

n=50,mu1=1,mu2=2,beta=.2,P(retrial)=.5,lambda = 20 (t in [0,2),[4,6),[8,10) etc) else 100

waiting time mean odewaiting time mean sim

0 2 4 6 8 10 12 14 16 18 200

0.05

0.1

0.15

0.2

0.25

0.3

0.35n=50,mu1=1,mu2=2,beta=.2,P(retrial)=.5,lambda = 40 (t in [0,2),[4,6),[8,10) etc) else 80

virt

ual w

aitin

g tim

e m

ean

waiting time odewaiting time sim

10

Page 73: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Back to the Multiserver Queue with

Abandonment and Retrials

Q1(t)

βt ψt ( Q1(t) − nt )+

βt (1−ψt) ( Q1(t) − nt )+

λt 2

Q2(t)

21 8. . .

nt

1

.

.

.

µt Q2(t)2µt (Q1(t) nt)

1

1

Page 74: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Sample Path Construction of a Multiserver

Queue with Abandonment and Retrials

Q1(t) = Q1(0) + Aa

(∫ t

0λsds

)

+ Ac21

(∫ t

0Q2(s)µ

2sds

)−Ac

(∫ t

0(Q1(s) ∧ ns)µ

1sds

)

− Ab12

(∫ t

0(Q1(s)− ns)

+βs(1− ψs)ds

)

− Ab

(∫ t

0(Q1(s)− ns)

+βsψsds

)

and

Q2(t) =

Q2(0) + Ab12

(∫ t

0(Q1(s)− ns)

+βs(1− ψs)ds

)

− Ac21

(∫ t

0Q2(s)µ

2sds

).

A··d= Poisson(1), independent.

2

Page 75: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Fluid Limit for the Multiserver Queue

with Abandonment and Retrials

(2 O.D.E.’s)

d

dtQ(0)

1 (t) = λt + µ2t Q(0)

2 (t)− µ1t

(Q(0)

1 (t) ∧ nt

)

− βt

(Q(0)

1 (t)− nt

)+

and

d

dtQ(0)

2 (t) = βt(1− ψt)(Q(0)

1 (t)− nt

)+− µ2

t Q(0)2 (t) .

Can be solved numerically (forward Euler) in a spreadsheet.

3

Page 76: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Diffusion Moments

for the Multiserver Queue with

Abandonment and Retrials

Let E1(t) = E[Q(1)

1 (t)], E2(t) = E

[Q(1)

2 (t)].

Assume the set{

t∣∣∣Q(0)

1 (t) = nt

}has Lebesque measure zero.

Then

d

dtE1(t) = −

(µ1

t 1{Q(0)1 (t)≤nt} + βt1{Q(0)

1 (t)>nt})

E1(t)

+ µ2t E2(t)

and

d

dtE2(t) = βt(1− ψt)E1(t)1{Q(0)

1 (t)≥nt} − µ2t E2(t).

4

Page 77: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

More Diffusion Moments

(A Grand Total of 7 O.D.E.’s)

Let V1(t) = Var[Q(1)

1 (t)], V2(t) = Var

[Q(1)

2 (t)],

and C(t) = Cov[Q(1)

1 (t), Q(1)1 (t)

]. Then

d

dtV1(t) = − 2

(βt1{Q(0)

1 (t)>nt} + µ1t 1{Q(0)

1 (t)≤nt})

V1(t)

+ λt + βt

(Q(0)

1 (t)− nt

)++ µ1

t

(Q(0)

1 (t) ∧ nt

)

+ µ2t Q(0)

2 (t),

d

dtV2(t) = − 2µ2

t V2(t) + βt(1− ψt)(Q(0)

1 (t)− nt

)+

+ µ2t Q(0)

2 (t) + 2βt(1− ψt)C(t)1{Q(0)1 (t)≥nt},

and

d

dtC(t) = −

(βt1{Q(0)

1 (t)≥nt} + µ1t 1{Q(0)

1 (t)<nt})

C(t)

+ µ2t (V2(t)− C(t))− βt(1− ψt)

(Q(0)

1 (t)− nt

)

− µ2t Q(0)

2 (t) .

5

Page 78: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Example: Spiked Arrival Rate:λ(t) = 110, if 9 ≤ t ≤ 11 otherwise λ(t) = 10,

µ1 = 1.0, µ2 = 0.1, β = 2.0, n = 50, ψ = 0.25

0 2 4 6 8 10 12 14 16 18 200

10

20

30

40

50

60

70

80

90Lambda(t) = 110 (on 9 <= t <= 11), 110 (otherwise). n = 50, mu1 = 1.0, mu2 = 0.1, beta = 2.0, P(retrial) = 0.25

time

Q1−ode Q2−ode Q1−sim Q2−sim variance envelopes

6

Page 79: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Theory Generalizes to

Jackson Networks with Abandonment

Qj(t)2

nt

1

.

.

.

j

µt φt (Qi(t) nt) i iij

λtj

µt (Qj(t) nt) j j

βt (Qj(t) − nt)+j j

βtψt (Qk(t) − nt)+k kkj

Further generalizations: Pre-Emptive Priorities

7

Page 80: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Bottleneck Analysis

Inventory Build-up Diagrams, based on National Cranberry(Recall EOQ,...) (Recall Burger-King) (in Reading Packet: Fluid Models)

A peak day: • 18,000 bbl’s (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’s per hour

(Capacity = max. sustainable processing rate)

• Bin capacity for wet: 3200 bbl’s• 75 bbl’s per truck (avg.)

- Draw inventory build-up diagrams of 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.?

Service analogy:

• front-office + back-office (banks, telephones)↑ ↑

service production

• hospitals (operating rooms, recovery rooms)

• ports (inventory in ships; bottlenecks = unloading crews,router)

• More ?

6

Page 81: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 82: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 83: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 84: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 85: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 86: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’

Types of Queues

• Perpetual Queues: every customers waits.

– Examples: public services (courts), field-services, oper-

ating rooms, . . .

– How to cope: reduce arrival (rates), increase service ca-

pacity, 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 (se-

curity 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’ ca-

pacity during stochastic (random) periods.

– Examples: supermarkets, telephone services, bank-branches,

emergency-departments, . . .

– How to cope: dynamic staffing, information (e.g. reallo-

cate servers), standardization (reducing std.: in arrivals,

via reservations; in services, via TQM) ,. . .

– Models: stochastic queueing models.

3

Page 87: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’
Page 88: The ”Fluid View”, or Flow Models - Technionie.technion.ac.il/serveng/Lectures/FluidView.pdf · The ”Fluid View”, or Flow Models ... Shouldice Hospital: Flow Chart of Patients’