useful recent trends in simulation methodology

24
1 1 Useful Useful Recent Trends in Recent Trends in Simulation Methodology Simulation Methodology Shane Henderson Shane Henderson Cornell University Cornell University Thanks: NSF DMI 0400287 Thanks: NSF DMI 0400287 2 e.g., Inbound call centre staffing e.g., Inbound call centre staffing Min staffing costs Min staffing costs s/t s/t customers happy “enough” customers happy “enough” Min Min c T x s/t s/t g i (x (x ) ) 0, i = 1, …, num periods 0, i = 1, …, num periods Max min Max min i g i (x (x) s/t s/t c T x B From Simulation Model Simulation Optimization

Upload: others

Post on 16-Oct-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Useful Recent Trends in Simulation Methodology

1

11

UsefulUseful Recent Trends in Recent Trends in Simulation MethodologySimulation Methodology

Shane HendersonShane Henderson

Cornell UniversityCornell University

Thanks: NSF DMI 0400287Thanks: NSF DMI 0400287

22

e.g., Inbound call centre staffinge.g., Inbound call centre staffing

�� Min staffing costsMin staffing costss/ts/t customers happy “enough”customers happy “enough”

�� Min Min ccTT xxs/ts/t ggii(x(x) ) ≥≥ 0, i = 1, …, num periods0, i = 1, …, num periods

�� Max minMax minii ggii(x(x))s/ts/t ccTTxx �� BB

From Simulation Model

Simulation Optimization

Page 2: Useful Recent Trends in Simulation Methodology

2

33

Inbound Call Centre StaffingInbound Call Centre Staffing

�� What is the arrival rate of customers?What is the arrival rate of customers?

Input UncertaintyInput Uncertainty

�� Conversations with HR folks suggests Conversations with HR folks suggests dependence of call volumes between periodsdependence of call volumes between periods

Dependence Modeling Dependence Modeling

44

OutlineOutline

�� Part I: Simulation OptimizationPart I: Simulation Optimization–– Discuss, argue, argueDiscuss, argue, argue

�� Part II: Input UncertaintyPart II: Input Uncertainty–– Discuss, argue, argueDiscuss, argue, argue

�� Part III: Dependence ModelingPart III: Dependence Modeling–– Run out of time / discuss, argue, argueRun out of time / discuss, argue, argue

�� Caveat Emptor: I will be giving my views on these subjects, whicCaveat Emptor: I will be giving my views on these subjects, which h are diametrically opposed to common sense and good are diametrically opposed to common sense and good judgementjudgement..

Page 3: Useful Recent Trends in Simulation Methodology

3

55

Part ISimulation Optimization

66

The Generic ProblemThe Generic Problem

�� MinMin f(f(xx))s/ts/t g(g(xx) ) ≥≥ 00

�� HereHere f(f(xx) = E ) = E f(f(xx, , YY))g(g(xx) = E ) = E g(g(xx, , YY))

�� Example 1: NewsvendorExample 1: Newsvendor–– YY = demand= demand

–– xx = amount to stock= amount to stock

–– f(f(xx, , YY) = ) = ccxx -- s s min(min(YY, , xx) ) –– v v max(max(xx –– YY, 0), 0)

Page 4: Useful Recent Trends in Simulation Methodology

4

77

Example 2: Call CenterExample 2: Call Center

�� Min staff costs, Min staff costs, s/ts/t satisfactory servicesatisfactory service

�� xxii = number of staff working shift i= number of staff working shift i

�� Y = Y = interarrivalinterarrival, service, abandonment , service, abandonment times etc for one day’s operationtimes etc for one day’s operation

�� f(f(xx) = ) = ccTTxx = staffing cost= staffing cost

�� ggii((xx, , YY) = ) = Num happy customersNum happy customers–– 0.8 0.8 Num arrivalsNum arrivals

88

Example 3, 4Example 3, 4

�� Example 3: Ambulance base locationExample 3: Ambulance base location–– xx = vector of ambulance base locations= vector of ambulance base locations–– YY = call locations, times, scene times etc over = call locations, times, scene times etc over time horizontime horizon

–– f(f(xx, , YY) = fraction of calls reached in ) = fraction of calls reached in �� 10 10 minsmins

�� Example 4: Ambulance redeploymentExample 4: Ambulance redeployment–– xx = parameters of redeployment policy= parameters of redeployment policy–– YY, f = same as in Example 3, f = same as in Example 3

Page 5: Useful Recent Trends in Simulation Methodology

5

99

Sample Average ApproximationSample Average Approximation

�� AKA external sampling, sample path opt, AKA external sampling, sample path opt, stochastic counterpart. Strong links with stochastic counterpart. Strong links with retrospective optimizationretrospective optimization

�� Replace E(…) with sample average of …Replace E(…) with sample average of …�� Fix the random samples beforehandFix the random samples beforehand�� Apply a deterministic optimization Apply a deterministic optimization algorithmalgorithm

�� Doesn’t always work … some weird Doesn’t always work … some weird counterexamplescounterexamples

1010

�� f(f(xx, , YY) = ) = ccxx -- s s min(min(YY, , xx) ) –– v v max(max(xx –– YY, 0), 0)

�� Generate demands YGenerate demands Y11, …, , …, YYnn

�� ffnn is piecewise linear and convexis piecewise linear and convex

�� Can apply a convex optimization codeCan apply a convex optimization code

Example: NewsvendorExample: Newsvendor

Page 6: Useful Recent Trends in Simulation Methodology

6

1111

SAA General ResultsSAA General Results

�� Lots known about Lots known about xxnn, the optimal solution , the optimal solution

�� Under reasonable conditions, including Under reasonable conditions, including unique minimum:unique minimum:

�� If multiple optima, related results holdIf multiple optima, related results hold

1212

Gradient EstimationGradient Estimation

�� Derivatives of Derivatives of ffnn(x(x) boost computation) boost computation

�� Same thing as IPA derivativesSame thing as IPA derivatives

�� Sometimes need extra smoothing when fSometimes need extra smoothing when fnnis not differentiableis not differentiable

�� Easily found for newsvendor. What about Easily found for newsvendor. What about harder problems?harder problems?

Page 7: Useful Recent Trends in Simulation Methodology

7

1313

Example 3: Base Location (Mason)Example 3: Base Location (Mason)

•fn not continuous, but is piecewise differentiable

•E f’n ≠ f’

•But does that matter?

1414

Stochastic ApproximationStochastic Approximation

�� TimeTime--honouredhonoured approach. Dates to 50’sapproach. Dates to 50’s

�� Let Let G(xG(x) be estimate of ) be estimate of ∇∇f(xf(x))

�� xxn+1n+1 = = xxnn –– aann G(xG(xnn))

�� {a{ann} is gain (step length) sequence} is gain (step length) sequence

�� Essentially steepest descentEssentially steepest descent

�� Works well only if choose Works well only if choose aannss carefullycarefully

�� Can prove lots of theorems, but …Can prove lots of theorems, but …

�� Use only if SAA isn’t efficientUse only if SAA isn’t efficient

Page 8: Useful Recent Trends in Simulation Methodology

8

1515

Selecting the Best SystemSelecting the Best System

�� Finite number of Finite number of x’sx’s

�� Allows us to make statements likeAllows us to make statements like

�� Use after search procedure is completeUse after search procedure is complete

�� “Clean up afterwards”“Clean up afterwards”

�� Additional runs will probably be neededAdditional runs will probably be needed

P(xP(xnn is truly best of is truly best of x’sx’s visited) visited) ≥≥ 0.950.95

1616

Bird’sBird’s--Eye ViewEye View�� Apply SAA if good optimization algorithms Apply SAA if good optimization algorithms available for SAA problemavailable for SAA problem–– Usually need structured problemUsually need structured problem

–– IPA (true) gradients help a lot, not essentialIPA (true) gradients help a lot, not essential

–– Requires careful control of random number streamsRequires careful control of random number streams

–– Samples don’t need to be Samples don’t need to be iidiid… can apply variance … can apply variance reduction methodsreduction methods

�� If deterministic problems are tough, then If deterministic problems are tough, then anything goes. (Random search, anything goes. (Random search, metaheuristicsmetaheuristics))

�� Selection of the best can “clean up” afterwardsSelection of the best can “clean up” afterwards

Page 9: Useful Recent Trends in Simulation Methodology

9

1717

Where to Find Out MoreWhere to Find Out More

�� SAASAA–– Alex Shapiro (GA Tech), esp. MC sampling methods Alex Shapiro (GA Tech), esp. MC sampling methods chapter in “Handbook of Stochastic Programming”, chapter in “Handbook of Stochastic Programming”, and and LinderothLinderoth, Shapiro and Wright paper, Shapiro and Wright paper

–– AtlasonAtlason, , EpelmanEpelman, Henderson , Henderson -- Annals of OR, Man Annals of OR, Man SciScisubmission submission ⇒⇒ discrete problems hard!discrete problems hard!

�� Gradient estimation: Gradient estimation: GlassermanGlasserman, Fu and , Fu and HuHubooks, books, L’EcuyerL’Ecuyer papers, reviews by Michael Fupapers, reviews by Michael Fu

�� Selecting the best: Chapter by Kim and Nelson Selecting the best: Chapter by Kim and Nelson in forthcoming “Handbook of Simulation”in forthcoming “Handbook of Simulation”

1818

Part IIInput Uncertainty

Page 10: Useful Recent Trends in Simulation Methodology

10

1919

The Bruce Lee bakeryThe Bruce Lee bakery

�� Open from 6am till 3pm every dayOpen from 6am till 3pm every day

�� Service times i.i.d., exp(Service times i.i.d., exp(µµ))�� How many staff are needed so that 90% How many staff are needed so that 90% of customers wait of customers wait �������� 1 minute in queue?1 minute in queue?

�� Poisson arrival process, rate Poisson arrival process, rate ΛΛii on day on day ii

�� ((ΛΛii: : ii ≥≥≥≥≥≥≥≥ 0) i.i.d. 0) i.i.d. GG((αα, , ββ))

2020

The Bruce Lee bakeryThe Bruce Lee bakery

�� Similar for E Similar for E SS11 so standard approach so standard approach worksworks

Page 11: Useful Recent Trends in Simulation Methodology

11

2121

The Steve Russell wine storeThe Steve Russell wine store

�� Open from 11am till 8pm every dayOpen from 11am till 8pm every day

�� Service times i.i.d., exp(Service times i.i.d., exp(µµ))�� How many staff are needed so that 90% How many staff are needed so that 90% of customers wait of customers wait �������� 1 minute in queue?1 minute in queue?

�� Poisson arrival process, rate Poisson arrival process, rate λλ�� Don’t know Don’t know λλ�� Uncertainty in Uncertainty in λλ well modeled as well modeled as GG((αα, , ββ))

2222

The Steve Russell wine storeThe Steve Russell wine store

�� Performance measure still E Performance measure still E SS11 / E / E NN11

�� E E NN11 = 9 = 9 λ = ?λ = ?�� Which value of Which value of λλ to use?to use?

�� Same problem with E Same problem with E SS11

�� What should we doWhat should we do??

Page 12: Useful Recent Trends in Simulation Methodology

12

2323

TerminologyTerminology

�� Simulation model needs input Simulation model needs input distributions and parametersdistributions and parameters

�� Model uncertainty: Model uncertainty: which family?which family?

�� Parameter uncertainty: Parameter uncertainty: what parameters?what parameters?

�� Input uncertainty: Input uncertainty: Both problemsBoth problems

2424

Why do we care?Why do we care?

�� MM//MM/1 queue, arrival rate /1 queue, arrival rate λλ00 = 9 = 9 (unknown), service rate (unknown), service rate µµ00 = 10= 10

�� Expected time in system is Expected time in system is ff ((λλ00) ) wherewhere

�� True performance = True performance = f f ((λλ00) = 1) = 1

Page 13: Useful Recent Trends in Simulation Methodology

13

2525

Estimating Estimating λλ00

�� Assume this holds exactlyAssume this holds exactly

�� Possibly negative … Possibly negative … ignoreignore

�� Possibly bigger than Possibly bigger than µµ00

�� Assume perfect simulation that reportsAssume perfect simulation that reports

2626

The induced distribution ofThe induced distribution of

Page 14: Useful Recent Trends in Simulation Methodology

14

2727

Back to the wine storeBack to the wine store

�� By ignoring input uncertainty, we can By ignoring input uncertainty, we can make one of two errors:make one of two errors:–– Overestimate Overestimate λλ00 : Hire too many staff: Hire too many staff

–– Super service, expensiveSuper service, expensive

–– Underestimate Underestimate λλ00 : Hire too few staff: Hire too few staff

–– Poor service, cheapPoor service, cheap

�� Not so bad at a wine store, but what Not so bad at a wine store, but what about at a 911 call center?about at a 911 call center?

2828

What should we do about it?What should we do about it?�� Any method should beAny method should be

–– TransparentTransparent to usersto users–– Statistically Statistically validvalid–– Easily Easily implementedimplemented–– Computationally Computationally efficientefficient

�� Approach 0: Do “nothing”Approach 0: Do “nothing”�� OK so long asOK so long as

–– users understand that the simulation analyzes the users understand that the simulation analyzes the chosenchosen systemsystem

–– a sense of model bias is obtaineda sense of model bias is obtained

�� Sensitivity analysis, uncertainty analysisSensitivity analysis, uncertainty analysis

Page 15: Useful Recent Trends in Simulation Methodology

15

2929

Cheng and Holland ‘03Cheng and Holland ‘03

�� Suppose Suppose θθ = (= (θθ11, , θθ22) (e.g., arrival, service rates)) (e.g., arrival, service rates)

f increases

θ1

θ2Simulate here(Lb, Ub)

And here(Ls, Us) (Ls, Ub)

3030

Bayesian methodsBayesian methods

�� Chick (1997, 1999, 2000, 2001)Chick (1997, 1999, 2000, 2001)

�� Chick and Ng (2002)Chick and Ng (2002)

�� Ng and Chick (2001)Ng and Chick (2001)

�� ZouaouiZouaoui and Wilson (2001a, 2001b, 2003a, and Wilson (2001a, 2001b, 2003a, 2003b)2003b)

�� Lots of work on “Bayesian Model Average”Lots of work on “Bayesian Model Average”

Page 16: Useful Recent Trends in Simulation Methodology

16

3131

Induced distribution methodsInduced distribution methods

�� Study Study distributiondistribution of of

�� Distribution function: Lee (1998), Lee and Distribution function: Lee (1998), Lee and Glynn (1999, 2003)Glynn (1999, 2003)

�� Mean: Mean: AndradottirAndradottir and Glynn (2003)and Glynn (2003)

�� Density: Density: SteckleySteckley and Henderson (2003), and Henderson (2003), SteckleySteckley (2005)(2005)

�� Helton: Helton: GG((xx; ; mm, , θθ) = P() = P(XX11((mm, , θθ) ) �������� xx))Look at distribution of Look at distribution of

3232

Bird’s Eye View and More InfoBird’s Eye View and More Info

�� Cheng and Holland for small numbers of Cheng and Holland for small numbers of parametersparameters

�� Induced distribution if you can get your Induced distribution if you can get your head around the ideahead around the idea

�� Bayesian model average once the tools are Bayesian model average once the tools are automated and in softwareautomated and in software

�� In the meantime: sensitivity and In the meantime: sensitivity and uncertainty analysisuncertainty analysis

�� More info: Henderson tutorial, WSC ‘03More info: Henderson tutorial, WSC ‘03

Page 17: Useful Recent Trends in Simulation Methodology

17

3333

Part IIIModeling Dependence

3434

DependenceDependence

�� Some of the random variables in the Some of the random variables in the simulation are relatedsimulation are related

�� Can dramatically alter performance, Can dramatically alter performance, decisions based on modeldecisions based on model–– # arrivals in morning # arrivals in morning vsvs afternoon in call afternoon in call centrecentre

–– Wind fields in yacht match race simulationWind fields in yacht match race simulation

–– Travel speeds of ambulancesTravel speeds of ambulances

Page 18: Useful Recent Trends in Simulation Methodology

18

3535

Modeling PhilosophyModeling Philosophy

�� What What needsneeds to be modeled?to be modeled?

�� Use simple models to help decide.Use simple models to help decide.

1.1. Capture the physicsCapture the physics

2.2. Use reasonable joint distribution with Use reasonable joint distribution with well understood pluses and minuseswell understood pluses and minuses

3.3. Use partially specified distributionsUse partially specified distributions

3636

Call Centre ArrivalsCall Centre Arrivals

�� PalmPalm--KhintchineKhintchine thmthm suggests arrivals suggests arrivals follow a follow a nonhomogeneousnonhomogeneous Poisson processPoisson process–– # arrivals in a period is Poisson# arrivals in a period is Poisson

–– different time intervals are independentdifferent time intervals are independent

�� Call centre HR folks and data:Call centre HR folks and data:–– # arrivals has a bigger variance than Poisson# arrivals has a bigger variance than Poisson

–– busier than usual at 9am busier than usual at 9am ⇒⇒ busier at 10ambusier at 10am

�� Uh ohUh oh

Page 19: Useful Recent Trends in Simulation Methodology

19

3737

Randomly Varying Arrival RatesRandomly Varying Arrival Rates

�� Vijay Vijay MehrotraMehrotra, Sam , Sam SteckleySteckley�� One explanation:One explanation:

–– Arrival rate functionArrival rate function is randomis random–– Once arrival rate function realized, arrivals Once arrival rate function realized, arrivals follow a NHPP with that rate functionfollow a NHPP with that rate function

�� Why is this at least plausible?Why is this at least plausible?–– Mechanism generating arrivals can vary due Mechanism generating arrivals can vary due to weather, promotions, etcto weather, promotions, etc

�� Trying to capture the unknown physicsTrying to capture the unknown physics

3838

Yacht Match Race SimulationYacht Match Race Simulation

�� Andy Andy PhilpottPhilpott, Hamish , Hamish SheildSheild, U of Auckland, U of Auckland

�� 2 yachts2 yachts�� Design & Design & tacticaltactical QsQs�� Model wind speed and Model wind speed and direction on a griddirection on a grid

�� Spatial/temporal Spatial/temporal dependencedependence

�� We use a vector ARWe use a vector AR�� WellWell--understood understood joint distributionjoint distribution

Wind direction

Page 20: Useful Recent Trends in Simulation Methodology

20

3939

Vector AR ProcessVector AR Process

4040

Ambulance Travel SpeedsAmbulance Travel Speeds

�� Call locations are randomCall locations are random

�� So are travel speeds!So are travel speeds!–– Traffic lightsTraffic lights

–– Weather (visibility, road conditions)Weather (visibility, road conditions)

–– CongestionCongestion

�� Should we explicitly model random travel Should we explicitly model random travel speeds?speeds?

Page 21: Useful Recent Trends in Simulation Methodology

21

4141

4242

Responding From BaseResponding From Base

Randomness intravel speeds

can improve performance!

Page 22: Useful Recent Trends in Simulation Methodology

22

4343

What About What About QueueingQueueing Effects?Effects?

�� Service time of a call = travel + Service time of a call = travel + nontravelnontravel�� Travel time = distance / speed and speed Travel time = distance / speed and speed depends on depends on macromacro and and micromicro factorsfactors

�� Macro factors affect all calls, so Macro factors affect all calls, so averageaverageof service time changesof service time changes

�� Micro factors influence individual calls, so Micro factors influence individual calls, so variabilityvariability of service time changesof service time changes

�� Looked at M/G/1 using transform Looked at M/G/1 using transform inversion and M/G/inversion and M/G/∞ ∞ modelsmodels

4444

Size MattersSize Matters

Utilization

Fractionon time 5 ambulances

30 ambulances

80%

Page 23: Useful Recent Trends in Simulation Methodology

23

4545

Random Travel SpeedsRandom Travel Speeds

�� Help a bit if calls are clustered near Help a bit if calls are clustered near the boundary of reachable callsthe boundary of reachable calls

�� Dependence structure matters: One Dependence structure matters: One form increases form increases variability. variability. The other The other increases increases meanmean service timeservice time

�� Hurt heavily utilized fleets more Hurt heavily utilized fleets more than lightlythan lightly--utilized fleetsutilized fleets

4646

More InfoMore Info

�� Henderson tutorial at WSC ’05 discusses Henderson tutorial at WSC ’05 discusses these examples in more depththese examples in more depth

�� BillerBiller and and GhoshGhosh chapter in forthcoming chapter in forthcoming “Handbook of Simulation”“Handbook of Simulation”

�� Prediction: Spatial/temporal models will Prediction: Spatial/temporal models will become more common become more common –– need some need some convenient model classesconvenient model classes

Page 24: Useful Recent Trends in Simulation Methodology

24

4747

Last WordsLast Words

�� Are you a tourist wanting to hook up with Are you a tourist wanting to hook up with simulation folks?simulation folks?–– INFORMS Simulation Society business INFORMS Simulation Society business meeting tonight 6:15pm in the Taylor roommeeting tonight 6:15pm in the Taylor room

�� Are you a colleague who thinks I Are you a colleague who thinks I misrepresented things? Speak now!misrepresented things? Speak now!

�� Are you a researcher looking for a new Are you a researcher looking for a new area? area? SimSim Opt Opt in an application settingin an application setting is is a great area!a great area!