7 Input Modeling 2024
7 Input Modeling 2024
2
Steps in a Simulation Study
- Why do we need to do
simulation?
- What do we need to
create a simulation
model?
3
3
Outline
4
Simulation modelling
● Structural modelling:
Entities, resources, path…
● Quantitative modelling:
Interarrival time, processing time, downtime… → Input
modelling
• Suggestions:
– Plan ahead: begin by a practice or pre-observing session, watch
for unusual circumstances
– Combine homogeneous data sets, e.g. successive time
periods, during the same time period on successive days
– Check for relationship between variables, e.g. build scatter
diagram
– sensitivity analysis: try a range of value and see what important
– match model detail with quality of data
– Collect input data, not performance data (however, performance
data can be used for validation)
– remember Garbage In, Garbage Out 8
Course projects
1. Data Collection
2. Identifying Distribution (Family)
3. Parameter Estimation
4. Goodness-of-Fit Tests
Identify the Distribution (Family)
• Histograms
• Context
• Practical
13
Example of Arrival process
Reference:
● Understanding and choosing the right probability distribution
https://onlinelibrary.wiley.com/doi/pdf/10.1002/9781119197096.app03
● Jerry Bank’s chapter 5: Statistical models in simulation
● Jerry Bank's chapter 9: page 346 17
Identify distributions!
Exponential
Normal
Guideline of Probability Distributions
● Binomial: # of successes in n trials
● Negative binomial: # of trials for r successes
● Geometry: #of trials for 1st success
● Poisson: # of independent events that occur in a fixed amount of
time or space
22
Common random variables
● Queuing system: Interarrival time, Service time
→ constant, Normal (>0), Exponential, Gamma, Weibull
Common random variables
<https://www.weibull.com/hotwire/issue21/hottopics21.htm>
Practical Selection of Distribution Family
Probability Distribution
Histogram Histogram
uniform, single hump number of values groupings
(multimodals), data points different
from main set (outliers)
Theoretical Empirical (large sample size)
mathematical formulation divide data into groupings,
calculate proportion, interpolate
ARENA: TRIA( ), NORM( ).. ARENA: CONT( ), DISC( )
Bounded/ unbounded? discrete/continuous?
eg.TRIA is prefered to NORM eg. assigning entity type
discrete/continuous?
ease of parameter
manipulation?
eg.EXPO is prefered to WEIB
26
4 Steps of Input modelling
1. Data Collection
2. Identifying Distribution (Family)
3. Parameter Estimation
4. Goodness-of-Fit Tests
Parameter Estimation (signature)
• To identify a specific instance of the distribution family
• Location parameters — they shift the density function
• Shape parameters — they change the shape of the
density function
• Scale parameters
31
Example of Raw data of Component life (days)
The histogram +
context → X follows
Poisson distribution
36
4 Steps of Input modelling
1. Data Collection
2. Identifying Distribution (Family)
3. Parameter Estimation
4. Goodness-of-Fit Tests
Goodness-of-fit Test
• Graphical approach:
– Q-Q plot: graphs the quantiles of the fitted distribution
vs. the sample quantiles.
– P-P plot: graphs the fitted CDF vs. the empirical CDF
• Statistical Test:
– Kolmogorov-Smirnov test
– Chi-square test
38
Quantile-Quantile Plot
A Median is a
_______% quantile
● Weibull distribution
40
Quantile-Quantile Plot
each other 41
Quantile-Quantile Plot
43
Exercise
Test Exponential,
Uniform
Quantile-
Quantile
Plot
Quantile-Quantile Plot
• Continuous distribution
52
Chi-square Test
Combined because
of min Ei
Sn(x)
Kolmogorov-Smirnov
• Test statistics:
D = max| F(x) - Sn(x)|
61
Example: Test uniform distribution unif(0,1) of these 5 numbers
0.44, 0.81, 0.14, 0.05, 0.93.
62
Exercise
Test Exponential,
Uniform
Important points
• Do sensitivity analysis
• Goal: obtain a good approximation
Fitting a Non-stationary Poisson Process
• Possible approaches:
– Fit a very flexible model with lots of parameters
or
– Approximate constant arrival rate over some basic
interval of time, but vary the rate from time interval to
time interval. (piecewise constant)
66
Fitting a Non-stationary Poisson Process
• The estimated arrival rate during the ith time period is:
- More on:
- Kelton’s chapter 4,5
- Rossetti’s chapter 10
67
Fitting a Non-stationary Poisson Process
--
>1/3(0.5)*(23+26+3
2)
= 54 arrivals/hour
68
Stationary
Need more data for Chi_square
test on Poisson distribution
nonstationary
Arrival Schedule in Arena
71
Possible No Data Distribution
Distribution Parameters Characteristics Example use
Exponential Mean - High variance - Interarrival
- Bound on left time
- Unbounded on - Time to
right machine
failure
(constant
failure rate)
Triangular Min, Mode, - Symmetric or non - activity
Max symmetric times
- Bounded on both
sides
Uniform Min, Max - All values equally - Little
likely known
- Bounded on both about the
sides process
No Data
• Example 9.20: Production planning simulation.
– Input of sales volume of various products is required,
salesperson of product XYZ-123 says that:
• No fewer than 1,000 units and no more than 5,000 units will be sold.
• Given her experience, she believes there is a 90% chance of selling
more than 2,000 units, a 25% chance of selling more than 3,500
units, and only a 1% chance of selling more than 4,500 units.
73
Multi Modal
Example:
1000 observations of the time, in minutes, required to pass through the
metal detector station were collected. The average value of these data
was about 1/2 minute, with standard deviation almost the same. This
suggests that a good input model for the time to pass through the metal
detector is the exponential distribution
<Kelton 4.6.4>
Multivariate and Time-series input model
• Examples:
Multivariate:
– Lead time and annual demand for an inventory model,
increase in demand results in lead time increase,
hence variables are dependent.
Time-series:
– Monthly demand, Time between arrivals of orders to
buy and sell stocks, buy and sell orders tend to arrive
in bursts, hence, times between arrivals are
dependent.
76
Multivariate and Time-Series Input Models
83
AR(1) Autoregressive Order-1 Model
AR(1) Autoregressive Order-1 Model
AR(1) Autoregressive Order-1 Model
EAR(1) Exponential Autoregressive Order-1
Model
EAR(1) Exponential Autoregressive Order-1
Model
NORTA - The Normal-to-Anything
Transformation