Introduction to Simulation modeling Submitted To:- Prof. D.K. Chaturvedi, Electrical Department, Faculty of Engineering, Dayalbagh Educational Institute, Dayalbagh, Agra. Submitted By:- Bhupendra Kumar M.Tech(Int.) – 094008
Dec 03, 2014
Introduction to Simulation modeling
Submitted To:-
Prof. D.K. Chaturvedi,Electrical Department,Faculty of Engineering, Dayalbagh Educational Institute, Dayalbagh, Agra.
Submitted By:-
Bhupendra Kumar
M.Tech(Int.) – 094008
Introduction to model
Shannon Defines a model as- A Representation of an object, a system, or
an idea in some form other than that of the entity itself.
Definition - Simulation
“Simulation is the process of designing
a model of a real system and conducting
experiments with this model for the
purpose of either understanding the
behavior of the system and/or
evaluating various strategies for the
operation of the system.”
- Introduction to Simulation Using SIMAN
(2nd Edition)
Some other definitions
• The technique of imitating the behavior of some situation or system by means of an analogous model, situation, or apparatus, either to gain information more conveniently or to train personnel.
• Simulation:– “… as a strategy – not a technology – to mirror,
anticipate, or amplify real situations with guided experiences in a fully interactive way.”
Simulation
• Where simulation fits in
SimulationProgramming
Analysis
ModelingProbability &Statistics
6
• Ways to study a system
Systems, Models, and Simulation
7
Elements of Simulation Analysis
Problem Formulation
Data Collection and Analysis
Model development
Model Verification and Validation
Model Experimentation and Optimization
Implementation of Simulation Results
Major Iterative Loops in a Simulation Study
Brief history• World War II• “Monte Carlo” simulation: originated with the work
on the atomic bomb. Used to simulate bombing raids. Given the security code name “Monte-Carlo”.
• Late ‘50s, early ‘60s• First languages introduced: SIMSCRIPT, GPSS (IBM)• Late ‘60s, early ‘70s• GASP IV introduced by Pritsker. Triggered a wave of
diverse applications. Significant in the evolution of simulation.
• Late ‘70s, early ’80• SLAM introduced in 1979 by Pritsker and Pegden. • Models more credible because of sophisticated tools• SIMAN introduced in 1982 by Pegden. First language to
run on both a mainframe as well as a microcomputer.
• Late ‘80s through present• Powerful PCs• Languages are very sophisticated (market almost saturated)• Major advancement: graphics. Models can now be
animated!
Simulation modeling perspectives• Can be used to study simple systems • Good for comparing alternative designs
– More complex techniques allow “optimization” using a simulation model
• can be used to understand the behavior of the system or evaluate strategies for the operation of the system
• Model complex systems in a detailed way• Construct theories or hypotheses that account for the observed
behavior• Use the model to predict future behavior, that is, the effects that
will be produced by changes in the system• Analyze proposed systems
11
SIMULATION “WORLD-VIEWS”
Pure Continuous Simulation
Pure Discrete Simulation– Event-oriented– Activity-oriented– Process-oriented
Combined Discrete / Continuous Simulation
12
Examples Of Both Type Models
Continuous Time and Discrete Time Models:CPU scheduling model vs. number of students attending the class.
Advantages to Simulation:• Can be used to study existing systems without disrupting the ongoing operations.
• Proposed systems can be “tested” before committing resources.
• Allows us to control time.
• Allows us to identify bottlenecks.
• Allows us to gain insight into which variables are most important to system performance.
• Flexibility to model things as they are (even if messy and complicated) Allows uncertainty, nonstationarity in modeling
Some Primary Uses of Simulation Models in Operations
• Find the bottlenecks• How are resources utilized• Capacity planning• Impact of configuration changes• Understand the system dynamics
Disadvantages to Simulation
• Model building is an art as well as a science. The quality of the analysis depends on the quality of the model and the skill of the modeler.
• Simulation results are sometimes hard to interpret.
• Simulation analysis can be time consuming and expensive. Should not be used when an analytical method would provide for quicker results.
• Not guarantee to provide optimal solution
Limitations & pitfalls• Failure to identify objectives clearly up front
• In appropriate level of detail (both ways)
• Inadequate design and analysis of simulation• experiments
• Inadequate education, training
• Failure to account correctly for sources of randomness in the system under consideration
• Failure to collect good system data, e.g. not enough data to create a good model
17
Applications:
Designing and analyzing manufacturing systems
Evaluating H/W and S/W requirements for a computer system
Evaluating a new military weapons system or tactics
Determining ordering policies for an inventory system
Designing communications systems and message protocols for them
18
Applications:(continued)
Designing and operating transportation facilities such as freeways, airports, subways, or ports
Evaluating designs for service organizations such as hospitals, post offices, or fast-food restaurants
Analyzing financial or economic systemsmaterial handling systems, assembly lines,
automated production facilities.
Hand and manual simulation concepts
• The numerical methods for manual simulation can be classified into the following two classes:
• 1. One-step or single-step methodEuler’s method, Runge–Kutta method.• 2. Multistep methodMilne, Adams–Bashforth methods, predictor
corrector method.
One-Step vs Multi-Step
21
Euler Method
• Modified Euler method is derived by applying the trapezoidal rule to integrating ; So, we have
• If f is linear in y, we can solved for similar as backward Euler method
• If f is nonlinear in y, we necessary to used the method for solving nonlinear equations i.e. successive substitution method (fixed point)
),(' tyfyn
),('),(2
''11 nnnnnnn tyfyyy
hyy
1ny
22
Example: solve
Solution:f is linear in y. So, solving the problem using modified Euler
method for yields
25.0,10,1)0(,1' 0 htyytyy
hyt
h
th
y
hth
yth
y
ytyth
y
yyh
yy
n
n
n
n
nnnn
nnnnn
nnnn
1
1
11
111
11
)2
1(
)2
1(
)2
1()2
1(
)11(2
)''(2
ny
23
Graph the solution
Predictor-Corrector Methods
• The Predictor-Corrector technique uses an explicit scheme (like the Adams-Bashforth Method) to estimate the initial guess for xi+1 and then uses an implicit technique (like the Adams-Moulton Method) to correct xi+1.
Predictor-Corrector Example
• Adams third order Predictor-Corrector scheme:• Use the Adams-Bashforth three point explicit scheme
for the initial value.
• Use the Adams-Moulton three-point implicit method to correct.
2i1iii1i 5162312
* fffh
xx
),(),(8),(512
11*
11i1i iiiiii xtfxtfxtfh
xx
Predictor-Corrector Example
• Consider Exact Solution
• Initial condition: x(0) = 1
• Step size: h = 0.1
• We will use the 3 Point Adams-Bashforth and 3 point Adams-Moulton. Both require 3 points to get started!
2txdt
dx t222 ettx
Predictor-Corrector Example
• From the 4th order Runge Kutta
• 3-point Adams-Bashforth Predictor Value:
340184.1121587.0218597.1
)1(5)094829.1(16)178597.1(2312
1.0 2
*3
xx
218597.1
178597.1218597.1,2.0
094829.1104829.1,1.0
0000.11,0
2
2.0
1.0
0
x
ff
ff
ff
Predictor-Corrector Example
• To correct, we need f(t3 , x3*)
• 3-point Adams-Moulton Corrector Value:
250184.1340184.1,3.0 f
340138.1
121541.0218597.1
094829.11178597.18250184.1512
1.0 23
xx
The values for the Predictor-Corrector Scheme
Three Point Predictor-Corrector Schemet x f A-B sum x* f* A-M sum0 1 1
0.1 1.104829 1.0948290.2 1.218597 1.178597 0.121587 1.340184 1.250184 0.1215410.3 1.340138 1.250138 0.128081 1.468219 1.308219 0.128030.4 1.468168 1.308168 0.133155 1.601323 1.351323 0.1330980.5 1.601266 1.351266 0.136659 1.737925 1.377925 0.1365970.6 1.737863 1.377863 0.138429 1.876291 1.386291 0.1383590.7 1.876222 1.386222 0.13828 2.014502 1.374502 0.1382040.8 2.014425 1.374425 0.136013 2.150438 1.340438 0.1359280.9 2.150353 1.340353 0.131404 2.281757 1.281757 0.131311 2.281663 1.281663 0.124206 2.405869 1.195869 0.124102
Predictor-Corrector Example
The predictor-corrector method produces a solution with nearly the same accuracy as the RK order 4 method.
Generally, the n-step method will have truncation error of order at least n.
-10
-8
-6
-4
-2
0
2
4
0 1 2 3 4
x V
alu
e
t Value
3 Point Predictor-Corrector Method
4th order Runge-Kutta
Exact
Adam Moulton
Adam Bashforth
Predictor-Corrector Example