1-Introduction Date / /
What is a simulation?
Purpose of Simulation The process of designing a model of
Evaluate the behavior of a system under a real system and conducting
different sets of conditions by using a experiments for the purpose of
model to carry out groups of understanding the behavior of the
experiments. system. We also want to evaluate
various strategies for the operation
How to conduct a simulation? of the system.
1. Design a model for a proposed system
2. Execute the model on a computer Problem Formation
3. Analyze the execution output The problem is understood by the
simulation analyst
Objectives and Planning The formulation is clearly understood
Determine questions to be by the client
answered
Identify scenarios to be Model Translation
investigated The model is built in a computer
Scope recognizable format
Determine end user flexibility is crucial in deciding the type
Determine data of software to be used
requirements
Experimental design
Determine hardware,
Alternative scenarios to be
software and personnel
simulated
requirements
Type of output data
Prepare a time plan
Number of simulation runs
Cost plan and billing
Length of each run
Initialization
variance reduction
Documentation and Reporting
General model logic
Key elements of the model
Data structures
Analysis of Results
Alternative scenarios
The simulation runs
Performance measures or
necessary to estimate the
criteria used
performance measures.
Results of experiments
Statistical tests for
Recommendations
significance and ranking
Interpretation of results
7 Types of Simulation models
Static Models Dynamic models
Deterministic Models Discrete models
Stochastic models Continuous models
Mixed simulation models
1-Introduction Date / /
Deterministic models
Static models Ignore random variation in input
Describe the behavior of a system at a parameters. The same input
single point of time (time plays no role). conditions will always lead to the
Examples: same output. The behavior of the
The end of the year inventory system is entirely predictable.
Total fuel used in a trip
Stochastic models
Total waiting time over a given period
Explicitly consider randomness. Stochastic
Dynamic models model is type of model that incorporates
Describe the behavior of a system randomness or uncertainty into the system
through time being incorporated.
Examples: Examples:
Dynamic fuel usage Operation time
Number of people waiting for a Waiting time
service over time Breakdown frequency
Time to repair
Time between customers
Continuous simulation
This type of simulation deals with systems
where changes occur continuously. The
Discrete simulation models state of the system is represented by
The state of the system changes only at algebraic or differential equations with
discrete event times. It is strictly event variables that continuously over time.
driven. It can reveal various interactions Examples:
among system components. Nuclear reactions
Examples: Chemical processes
Customers arrive at a bank branch Ocean waves
Parts move in a production system
Trucks travel on highway network Simulation Benefits
Cost reduction and time saving
Mixed simulation models We can evaluate changes in a system
The system has discrete elements as well without actually disturbing it
as continuous elements. Visualize operations of a existing
Examples: system under various conditions
Metal molding and casting Time compression
Ecosystems Easy to scale the system and study
Stakeholder interests effects
1. What alternatives are considered
2. What are your conclusions or
recommendations
3. What supporting information can you
provide to merit their confidence in your
analysis?
1-Introduction Date / /
What simulation can do for you
Simulation Limitations Provide estimates of the stats of the
It cannot optimize the systems system performance
performance, it can only describe Evaluate the effects of the system
behavior given under given conditions when changes occur
conditions.
It cannot provide accurate results if
the data and the model are not
accurate
Performance evaluation
Throughput analysis, capacity of the
system, identification of bottlenecks
Time-in-system analysis
Assessment of WIP levels
Setting performance measure
standards in a production system
2-Data Input Date / /
Deterministic Data examples
Collection of input data is considered Computer numerically controlled machining
the most difficult part in simulation processing time
project. Preventative maintenance intervals
Conveyor velocities
Sources for input data Probabilistic Data examples
Historical data Inter-arrival time
Manufacturer specifications Customer service processes
Vendor claims Repair time
Operator estimates
managements estimates
Automatic data capture Discrete Data examples
Direct observations The number of people who arrive
in a system as a group or batch
The number of jobs processed
before a machine experiences a
breakdown
Distributions
A logical element (system function)
Continuous Data examples to allow users to build variability
Time between arrivals into the simulation model using data
Service time collected from the real world.
Route time Example: Observations show that
operations take between 5 and 10
Modelling variability minutes but most often 8.2
Use a random sample from a
distribution Combination Distributions
Combination of a deterministic
Analyzing input data component and a probabilistic
Determining the theoretical distribution for a set component: a minimum time of the
of data usually involves a goodness of fit tests, deterministic component, plus the
The tests are based on some sort of comparison time following some sort of
between the observed data distribution and a distribution
sorresponding theoretical distribution Examples: tech support, oil changes
for cars, flexible manufacturing
Four methods for conducting comparison system cycles
between data and a distribution Two common approaches for
1. Graphic approach determining the data cell histogram
2. Chi square test generation
3. KS test 1. Equal interval approach
4. Square error 2. equal probability approach
2-Data Input Date / /
Equal Interval approach Graphical Approach
Set width of each data cell range to be Create a histogram of the observed data
the same value. This refers to a method create a histogram for the theoretical
of dividing the time duration of a distribution
simulation into equal interval or time visually compare the two histograms for
steps. similarity
make a qualitative decision to similarity of
Equal probability approach the two datasets
use a maximum number of cells not to
exceed 100. The expected number of Chi-square goodness of fit test
observation in each unit cell must be at Based on comparison of the actual
least 5. A simple assumption of equal number of observations and expected
like hood is made possible for each number of observations. It uses equal
outcome. probability approach to determine the
number of cells and the cell
Steps of chi square goodness of fit test boundaries.
1. Establish null alternatives hypotheses
2. Determine a level of test significance Minimum number of data points for
3. calculate the critical value from the chi- the chi-square test
square distribution Generally need at least 20 data
4. calculate the chi-square test statistic points. A realistic minimum would
from the data be at least 30 data points to have a
5. compare the test statistic with the reasonable confidence in the
critical value results.
6. Accept or reject the null hypotheses
KS test
A comparison between the
KS Test limitations
cumulative theoretical distribution
Only used when the number of data points is
and cumulative observed
extremely limited and the chi square test cannot
distribution, Find the maximum
be applied. there is less ability to predict data
difference between them, for a
than other techniques.
critical KS value.
KS Test steps
1. Establish a null and alternative hypotheses
2. determine a level of test significance
3. Detrmine the critical KS value from the
data table
4. Determine the greatest absolute difference
between the two cumulative distributions
5. Compare the different with the critical KS
value
6. Accept or reject the null hypothesis
2-Data Input Date / /
Important data collection principle
Square error
Data must not be biased in any
It uses the interval or equal probability
manner
approach to determine the number of cells
the collected data should
and number of cell boundaries
reasonably contain the complete
It uses summed total of the square of the
range of input data. The data may
error between the observed and theoretical
be present for a particular process
distributions. The error is defined as
If extreme values are not observed
difference between the two distributions for
but do occur and are important,
each individual data cell.
then any resulting theoretical
It is a commonly used an a means of
distribution may not be valid.
assessing the relative suitability of a variety
of different theoretical distributions to
represent the observed distribution. The
best fitting theoretical distribution would be
one with the least summed error
Why is it necessary to determine the
underlying theoretical distribution for an
input set?
Theoretical distributions drive the
simulation model.
What is a common cause of observed data not
being able to be fitted to a theoretical
distribution?
Not enough data was collected. Use a
cumulative distribution approach to
generate data
The data is a combination of a number of
different distributions, the user must
collect individual data for each of the
different types of processes.
2-Data Input Date / /
Uniform distribution
Bernoulli Distribution
probability density function of
continuous random variables
Pass/fail inspection processes
first class vs coach passengers
rush vs regular priority orders
Poisson distribution Exponential distribution
number of arrivals in a given
interval of time
number of entities in a
batch
amount of operations
between breakdowns
takes a mean
inter-arrival of customers
interarrival of orders
interarrival of machine
breakdowns or failures
(shown on the direct right is a
negative exponential distribution)
takes a mean
Triangular distribution Normal distribution
Takes:
minimum, maximum, mode (most
common value)
Can use for:
manufacturing processing time
customer service time
travel time
manufacturing processing time
customer service time
travel time
takes a mean and sd
3-Verifiction Date / /
For a model verification process to be
Verification successful the following must be
”building the model correctly” satisfied
process of ensuring the simulation model 1. Include all components specified
operates as intended under the system definition phase
to get the model not to just run, but to run 2. Be able to rub without any errors or
the way we want it to warnings
continuous process of insuring the model Two approaches to effectively include all
operates as intended components specified in the system
How to ensure the model runs without errors definition phase
1. Animation 1. Divide and conquer approach
2. Manually advancing the simulation clock 2. A subroutine view approach
3. Writing to an output file Divide and conquer approach
Breaking a larger more detailed system model
two approaches to model building
into a smaller, simpler model. Once the model
1. Breadth
operates as intended, small enhancements can
2. Depth first
be made to the model one by one
Breadth first approach
Depth first approach
To build the entire model or a major section of
Select one small section of the system
it with a minimal level of detail. You can then
and model it in the full detail required.
verify that the model works before continuing
You can verify this model section
on.
completely.
Animation
Most effective tool for basic verification, Animation for model verification includes
to detect errors visually, by carefully Using different pictures for different
examining output results. types entities
Following entities through the system
Advancing the simulation clock by event Displaying global variables or entity
To step through the model operation by attribute values
events Displaying plots of global variables or
Fast forward to the part of the model entity attributes
where it is interested in viewing. Displaying levels of system statistics
Event list file Writing to an output file
Not every single detail and variable Output files provide a permanent record
change is necessary of interest to the
Types of output files
user, most simulation software allows
event list file
to designate the level of detail written
variable or attribute output file
to the file
By following the trace file, you can Variable pr attribute output file
identify where the bug exists By looking at the variable or attribute
value, you can ensure that entities are
What is the purpose when a digital
flowing through the model properly
display is used in a simulation model?
example: a listing of the system time for
Displaying plots can show unusual or
the individual entity.
unrealistic trends which indicate you
should investigate the model logic
4-Validation Date
Common simplifications
/ /
Validation 1. Modelling complex processes as a
”building the correct model” single process
A Process to ensure that a model represents 2. Completely omitting processes
reality at a given confidence level
Two types of validation
the model can reasonably represent the
1. face validity
actual system.
2. statistical validity
The developer must achieve both types of
4 reasons why a model may not represent
validity to have confidence the model is
reality
accurate.
1. Assumptions
2. Simplifications Statistical validity
3. Oversights A quantitative comparison between the
4. Limitations output performance of the actual
system and the model.
Face validity involves an objective and
The model, at least on the surface represents quantitative comparison between
reality the actual system and simulation
performed with the assistance of domain model
experts Two steps of statistical validation
continuous process 1. Data collection
use of animations to provide visual details 2. Data analysis
not individually sufficient, but necessary to
complete the model Data collection (statistical validation)
somewhat of a subjective process Data from both the actual system and
simulation model
Data for validation can be individual
Advancing the simulation clock by event observations or summary statistics
To step through the model operation by less data is required for individual
events observational method than the
Fast forward to the part of the model summary method
where it is interested in viewing. Summary statistics
Using mean data from multiple sets of
Individual observations
observations
Using data from individual entity
measures of performance Individual entity data approach
Main issues: Collection of system time for individual
issue of autocorrelation. entities going through the system and the
Ex: if a job has a long system time, the model
job right after may also have a long example: recording the time the order is
system time. received and completed int he actual
Data collection common method system
Flow time for an entity to be processed
through the system
4-Validation Date /
Entire system and model run data
/
How to examine data for normality approach
System and model must be checked for Picks a particular time period and
normality by running a chi square test on each collects all related data, do an averaged,
data set individually repeat until perhaps a total of 30
alpha = 0.05, is normally used average times collected.
minimum of 20 data points are in each data no issues of autocorrelation
set requires a significantly greater
Chi square procedure amount of system data collection than
1. The data must first be divided into a set of individual entity method
cells similar to a histogram. Hypothesis test
2. The number of cells should be no more than If system and model data sets are normal,
100, with each cell having at least 5 a hypothesis test is used to find if the
observations data sets are statistically similar.
3. Count the number of observations that
correspond to each of the equal probable Types of hypothesis tests
cells. non-parametric test
4. If the data is approx. normally distributed, paired f test
the number of observations will be the same smith satterwaithe test
as the number of expected observations. independent t test
5. did not write the rest cuz i gave up
4 reasons why a model cannot be
f-test statistically validated
Compares variance of the system and model 1. non stationary system
data 2. poor input data
independent t-test 3. invalid assumptions
Used when data is normal and data sets have 4. poor modeligng
similar variances
Individual observations
Using data from individual entity
measures of performance
Main issues:
issue of autocorrelation.
Ex: if a job has a long system time, the
job right after may also have a long
system time.
Smith satterthwaite test
If system and model data are both normal
but the variances are dis-similar
Non-parametric test
Used when either one or both of the
variation data sets in non-normal
4-Validation Flow time
Date / /
What to do if statistical validity cannot be What kind of information must be
established observed when validation data are being
The model must be examined for flaws and collected from the system
corrected until statistical validity can be
Types of hypothesis tests
achieved
non-parametric test
paired f test
What must be done to the model data
smith satterwaithe test
before it is compared to the system data
independent t test
Use the same number of observations
from the model as the number of
observations obtained from the actual What are advantages and disadvantages
system to using individual observations vs
load the model in the same manner that summary statistics when validating
it is observed when the system data is model
collected Advantages: requires less system data
record the same type of output data as collection
collected in the system data system Disadvantages: autocorrelation
data process