1 1
Useful
Useful
Recent Trends in
Recent Trends in
Simulation Methodology
Simulation Methodology
Shane Henderson Shane HendersonCornell University
Cornell University
Thanks: NSF DMI 0400287 Thanks: NSF DMI 0400287e.g., Inbound call centre staffing
e.g., Inbound call centre staffing
Min staffing costsMin staffing costs
s/t
s/t customers happy “enough”customers happy “enough”
Min Min ccTT xx
s/t
s/t ggii(x(x) ) ≥≥ 0, i = 1, …, num periods0, i = 1, …, num periods
Max minMax minii ggii(x(x)) s/t
s/t ccTTxx BB
From Simulation Model
3 3
Inbound Call Centre Staffing
Inbound Call Centre Staffing
What is the arrival rate of customers?What is the arrival rate of customers?
Input Uncertainty
Input Uncertainty
Conversations with HR folks suggests Conversations with HR folks suggests
dependence of call volumes between periods
dependence of call volumes between periods
Dependence Modeling
Dependence Modeling
Outline
Outline
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
5 5
Part I
Simulation Optimization
The Generic Problem
The Generic Problem
MinMin f(f(xx)) s/t s/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 –
7 7
Example 2: Call Center
Example 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 operation
times 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
Example 3, 4
Example 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 horizon
time horizon
–
– f(f(xx, , YY) = fraction of calls reached in ) = fraction of calls reached in 10 10 mins
mins
Example 4: Ambulance redeploymentExample 4: Ambulance redeployment
–
– xx = parameters of redeployment policy= parameters of redeployment policy –
9 9
Sample Average Approximation
Sample 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 optimization
retrospective 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
algorithm
algorithm
Doesn’t always work … some weird Doesn’t always work … some weird
counterexamples
counterexamples
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: Newsvendor
11 11
SAA General Results
SAA 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
Gradient Estimation
Gradient 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 fnn
is not differentiable
is not differentiable
Easily found for newsvendor. What about Easily found for newsvendor. What about
harder problems?
13 13
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?
Stochastic Approximation
Stochastic 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 …
15 15
Selecting the Best System
Selecting 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(x
P(xnn is truly best of is truly best of x’sx’s visited) visited) ≥≥ 0.950.95
Bird’s
Bird’s
-
-
Eye View
Eye View
Apply SAA if good optimization algorithms Apply SAA if good optimization algorithms
available for SAA problem
available 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 methods
reduction methods
If deterministic problems are tough, then If deterministic problems are tough, then
anything goes. (Random search,
anything goes. (Random search, metaheuristicsmetaheuristics))
17 17
Where to Find Out More
Where 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 SciSci submission
submission ⇒⇒discrete problems hard!discrete problems hard!
Gradient estimation: Gradient estimation: GlassermanGlasserman, Fu and , Fu and HuHu books,
books, L’EcuyerL’Ecuyerpapers, 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”
Part II
19 19
The Bruce Lee bakery
The 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
i
i
((ΛΛii: :
i
i
≥≥≥≥≥≥≥≥ 0) i.i.d. 0) i.i.d.G
G
((αα, , ββ))The Bruce Lee bakery
The Bruce Lee bakery
Similar for E Similar for E
S
S
11 so standard approach so standard approach works21 21
The Steve Russell wine store
The 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
G
G
((αα, , ββ))The Steve Russell wine store
The Steve Russell wine store
Performance measure still E Performance measure still E
S
S
11 / E / EN
N
11
E E
N
N
11 = 9 = 9 λ = ?λ = ?
Which value of Which value of λλ to use?to use?
Same problem with E Same problem with E
S
S
11
23 23
Terminology
Terminology
Simulation model needs input Simulation model needs input
distributions and parameters
distributions 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
Why do we care?
Why do we care?
M
M
//M
M
/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 fExpected time in system is
f
((λλ00) ) wherewhere
25 25
Estimating
Estimating
λ
λ
00
Assume this holds exactlyAssume this holds exactly
Possibly negative … Possibly negative … ignore
ignore
Possibly bigger than Possibly bigger than µµ00
Assume perfect simulation that reportsAssume perfect simulation that reports
The induced distribution of
27 27
Back to the wine store
Back 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?
What should we do about it?
What should we do about it?
Any method should beAny method should be
–
– TransparentTransparentto 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
chosen
chosen systemsystem –
– a sense of model bias is obtaineda sense of model bias is obtained
29 29
Cheng and Holland ‘03
Cheng and Holland ‘03
Suppose Suppose θθ = (= (θθ11, , θθ22) (e.g., arrival, service rates)) (e.g., arrival, service rates)
f increases θ1 θ2 Simulate here (Lb, Ub) And here (Ls, Us) (Ls, Ub)
Bayesian methods
Bayesian 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)
31 31
Induced distribution methods
Induced distribution methods
Study Study
distribution
distribution
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), Steckley Steckley (2005)(2005) Helton: Helton:
G
G
((x
x
; ;m
m
, , θθ) = P() = P(X
X
11((m
m
, , θθ) )x
x
)) Look at distribution of Look at distribution ofBird’s Eye View and More Info
Bird’s Eye View and More Info
Cheng and Holland for small numbers of Cheng and Holland for small numbers of
parameters
parameters
Induced distribution if you can get your Induced distribution if you can get your
head around the idea
head around the idea
Bayesian model average once the tools are Bayesian model average once the tools are
automated and in software
automated and in software
In the meantime: sensitivity and In the meantime: sensitivity and
uncertainty analysis
uncertainty analysis
33 33
Part III
Modeling Dependence
Dependence
Dependence
Some of the random variables in the Some of the random variables in the
simulation are related
simulation are related
Can dramatically alter performance, Can dramatically alter performance,
decisions based on model
decisions based on model
–
– # arrivals in morning # arrivals in morning vsvsafternoon in call afternoon in call centre
centre
–
– Wind fields in yacht match race simulationWind fields in yacht match race simulation –
35 35
Modeling Philosophy
Modeling 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 minuses
well understood pluses and minuses
3.
3. Use partially specified distributionsUse partially specified distributions
Call Centre Arrivals
Call 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
37 37
Randomly Varying Arrival Rates
Randomly 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 function
follow 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, etc
to weather, promotions, etc
Trying to capture the unknown physicsTrying to capture the unknown physics
Yacht Match Race Simulation
Yacht Match Race Simulation
Andy Andy PhilpottPhilpott, Hamish , Hamish
Sheild
Sheild, U of Auckland, U of Auckland
2 yachts2 yachts
Design & Design & tacticaltacticalQsQs
Model wind speed and Model wind speed and
direction on a grid direction on a grid Spatial/temporal Spatial/temporal dependence dependence
We use a vector ARWe use a vector AR
WellWell--understood understood joint distribution
joint distribution Wind direction
39 39
Vector AR Process
Vector AR Process
Ambulance Travel Speeds
Ambulance 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?
41 41
Responding From Base
Responding From Base
Randomness in
travel speeds
43 43
What About
What About
Queueing
Queueing
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
macro
macro
and andmicro
micro
factorsfactors
Macro factors affect all calls, so Macro factors affect all calls, so average
average
of service time changes
of service time changes
Micro factors influence individual calls, so Micro factors influence individual calls, so
variability
variability
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
Size Matters
Size Matters
Fraction on time 5 ambulances 30 ambulances 80%45 45
Random Travel Speeds
Random Travel Speeds
Help a bit if calls are clustered near
Help a bit if calls are clustered near
the boundary of reachable calls
the boundary of reachable calls
Dependence structure matters: One
Dependence structure matters: One
form increases
form increases
variability.
variability.
The other
The other
increases
increases
mean
mean
service time
service time
Hurt heavily utilized fleets more
Hurt heavily utilized fleets more
than lightly
than lightly-
-utilized fleets
utilized fleets
More Info
More Info
Henderson tutorial at WSC ’05 discusses Henderson tutorial at WSC ’05 discusses
these examples in more depth
these 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 classes
47 47
Last Words
Last 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 room
meeting 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