Lecture 25
Lecture 25
Sivakumar AI
Lecture: 12
Simulation
Data
Manufacturing
1
Simulation
Lecture (12 December 2002)
� 1. Introduction
� 2. Input probability distributions
� 3. Generating Random Numbers & Random Variates
� 4. Verification and Validation
� 5. Output data analysis
� 6. Simulation life cycle
References
� Law, A. M., Kelton, W. D. Simulation Modeling and Analysis, McGr a w -Hill
1. Introduction
2
The Meaning of Simulation Oxford English Dictionary
�Simulation :
– The technique of imitating the behavior of some
situation or system (Manufacturing, etc) by means
of an analogous situation, model or apparatus,
either to gain information more conveniently or…..
�Simulator :
– An apparatus or system for reproducing the behavior of
some situation or system; ….., and gives the illusion ....
of behaving like the real thing.
System Modeling
Model:
� A simplified or idealized description of a system,
situation, or process, often in mathematical
terms, devised to facilitate calculations and
predictions
� a representation of an object, system or idea in a
form other than that of the entity / system itself.
� an abstraction and simplification of the real
world.
3
System Modeling - Functions of models
� As an analytical tool
� Analyze manufacturing systems
Classification of models
� Physical models
– analog models of continuous systems e.g. traffic flow.
– iconic models e.g. pilot training simulators.
4
Classification of simulation models
� Deterministic vs. Stochastic Simulation models
– If no probabilistic components then it is deterministic
– If random input components used then it is Stochastic.
Simulation models
Manual model generation Auto model generation
Dynamic
Conventional
(near-real-time)
Simulation
Simulation
Model
Model
•Most suitable for planning and
•For analytical work
scheduling
•For decisions or confirmation
of decisions
•Uses near-real -time data
•Rapid model building •Fully automatic
•Manually intensive •Integrated with info. systems
•Hard to maintain •No direct maintenance
5
Some basic definitions
� System state variables
– Collection of information needed to define what is happening in a system to a
sufficient level at given point in time
� Events
– Exogenous e.g. order arrival; Endogenous e.g a machine down
� Resources
– Resource is a static entity that provides service to dynamic entity (a lot)
6
Example: M/M/1 queue
Server
i
(machine)
7
Next-event time advance mechanism in Event-Scheduling
method of an M/M/1 queue
e0 e1 e2 e3 e4 e5
0 t1 t2 c1 t3 c2
A1 A2 A3
S1 S2
copyright © 2002 Sivakumar 16
8
Next-event time advance mechanism in Event-Scheduling
method of an M/M/1 queue
9
Discrete event simulation of an M/M/1 queue
B(t)
1
0
Q(t)
3
2
1
0
Arrivals e2=1.6 e8=4.0 e11=5.8 Time
e1=0.4 e3=2.1 e7=3.8 e10=5.6 e12=7.2
e4=2.4 e6=3.3 e13=8.6
Departures e5=3.1 e5=4.9
copyright © 2002 Sivakumar 19
D (n)
, expected average delay in queue of
the n jobs (customers) is
n
� Di
D (n ) = i = 1
n
copyright © 2002 Sivakumar 20
10
Expected average number of jobs in M/M/1 queue
� iT i
q (n ) = i = 1
T n
copyright © 2002 Sivakumar 21
Since
¥ T (n)
� iT i = � Q ( t ) dt
i=1 0
We get
T (n )
� Q ( t ) dt
q(n ) = 0
Tn
copyright © 2002 Sivakumar 22
11
Expected utilization of the machine in M/M/1 system
T (n )
� B (t ) dt
u (n) = 0
Tn
copyright © 2002 Sivakumar 23
Ti = 0 for i >= 4
and therefore q ( n ) = 9.9/8.6 = 1.15
and
u ( n ) = [(3.3 -0.4) + (8.6-3.8) ]/8.6 = 0.90
copyright © 2002 Sivakumar 24
12
Discrete event simulation
� These values are simple illustrations of
statistics of discrete event simulation
� Discrete-time statistics (e.g. average delay in queue) or
� Continuous -time statistics (e.g. proportion of server busy time)
13
Discrete event simulation
� However values of each experimental
run are based on “sample” size of 1 (one
complete simulation run) and sample
size of 1 is not statistically useful.
� Multiple replications and confidence
interval are therefore essential elements
of simulation output data analysis. (5.
Output data analysis)
14
2. Input probability
distributions
Randomness in Manufacturing
� Process time
� MTTR
� MTTF
� Inter arrival time
� Job types or part mix
� Yield
� Rework
� Transport time
� Setup time
� and so on
15
Using past data
� Estimation of parameters:
– Use the past numerical data to estimate parameters.
16
3. Generating Random
Numbers and Random
Variates
Status
� Early simulation studies required
random number generation and
generation of random variates from the
distributions, often manually coded in
computers.
17
Random number generation for simulation
18
4. Verification and Validation
Definition
� Model verification: Building model right
– Correct translation of conceptual simulation model in to a
working program
– Debugging
19
Verification
� Errors arise from data, conceptual model, computer model,
even computer system.
� Common techniques
– Static: a structured, walk -through technique.
– Dynamic: run program under different conditions, then
check if the output is reasonable.
– Trace: Identify selected state variables (event list) after each
event and check with manual calculations
– Animation: observe animation
What is Validation?
� Valid if it’s output behavior is sufficiently accurate to
fulfill the purpose. Absolute accuracy is not essential
and it is too time-consuming and expensive.
– check underlying theories, assumptions, approximation.
– check model structure and logic, math and relationships
(by tracing entities in all sub-models and main model).
– Model should be validated relative to the measures in
the objective.
20
Validation
� Data have to be validated:
21
Confidence Intervals
� Let Y1, Y 2, …Y n, be IID random variables with mean and yn
sample variance s(2n)
� It can be shown using central limit theorem that, when n is
“sufficiently large”, that an approximate 100(1- a ) percent
confidence interval ( assuming a t distribution with (n -1) degrees
of freedom) is given by the following:
S2 ( n)
u ( n ,a ) = U ( n) + t n -1,(1- a / 2)
n
- t n - 1,( 1- a / 2) + t n- 1,(1-a / 2)
copyright © 2002 Sivakumar 43
22
Validation: Confidence Intervals approach
23
Validation: Confidence Intervals approach
24
Validation : Correlated Inspection Approach
25
5. Output data analysis
� Let F ( y I ) = P ( Y £ ywhere
I ) y is a real
i i
number and I represents initial condition.
26
Transient and steady state behavior
state distribution.
SS state =E(Y )
Yi
3
Yi Steady state
2 Transient state (not necessarily normal density)
E(Y i ) Yi
1
i1 i2 i3
copyright © 2002 Sivakumar 53
27
Output analysis
� Observations from a single replication (row) are not
IID.
� However y1i , y 2i ,...yn i from n replications (column) are
IID observations of the random variable, U i for
i=1,2,…m.
i n
copyright © 2002 Sivakumar 55
28
Steps in conventional simulation
Experimentation
Implementation
Credibility Assessment in
Simulation projects
29
Credibility Assessment Stages
Quality Control of processes between phases
� Peer Assessment
– Panel of persons who are
� experts of the system under study
� expert modelers
� simulation analysts
� familiar with simulation projects
30
Credibility Assessment Stages
Quality Control of processes between phases
31
Credibility Assessment Stages
Quality Control of processes between phases
� Verify experimental design
– is random number generator accurate and true?
– are statistical techniques for design and analysis of
experiments appropriate?
– initial transients accounted for?
– have you ensured identical experimental conditions for each
alternative operating policy?
32
Credibility Assessment Stages
Quality Control of processes between phases
� Presentation
– communicating simulation results
� translate the jargon so non-simulation people
& decision-makers can understand
– presentation techniques
� integrate simulation results with a DSS, so
decision-maker can appreciate the significance
of the simulation results.
Wrap-up
� We have looked at the simulation of a M/M/1 queue
� We have discussed Input probability distributions
� We talked about the Random Numbers and
Random Variates
� We discussed Validation techniques
� We outlined output data analysis and confidence
intervals
� Life cycle and Credibility Assessment of
simulation models
33