Chapter 06 Slides
Chapter 06 Slides
Analysis of
Output from
Terminating
Simulations
Chapter 6
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 1 of 29
What We’ll Do ...
• Time frame of simulations
• Strategy for data collection and analysis
• Confidence intervals
• Comparing two alternatives
• Comparing many alternatives via the Arena
Process Analyzer (PAN)
• Searching for an optimal alternative with
OptQuest
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 2 of 29
Introduction
• Random input leads to random output (RIRO)
• Run a simulation (once) — what does it mean?
Was this run “typical” or not?
Variability from run to run (of the same model)?
• Need statistical analysis of output data
From a single model configuration
Compare two or more different configurations
Search for an optimal configuration
• Statistical analysis of output is often ignored
This is a big mistake – no idea of precision of results
Not hard or time-consuming to do this – it just takes a little
planning and thought, then some (cheap) computer time
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 3 of 29
Time Frame of Simulations
• Terminating: Specific starting, stopping
conditions
Run length will be well-defined (and finite)
• Steady-state: Long-run (technically forever)
Theoretically, initial conditions don’t matter (but practically
they usually do)
Not clear how to terminate a simulation run
• This is really a question of intent of the study
• Has major impact on how output analysis is done
• Sometimes it’s not clear which is appropriate
• Here: Terminating (steady-state in Section 7.2)
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 4 of 29
Strategy for Data Collection and
Analysis
• For terminating case, make IID replications
Run > Setup > Replication Parameters: Number of
Replications field
Check both boxes for Initialize Between Replications
• Separate results for each replication – Category
by Replication report
Model 5-2; Daily Profit, Daily Late Wait Jobs; 10 replications
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 5 of 29
Strategy for Data Collection and
Analysis (cont’d.)
• Category Overview report will have some
statistical-analysis results of the output across
the replications
• How many replications?
Trial and error (now)
Approximate number for acceptable precision (below)
Sequential sampling (Chapter 12)
• Turn off animation altogether for max speed
Run > Run Control > Batch Run (No Animation)
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 6 of 29
Confidence Intervals for
Terminating Systems
• Using formulas in Chapter 2, viewing the cross-replication
summary outputs as the basic data:
• Confidence interval:
Want this to be “small,” say
• Half-width = < h where h is prespecified
• Can’t control t or s
• Must increase n — how much?
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 8 of 29
Half Width and Number of Replications
(cont’d.)
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 9 of 29
Half Width and Number of Replications
(cont’d.)
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 10 of 29
Interpretation of Confidence Intervals
• Interval with random (data-dependent) endpoints
that’s supposed to have stated probability of
containing, or covering, the expected valued
“Target” expected value is a fixed, but unknown, number
Expected value = average of infinite number of replications
• Not an interval that contains, say, 95% of the data
That’s a prediction interval … useful too, but different
• Usual formulas assume normally-distributed data
Never true in simulation
Might be approximately true if output is an average, rather
than an extreme
Central limit theorem
Robustness, coverage, precision – see book (Model 6-2)
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 11 of 29
Comparing Two Alternatives
• Usually compare alternative system scenarios,
configurations, layouts, sensitivity analysis
For now, just two alternatives ... more later
• Model 6-3
Model 6-1, but add file Daily Profit.dat to Statistic
module, Output column, Daily Profit row
Saves this output statistic to this file for each replication
Two versions
– Base case – all inputs as originally defined
– More-bookings case – Change Max Load from 24 to 28 hours
(allow more bookings per day ... increase utilization, profit? Maybe)
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 12 of 29
Comparing Two Alternatives (cont’d.)
• Reasonable but not-quite-right idea
Make confidence intervals on expected outputs from each
alternative, see if they overlap
Base case:
492.63 ± 13.81, or [478.82, 506.44]
No
More-bookings case: Overlap
564.53 ± 22.59, or [541.94, 567.12]
But this doesn’t allow for a precise, efficient statistical
conclusion
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 13 of 29
Compare Means via the Output Analyzer
• Output Analyzer is a separate application that
operates on .dat files produced by Arena
Launch separately from Windows, not from Arena
• To save output values (Expressions) of entries in
Statistic data module (Type = Output) – enter
filename.dat in Output File column
Just did for Daily Profit, not Daily Late Wait Jobs
Will overwrite this file name next time … either change the
name here or out in Windows before the next run
.dat files are binary … can only be read by Output Analyzer
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 14 of 29
Compare Means via the Output Analyzer
(cont’d.)
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 15 of 29
Compare Means via the Output Analyzer
(cont’d.)
• Results:
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 19 of 29
Model 6-4 for PAN Experiments
• Same as Model 6-3 except remove Output File entry
in Statistic module
PAN will keep track of outputs itself, so this is faster
• Controls – set up a formal 23 factorial experiment
Control (factor) “−” Level “+” Level
Max Load 20 40 23 = 8 Scenarios
Max Wait 1 7 Also do Base Case
Wait Allowance 0.5 2.0
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 21 of 29
Statistical Comparisons with PAN
• Model 6-4 alternatives were made with 100
replications each
Better than one replication, but what about statistical
validity of comparisons, selection of “the best”?
• Select Total Cost column, Insert > Chart (or or
right-click on column, then Insert Chart)
Chart Type: Box and Whisker
Next, Total Cost; Next defaults
Next, Identify Best Scenarios
– Bigger is Better, Error Tolerance = 0 (not the default)
– Show Best Scenarios; Finish
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 22 of 29
Statistical Comparisons with PAN (cont’d.)
• Vertical boxes:
95% confidence
intervals
• Red scenarios
statistically
significantly
better than blues
More precisely, red
scenarios are 95%
sure to contain the
best one
Narrow down red
set – more
replications, or
Error Tolerance > 0
More details in
book
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 23 of 29
A Follow-Up PAN Experiment
• From 23 factorial experiment, it’s clear that Max
Load matters the most, and bigger appears better
It’s factor 1, varying between “−” and “+” in each scenario
as ordered there, creating clear down/up/down/up pattern
Could also see this by computing main effects estimates
– Consult an experimental-design text
• Eliminate other two factors (fix them at their base-
case levels) and study Max Load alone
Let it be 20, 22, 24, ..., 40
Set up a second PAN experiment to do this, created chart
as before
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 24 of 29
A Follow-Up PAN Experiment (cont’d.)
• Here, profit-maximizing Max
Load is about 30
• But Daily Late Wait
Jobs keeps increasing
(worsening) as Max Load
increases
At profit-maximizing Max Load =
30, it’s 0.908 job/day, which
seems bad since we only take 5
wait jobs/day
Would like to require that it be at
most 0.75 job/day ... still want to
maximize Daily Profit
Allow other two factors back into
the picture ...
Simulation with Arena, 3rd ed. Chapter 6 – Stat. Output Analysis Terminating Simulations Slide 25 of 29
Searching for an Optimal Alternative
with OptQuest
• The scenarios we’ve considered with PAN are
just a few of many possibilities
• Seek input controls maximizing Daily Profit
while keeping Daily Late Wait Jobs ≤ 0.75
• Formulate as an optimization problem:
Maximize Objective function is the simulation model
Daily Profit
Subject to 20 Max Load 40 Could also have
Constraints on the constraints on linear
1 Max Wait 7 input control combinations of input
0.5 Wait Allowance (decision)
2.0 variables control variables (but we
don’t in this problem)
An output requirement,
Daily Late Wait Jobs <not
0.75
an input constraint