8/3/2019 Simulation First Unit 20112012
1/72
VELAGAPUDI RAMAKRISHNA
SIDDHARTHA ENGINEERING COLLEGEDEPARTMENT OF INFORMATION TECHNOLOGYAccredited by NBA Approved by AICTE - Autonomous
4-May-12
Simulation and modeling
Unit I
8/3/2019 Simulation First Unit 20112012
2/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 2
Introduction to System
A Systemis defined to be a set of elements which interact or interrelated insome fashion Elements having no relationship with the set of elements that have been
chosen as system can not affect the system hence irrelevant A System may consist of sub systems or may be a part of a larger
system
Example: Factory system This system consists of two major components- fabrication department
and assembly department.
Elements that often make up the system are called Entities
Entities that comprise a system need not be tangible e.g, a queuingsystem is made up of customers, queue and servers Customers and servers are physical entities but queue itself is a
concept
8/3/2019 Simulation First Unit 20112012
3/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 3
More components of a system
An Attributeis a property of a system
An Activityrepresents a time period of specified length
Stateof system is defined to be that collection of variablesnecessary to describe the system at any time , relative to the
objective of the study In the study of a bank possible state variables are number of
busy tellers, number of customers waiting in the queue or beingserved, arrival and service times of the next customer
An Eventis defined as an instantaneous occurrence that may
change the state of the system
8/3/2019 Simulation First Unit 20112012
4/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 4
More terms of a system
Endogenous used to describe the activities and eventsoccurring within a system
Exogenous is used to describe activities and events inthe environment that affect the system
In the bank arrival of a customer is exogenous event andcompletion of service of a customer is endogenous event
8/3/2019 Simulation First Unit 20112012
5/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 5
Examples: Traffic System
Entities Cars
Attributes (property of an entity) speed, distance
Activities (time period of specified length) driving
Events arrival, departure
State variables Number of busy tellers, number of customerswaiting
8/3/2019 Simulation First Unit 20112012
6/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 6
Examples: Banking System
Entities Customers
Attributes (property of an entity) Checking account balance, makingdeposits, getting a draft made
Activities (time period of specified length) Time taken to make a
deposit, time taken to get a draft made Events arrival, departure
State variables Number of busy tellers, number of customerswaiting
8/3/2019 Simulation First Unit 20112012
7/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 7
Examples: Rail System
Entities Commuters
Attributes (property of an entity) Origination ,Destination
Activities (time period of specified length) Traveling
Events arrival at station, arrival at destination
State variables Number of commuters waiting at eachstation, number of commuters traveling
8/3/2019 Simulation First Unit 20112012
8/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 8
Examples: Production System
Entities Machines
Attributes (property of an entity) Speed , Capacity,Breakdown rate
Activities (time period of specified length) Welding,Cutting, Stamping
Events breakdown
State variables Status of machines busy, idle or
down
8/3/2019 Simulation First Unit 20112012
9/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 9
Entities Messages
Attributes (property of an entity) Length , Destination
Activities (time period of specified length) Transmitting
Events arrival at destination State variables Number of messages waiting to be
transmitted
Examples: Communications System
8/3/2019 Simulation First Unit 20112012
10/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 10
Examples: Inventory System
Entities Warehouse
Attributes (property of an entity) Capacity
Activities (time period of specified length) Issue,
Receipt Events Demand
State variables Level of inventory, Backloggeddemands
8/3/2019 Simulation First Unit 20112012
11/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 11
Introduction to model
A model is a system that is used as a surrogate for another system
Reason for using a model
Helps in understanding the behaviour of a real system before itis built
Cost of building and experimenting with a model is less Models can be used to mitigate risk pilots can be taught how to
cope with wind sheer while landing
Models have the capability of scale time or space in favourablemanner wind sheer can be produced on demand
8/3/2019 Simulation First Unit 20112012
12/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 12
Types of Models
Broadly there are two types
Physical
(Scale models, prototype plants,)
Mathematical
(Analytical queuing models, linear programs,simulation)
8/3/2019 Simulation First Unit 20112012
13/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 13
Building a simulation gas station
Assume single pump served by a single service man arrival of cars as well their service times are random.
At first identify the: states: number of cars waiting for service and number of cars
served at any moment events: arrival of cars, start of service, end of service entities: these are the cars queue: the queue of cars in front of the pump, waiting for service random realizations: inter-arrival times, service times
distributions: we shall assume exponential distributions for boththe inter-arrival time and service time.
8/3/2019 Simulation First Unit 20112012
14/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 14
Ten Types of Models
Iconic - physical models that are images of the real world;dimensions are usually scaled up or down; for example, models ofcars might be constructed and tested in a wind tunnel
Analog - model that substitutes one set of properties for another;may be iconic or mathematical; electric resistance often used as an
analog of the friction of a fluid flowing in a pipe; this approach is notas widely used as at one time digital computers have allowed thedevelopment of other modeling techniques that have replacedanalog models
8/3/2019 Simulation First Unit 20112012
15/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 15
Ten Types of Models
Stochastic - probabilistic model that uses randomness to accountfor immeasurable factors (e.g., weather)
Deterministic - model that does not use randomness but usesexplicit expressions for relationships that may or may not involvetime rates of change
Discrete - model where state variables change in steps as opposedto continuously with time (e.g., number of cattle in a barn); may bedeterministic or stochastic
8/3/2019 Simulation First Unit 20112012
16/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 16
Ten Types of Models
Continuous - model whose state variables change continuouslywith time (e.g., biomass in a field); usually sets of differentialequations used; initial conditions required (can be difficult to obtainfor some systems!)
Combined - model where some state variables changecontinuously and others change in steps at event times; forexample, a field of hay might be modeled using a combinedapproach with the biomass modeled continuously during growth andthen as a discrete event when harvested
8/3/2019 Simulation First Unit 20112012
17/72
B L N Phaneendra kumar
DEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 17
Ten Types of Models
Mathematical - abstract model usually written inequation form
Object-oriented - use objects that are abstractions ofreal world objects and develop relationships and actions
between objects; comes from field of artificial intelligence Heuristic - heuristics (rules) are used to model the
system; comes from field of artificial intelligence.
8/3/2019 Simulation First Unit 20112012
18/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 18
Types of Simulation Models
System model
deterministic stochastic
static dynamic static dynamic
continuous discrete continuous discrete
Monte Carlosimulation
Discrete-eventsimulation
Continuoussimulation
Discrete-eventsimulation
Continuoussimulation
8/3/2019 Simulation First Unit 20112012
19/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 19
Stochastic vs. Deterministic
Stochastic simulation: a simulation that contains random(probabilistic) elements, e.g.,
Examples Inter-arrival time or service time of customers at a restaurant or
store
Amount of time required to service a customer Output is a random quantity (multiple runs required to analyze
output)
Deterministic simulation: a simulation containing no randomelements
Examples Simulation of a digital circuit Simulation of a chemical reaction based on differential equations
Output is deterministic for a given set of inputs
8/3/2019 Simulation First Unit 20112012
20/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 20
Static vs. Dynamic Models
Static modelsModel where time is not a significant variable
Examples Determine the probability of a winning solitaire hand
Static + stochastic = Monte Carlo simulation Statistical sampling to develop approximate solutions to
numerical problems
Dynamic modelsModel focusing on the evolution of the system under
investigation over time
8/3/2019 Simulation First Unit 20112012
21/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 21
Continuous vs. Discrete
Discrete
State of the system is viewed as changing at discrete points intime: arrival of a customer in a queuing system
An event is associated with each state transition Events contain time stamp
Continuous
State of the system is viewed as changing continuously acrosstime: rise if water level in a dam
System typically described by a set of differential equations
Few systems in practice are wholly discrete or continuous
8/3/2019 Simulation First Unit 20112012
22/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Continuous / Discrete Systems
Continuous State and Discrete State Models
Example: Time spent by students in a weekly class vs.Number of jobs in Q.
22
8/3/2019 Simulation First Unit 20112012
23/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE 23
Combined Systems
Communication channel
Modeled as discrete if characteristics of movement ofeach message is important
Modeled as continuous if flow of messages as aggregate
over the channel is important
8/3/2019 Simulation First Unit 20112012
24/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Simulation
Simulation is defined as the process of creating a modelof anexisting or proposed systemin order to identify and understandthose factors which control the system and/or to predict the futurebehavior of the system.
Almost any system which can be quantitatively described usingequations and/or rules can be simulated.
Simulation is used to predict the future behavior of a system, anddetermine what we can do to influence that future behavior.
Simulation is a powerful and important tool because it provides a
way in which alternative designs, plans and/or policies can beevaluated without having to experiment on a real system, which maybe prohibitively costly, time-consuming, or simply impractical to do.
24
8/3/2019 Simulation First Unit 20112012
25/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
When Simulation is the Appropriate Tool
Simulation enables the study of, and experimentation with, the internalinteractions of a complex system, or of a subsystem within a complexsystem.
Informational, organizational, and environmental changes can besimulated, and the effect of these alterations on the models behaviorcan be observed.
The knowledge gained in designing a simulation model may be of greatvalue toward suggesting improvement in the system under investigation. By changing simulation inputs and observing the resulting outputs,
valuable insight may be obtained into which variables are mostimportant and how variables interact.
Simulation can be used to experiment with new designs or policies prior
to implementation, so as to prepare for what may happen. Simulation can be used to verify analytic solutions. By simulating different capabilities for a machine, requirements can be
determined.
25
8/3/2019 Simulation First Unit 20112012
26/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
When Simulation is not Appropriate
When the problem can be solved using common sense.
When the problem can be solved analytically.
When it is easier to perform direct experiments.
When the simulation costs exceed the savings.
When the resources or time are not available. When system behavior is too complex or cant be defined.
When there isnt the ability to verify and validate the model
26
8/3/2019 Simulation First Unit 20112012
27/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Advantages
the basic concept of simulation is easy to comprehend
easy to justify to management or customers than someof the analytical models
be more credible because its behavior has been
compared to that of the real system
requires fewer simplifying assumptions and hencecaptures more of the true characteristics of the systemunder study
can test new designs, layout, etc. without committingresources to their implementation
27
8/3/2019 Simulation First Unit 20112012
28/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Advantages contd..
can be used to explore new staffing policies, operatingprocedure, decision rules, organizational structures,information flows, etc. without disrupting the ongoingoperations
allows us to identify bottlenecks in information, materialand product flows and test options for increasing the flowrates
allows us to test hypothesis about how or why certain
phenomena occur in the system
28
8/3/2019 Simulation First Unit 20112012
29/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Advantages contd..
allows us to control time. Thus we can operate thesystem for several months or years of experience in amatter of seconds allowing us to quickly look at long timehorizons or we can slow down phenomena for study
allows us to gain insights into how a modeled systemactually works and understanding of which variables areimportant to performance
great strength is its ability to let us experiment with new
and unfamiliar situations and to answer what ifquestions
29
8/3/2019 Simulation First Unit 20112012
30/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Disadvantages
Model building requires special training. It is an art that is learnedover time and through experience. Furthermore, if two models areconstructed by two competent individuals, they may havesimilarities, but it is highly unlikely that they will be the same.
Simulation results may be difficult to interpret. Since mostsimulation outputs are essentially random variables (they are usually
based on random inputs), it may be hard to determine whether anobservation is a result of system interrelationships or randomness.
Simulation modeling and analysis can be time consuming andexpensive. Skimping on resources for modeling and analysis mayresult in a simulation model or analysis that is not sufficient for thetask.
Simulation is used in some cases when an analytical solution ispossible. This might be particularly true in the simulation of somewaiting lines where closed-form queuing models are available.
30
8/3/2019 Simulation First Unit 20112012
31/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Manufacturing Applications
Analysis of electronics assembly operations Design and evaluation of a selective assembly station for high-precision scroll
compressor shells Comparison of dispatching rules for semiconductor manufacturing using large-
facility models Evaluation of cluster tool throughput for thin-film head production
Determining optimal lot size for a semiconductor back-end factory Optimization of cycle time and utilization in semiconductor test manufacturing Analysis of storage and retrieval strategies in a warehouse Investigation of dynamics in a service-oriented supply chain Model for an Army chemical munitions disposal facility
31
8/3/2019 Simulation First Unit 20112012
32/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Applications
Construction Engineering Construction of a dam embankment Trenchless renewal of underground urban infrastructures Activity scheduling in a dynamic, multiproject setting Investigation of the structural steel erection process Special-purpose template for utility tunnel constructionMilitary Application Modeling leadership effects and recruit type in an Army recruiting station Design and test of an intelligent controller for autonomous underwater
vehicles Modeling military requirements for nonwarfighting operations Multitrajectory performance for varying scenario sizes Using adaptive agent in U.S Air Force pilot retention
32
8/3/2019 Simulation First Unit 20112012
33/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Logistics, Transportation, andDistribution Applications
Evaluating the potential benefits of a rail-traffic planning algorithm Evaluating strategies to improve railroad performance Parametric modeling in rail-capacity planning Analysis of passenger flows in an airport terminal Proactive flight-schedule evaluation
Logistics issues in autonomous food production systems forextended-duration space exploration
Sizing industrial rail-car fleets Product distribution in the newspaper industry Design of a toll plaza Choosing between rental-car locations Quick-response replenishment
33`
8/3/2019 Simulation First Unit 20112012
34/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Applications contd..
Business Process Simulation
Impact of connection bank redesign on airport gate assignment
Product development program planning
Reconciliation of business and systems modeling
Personnel forecasting and strategic workforce planning
Human Systems
Modeling human performance in complex systems
Studying the human element in air traffic control
34
8/3/2019 Simulation First Unit 20112012
35/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
Simulation vs. Analytical Methods
Comparison of specific aspects
Macro vs. micro
Uniformity vs. randomness
Effects of interactions
Single answer vs. range of outcomes
Numerical vs. animation
35
8/3/2019 Simulation First Unit 20112012
36/72
B L N Phaneendra kumarDEPARTMENT OF Information TechnologyVR SIDDHARTHA ENGINEERING COLLEGE
1. Macro vs. Micro
Analytical methods ignore the differences betweenindividuals, and rely on the analysis of averagebehaviour.
Simulation models, on the other hand, use thedistribution of population behaviour, and can accountaccurately for peaking of demand during short timeintervals.
36
8/3/2019 Simulation First Unit 20112012
37/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
2. Uniformity vs. Randomness
Analytical models assume that processes are distributeduniformly and behave homogeneously over a period oftime.
Simulation models recognize and account for therandomness of processes.
37
8/3/2019 Simulation First Unit 20112012
38/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
3. Effects of Interactions
Analytical methods are limited to evaluating the outcomeof a stand-alone process and cannot recognize theinteraction effects that parallel processes may have onthat process.
Simulation methods are able to explicitly model suchinteraction effects, allowing the analyst to measure theimpact of process interactions.
38
8/3/2019 Simulation First Unit 20112012
39/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
4. Single Answer vs. Range ofOutcomes
The solution of analytical models yields one answer tothe question of interest.
Simulation models, in contrast, generate a variety ofstatistics that can be used to evaluate a systems
performance.
39
8/3/2019 Simulation First Unit 20112012
40/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
5. Numerical vs. Animation
Analytical solutions give only numerical results, whichare simple, but less persuasive.
Simulation models, however, may provide computeranimation in addition to numerical results. This picture
of the result can be very persuasive in conveying theresult of analysis.
40
8/3/2019 Simulation First Unit 20112012
41/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE 41
Steps in Simulation Study
Problem Formulation
Setting objectives & Plan
Data Collection
Model Conceptualization
Verify model
Validate model
Fundamentallyan iterative
processModel Translation
Experimental DesignOver to next
slide
8/3/2019 Simulation First Unit 20112012
42/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE42
Steps in Simulation Study
Production run & Analysis
More runs?
Documentation & Reporting
Implementation
From previous slide
8/3/2019 Simulation First Unit 20112012
43/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Steps insimulation
8/3/2019 Simulation First Unit 20112012
44/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE8001: Simulation and Modeling(2011-12) 44
8/3/2019 Simulation First Unit 20112012
45/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE45
Problem Formulation
Initial step
Identify controllable and uncontrollable inputs
Identify constraints on the decision variables
Define measure of system performance and an objective function
Develop a preliminary model structure to interrelate the inputs andthe measure of performance
May be the problem needs reformulation as the study progresses
8/3/2019 Simulation First Unit 20112012
46/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE46
Setting Objectives & Plan
What do you (or the customer) hope to accomplish with the model May be an end in itself
Predict the weather Train personnel to develop certain skills (e.g., driving)
More often a means to an end
Optimize a manufacturing process or develop the most costeffective means to reduce traffic congestion in some part of a city
Often requires developing a business case to justify the cost Improved efficiency will save the company $$$
Example: electronics
Even so, may be hard to justify in lean times
Goals may not be known when you start the project! One often learns things along the way
8/3/2019 Simulation First Unit 20112012
47/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE47
Develop Conceptual Model
An abstract (i.e., not directly executable) representation of the system
What should be included in model? What can be left out?
What abstractions should be used
Level of detail
Often a variation on standard abstractions
Example: transportation Fluid flow?
Queuing network?
Cellular automation?
What metrics will be produced by the model?
Appropriate choice depends on the purpose of the model
8/3/2019 Simulation First Unit 20112012
48/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE48
Data Collection
Regardless of the method used to collect the data, thedecision of how much to collect is a trade-off betweencost and accuracy
Constant inter play between construction of the model
and the collection of needed input Changes with the degree of complexity of the model
Data should be collected for the validation as well
8/3/2019 Simulation First Unit 20112012
49/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE49
Model translation
Model requires great deal of information andcomputation
Needs to be translated into computer recognizableformat using either special purpose or general purpose
languages
Focus of this course will be using Excel for modelbuilding
Arena characteristics will be introduced
8/3/2019 Simulation First Unit 20112012
50/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE50
Verification & Validation
Verification focuses on the internal consistency of amodel
Validation is concerned with the correspondencebetween the model and the reality
Validation is applied to those processes which seek todetermine whether or not a simulation is correct withrespect to the "real" system
Validation is concerned with the question "Are webuilding the right system?
8/3/2019 Simulation First Unit 20112012
51/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE51
Verification & Validation
Verification seeks to answer the question "Are webuilding the system right?"
Verification checks that the implementation of thesimulation model (program) corresponds to the model
Validation checks that the model corresponds to reality Calibration checks that the data generated by the
simulation matches real (observed) data.
8/3/2019 Simulation First Unit 20112012
52/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE52
Experimental Design
Alternatives to be simulated must be determinedGood experimental design Randomization
Replication
Local control For each system decisions needed Length of the initialization period
Length of the simulation run
Number of replication
8/3/2019 Simulation First Unit 20112012
53/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
8001: Simulation and Modeling(2010-11) 53
Production runs and analysis
To measure performance of the simulation system sodesigned
Also to determine if more runs needed till results areconsistent
8/3/2019 Simulation First Unit 20112012
54/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
8001: Simulation and Modeling(2010-11) 54
Documentation & Reporting
Two types
Program
Needed if it is to be used again
May need to be applied for different system by different
people For modification
Progress
Provides important written history of simulation project
Should be frequent as the project progresses
8/3/2019 Simulation First Unit 20112012
55/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
8001: Simulation and Modeling(2010-11) 55
Implementation
Success depends how well previous steps were followed
8/3/2019 Simulation First Unit 20112012
56/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
8001: Simulation and Modeling(2010-11) 56
8/3/2019 Simulation First Unit 20112012
57/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE57
OTHER TYPES OF SIMULATION
Continuous simulation Typically, solve sets of differential equations numerically over
time
May involve stochastic elements
Some specialized software available; some discrete-eventsimulation software will do continuous simulation as well
Combined discrete-continuous simulation
Continuous variables described by differential equations
Discrete events can occur that affect the continuously-changingvariables
Some discrete-event simulation software will do combineddiscrete-continuous simulation as well
8/3/2019 Simulation First Unit 20112012
58/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
A Monte Carlo method is a technique that involves using randomnumbers and probability to solve problems. The term Monte CarloMethod was coined by S. Ulam and Nicholas Metropolis in referenceto games of chance, a popular attraction in Monte Carlo, Monaco.
Monte Carlo simulation is a method for iterativelyevaluating adeterministic model using sets of random numbers as inputs. Thismethod is often used when the model is complex, nonlinear, orinvolves more than just a couple uncertain parameters.
A Monte Carlo method can be loosely described as a statisticalmethod used in simulation of data.
It is a simulation that makes use of internally generated (pseudo)random numbers
Example: CPU time on some of the fastest computers in the world isspent performing Monte Carlo simulations.
Monte Carlo Simulation
8/3/2019 Simulation First Unit 20112012
59/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
The Monte Carlo method is just one of many methods foranalyzing uncertainty propagation, where the goal is todetermine how random variation, lack of knowledge,or erroraffects the sensitivity, performance,
or reliabilityof the system that is being modeled.
Monte Carlo simulation is categorized as a samplingmethod because the inputs are randomly generated
from probability distributionsto simulate the process ofsampling from an actual population.
Monte Carlo Simulation contd..
8/3/2019 Simulation First Unit 20112012
60/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
60
Other Types of Simulation(contd.)
Monte Carlo simulationWide variety of mathematical problems
Example: Evaluate a difficult integral Let X~ U(a, b), and let Y= (ba) g(X)
Then
8/3/2019 Simulation First Unit 20112012
61/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
The data generated from thesimulation can be representedas probability distributions (or
histograms) or convertedto error bars, reliabilitypredictions, tolerance zones,and confidence intervals.
Monte carlo Simulation contd..
8/3/2019 Simulation First Unit 20112012
62/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Monte Carlo Simulation contd..
The Monte Carlo method provides approximate solutionsto a variety of mathematical problems by performingstatistical sampling experiments on a computer.
The method applies to problems with no probabilistic
content as well as to those with inherent probabilisticstructure.
8/3/2019 Simulation First Unit 20112012
63/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Steps in Monte Carlo Simulation
Step 1:Create a parametric model, y = f(x1, x2, ..., xq).
Step 2:Generate a set of random inputs, xi1, xi2, ..., xiq.
Step 3:Evaluate the model and store the results as yi.
Step 4:Repeat steps 2 and 3 for i= 1 to n.
Step 5:Analyze the results using histograms, summarystatistics, confidence intervals, etc.
8/3/2019 Simulation First Unit 20112012
64/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Monte Carlo Example:
Estimating p
Monte Carlo Simulation contd
8/3/2019 Simulation First Unit 20112012
65/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
If you are a very poor dart player, it is easy to
imagine throwing darts randomly at the above figure,
and it should be apparent that of the total number of
darts that hit within the square, the number of darts
that hit the shaded part (circle quadrant) isproportional to the
area of that part. In other words,
Monte Carlo Simulation contd..
Monte carlo Simulation contd
8/3/2019 Simulation First Unit 20112012
66/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Monte carlo Simulation contd..
Needle Experiment
8/3/2019 Simulation First Unit 20112012
67/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Buffon's original form was to drop a needle of length L at
random on grid of parallel lines of spacing D.
For L less than or equal D we obtain
P (needle intersects the grid) = 2 L / PI D.
If we drop the needle N times and count R intersections we obtain
P = R / N,
PI = 2 L N / R D.
Needle Experiment
Needle Experiment
8/3/2019 Simulation First Unit 20112012
68/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Needle Experiment
Needle Experiment
8/3/2019 Simulation First Unit 20112012
69/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Pi= 2 * L * N / R * D
Take L=1
D = 1Then Pi= 2 * N / R
Where
R is intersections(Hits) and
N is no of times needle
dropped
Needle Experiment
Needle Experiment
8/3/2019 Simulation First Unit 20112012
70/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Pi= 2 * L * N / R * D
Take L=1
D = 1
Then Pi= 2 * N / R
Where
R is intersections(Hits) and
N is no of times needle dropped
Needle Experiment
Needle Experiment
8/3/2019 Simulation First Unit 20112012
71/72
B L N Phaneendra kumarDEPARTMENT OF Information Technology
VR SIDDHARTHA ENGINEERING COLLEGE
Pi= 2 * L * N / R * D
Take L=1
D = 1
Then Pi= 2 * N / RWhere
R is intersections(Hits) and
N is no of times needledropped
Needle Experiment
Needle Experiment
8/3/2019 Simulation First Unit 20112012
72/72
B L N Phaneendra kumar
Pi= 2 * L * N / R * D
Take L=1
D = 1Then Pi= 2 * N / R
Where
R is intersections(Hits) and
N is no of times needle dropped
Needle Experiment