SlideShare une entreprise Scribd logo
1  sur  30
CS 8CS 85544
Computer SimulationComputer Simulation
Lecture Notes 01
Introduction to SimulationIntroduction to Simulation
 Simulation refers to a broad collection of methods
and applications to mimic the behavior of real
systems usually on a computer with appropriate
software.
 Simulation is the process of
 Formulating a model of the real system, and
 Conducting experiments with the model in order to
 understand (predict) the systems behavior, and
 evaluate various alternatives (design or
operational).
Introduction to SimulationIntroduction to Simulation
 System: Collection of elements working together
toward accomplishment of a specific objective.
 The facility or process of interest is usually called a
system.
 Ways to study a system include experimenting with
 the actual system, and
 a model of the system.
 Model: Simplified representation or abstraction of a
system.
Types of SimulationTypes of Simulation
 Iconic (physical) models
 Precise replica of an object (maybe in different
material or at smaller scale).
 Used primarily for training and research purposes.
 Examples:
Flight simulators (how to fly and handle emergency
situations)
Wind tunnels
Desktop manufacturing labs
 Symbolic models
 The real system is represented by mathematical equations
and logical relations.
 Basically computer simulation
Types of Symbolic SimulationTypes of Symbolic Simulation
ModelsModels
Deterministic Stochastic
 No random variables (no
uncertainty)
 Input: random
variable(s)
 Given input → unique
output
(might take a lot of
computer time to evaluate)
 Output is also a
random variable
Types of Symbolic SimulationTypes of Symbolic Simulation
ModelsModels
Static Dynamic
 No time dimension  System behavior
changes over time
 Example: Monte Carlo
Simulation
 Example: A conveyor
system
Types of Symbolic SimulationTypes of Symbolic Simulation
ModelsModels
Continuous Discrete
 System state changes
continuously
 System state
changes at discrete
points in time
 Example: Altitude of an
airplane (involves differential
equations)
 Example:
Customers visiting a
supermarket
For Dynamic simulationFor Dynamic simulation
Continuous SimulationContinuous Simulation
Discrete SimulationDiscrete Simulation
Monte Carlo (MC) SimulationMonte Carlo (MC) Simulation
 A random number (RN) is a random variable (RV) ~
Uniform (0,1)
 In Monte Carlo simulation, an iid sample of RNs is
obtained to solve a problem
Static, Stochastic MC SimulationStatic, Stochastic MC Simulation
Example: Estimation ofExample: Estimation of ππ
Area of the circle is π r2
= π
since r = 1
Area of shaded quarter-circle
= π/4
How can we use MC
simulation in estimating the
value of π ?
 Area of small square (in the main quadrant) = 1
 (Area of quarter-circle) / (Area of small square) = π/4
Algorithm:
 S1. Generate two RNs ~ uniform (0,1).
 S2. Using these as (x, y) coordinates of a point, find
the Euclidean distance, d, from the origin.
 S3. If d < 1 then the point is inside the quarter-circle,
otherwise it is outside the quarter-circle (but inside
the small square).
Static, Stochastic MC SimulationStatic, Stochastic MC Simulation
Example: Estimation ofExample: Estimation of ππ
Static, Stochastic MC SimulationStatic, Stochastic MC Simulation
Example: Estimation ofExample: Estimation of ππ
 Repeat (replicate) S1-S3 n times where n is a very
large number. (The points will be distributed
uniformly inside the small square.) Count the
number of times the generated point falls inside the
circle, nq. Then, is an estimate for π/4.
 95% confidence interval for π is :
nnp q /ˆ =
n
pp
p
)ˆ1(ˆ
)96.1(4ˆ4
−
±
Static, Stochastic MC SimulationStatic, Stochastic MC Simulation
Example: Estimation ofExample: Estimation of ππ
Empirical results (Seila et al., 2003, Applied Simulation Modeling)
Static, Stochastic MC SimulationStatic, Stochastic MC Simulation
Example: Estimation ofExample: Estimation of ππ
Plot showing convergence of estimates to π
1. Analytical Models: Represent the system by a set
of equations and logical relations. Some can be
solved analytically using algebra, calculus,
probability theory, e.g. LP models, queuing
models. Many real world problems are too
complex to be solved analytically.
2. Simulation: Often the only symbolic model
representing a complex system sufficiently. Yields
a different set of outputs (estimates) for each set of
inputs. No optimization in the strict sense.
Means of Analyzing a SystemMeans of Analyzing a System
Cone of AbstractionCone of Abstraction
Advantages andAdvantages and
Disadvantages of SimulationDisadvantages of Simulation
Advantages:
 Increased realism: Simulation is closer to reality
than analytical models. Fewer simplifying
assumptions are made. Hence, complex systems
can be modeled.
 Existing or non-existing systems can be studied.
New strategies for an existing system or a totally
new system can be studied without actually
investing in the physical system (great savings).
 Hazardous systems can be studied without risks.
Advantages andAdvantages and
Disadvantages of SimulationDisadvantages of Simulation
Advantages:
 Time compression or expansion is possible
 Bottleneck analysis can be performed
 “What if” questions can be answered
 Results are reproducible. No measurement errors
except round off.
Same random variates → same results.
Random variates: Realizations of an input random
variable generated during simulation.
Advantages andAdvantages and
Disadvantages of SimulationDisadvantages of Simulation
Advantages:
 Good control on experimental conditions
 to eliminate undesired sources of variability, and
 to try alternatives under identical conditions
 Ease of communication with the management,
especially with the help of animation.
Advantages andAdvantages and
Disadvantages of SimulationDisadvantages of Simulation
Disadvantages:
 Model building requires special training and data
collection
 Statistical analysis: Stochasticity requires more and
longer runs and special knowledge for analysis
 Expensive and time consuming to develop, code
and analyze
 No exact solutions are obtained. Results are only
estimates
Advantages andAdvantages and
Disadvantages of SimulationDisadvantages of Simulation
Disadvantages:
 Lack of generality: Results are valid only for a
particular configuration of a particular system (given
results for 3 servers, we cannot extrapolate for n
servers)
 Lack of optimization
Don’t Simulate When…Don’t Simulate When…
(Banks and Gibson, 1997, IIE Solutions)
 The problem can be solved using “common sense
analysis” (simple calculations), e.g. if customers
arrive at an average rate of 100/hr and they are
served at a mean rate of 12/hr, then we need
100/12 = 8.33 ~ 9 servers
 The problem can be solved analytically, e.g.
average waiting time of customers in system can be
found analytically for M/M/s queueing systems
 Direct experimentation in real system is easier, e.g.
direct observation in a drive-in fast food restaurant
Don’t Simulate When…Don’t Simulate When…
(Banks and Gibson, 1997, IIE Solutions)
 Cost of simulation exceeds possible savings
 Resources are not available
 The model cannot be verified or validated
 Project expectations cannot be met (do not
overpromise)
 The system behavior is too complex or cannot be
defined (ill-structured problem)
Don’t Simulate When…Don’t Simulate When…
Simulation projects cost money, but can produce a
significant return on investment when conducted
properly. If the project is successful then the money is
well spent, and this will promote the technology. If the
project is not successful, it hurts the reputation of
simulation and, by association, each of us.
Steps in a Simulation StudySteps in a Simulation Study
Collect data and build a
conceptual model
(flowchart? Pseudo code?)
Collect data and build a
conceptual model
(flowchart? Pseudo code?)
Formulate the problem
and plan the study
Formulate the problem
and plan the study
Yes
No
Valid?Valid?
Construct computer
program and verify
Construct computer
program and verify
• Define the problem (system and
environment) nad objectives
• Plan the study (team, cost, time)
• Probability distribution of input
random variables
• Start with simple, build up as
necessary
• Does the conceptual model
represent reality? (Talk to system
people)
• Choice of language
• Test if the program does what
you intend it to do
Steps in a Simulation StudySteps in a Simulation Study
• Preliminary runs for validation
purposes
• Which input conditions to consider?
• How to conduct runs based on the
output analysis technique
• Statistical outputs
• Compare output to real system,
if any
Document, present and
implement
Document, present and
implement
Make pilot runsMake pilot runs
Yes
No
Valid?Valid?
Design experiment(s)Design experiment(s)
Make production runsMake production runs
Analyze ouputAnalyze ouput
Elements in a SimulationElements in a Simulation
StudyStudy
 Entities: Objects of interest (customers, jobs, etc.)
that flow through the system.
An entity is characterized by its attributes and
usually interacts with resources.
 Events: An occurrence (arrival, service completion,
etc.) that changes the system state.
 Input parameters (constants or random variables):
 Uncontrollable, e.g. time between customer arrivals
 Controllable, e.g. number of parallel servers
Elements in a SimulationElements in a Simulation
StudyStudy
State variables: Variables that define system state
at any given time, e.g. number of customers in
system, number of busy servers.
Performance measures: Output statistics used to
evaluate objectives, e.g. average waiting time of
customers in system, percentage utilization of
servers.
Alternative strategies to be evaluated.
In developing our conceptual model, we must
identify/determine the above.
Examples of System andExamples of System and
ComponentsComponents
SystemSystem EntitiesEntities AttributesAttributes ActivitiesActivities EventsEvents State VariablesState Variables
Banking Customers
Checking
account
balance
Making
deposits
Arrival,
departure
Number of busy teller, number
of waiting customer
Rapid rail Riders
Origination,
destination
Traveling
Arrival at
station
Number of riders waiting at
each station, number of riders
in transit
Production Jobs
Arrival time,
process time(s)
Welding,
stamping
Completion
of welding,
breakdown
Status of machines (busy, idle
or down)
Communications Messages
Message
length,
destination
Transmitting
Arrival at
destination
Number of messages waiting to
be transmitted
Inventory Orders
Order quantity,
due date
Withdrawing
renewing
Demand
Levels of inventory, backlogged
demand

Contenu connexe

Tendances

Tech meetup Data Driven - Codemotion
Tech meetup Data Driven - Codemotion Tech meetup Data Driven - Codemotion
Tech meetup Data Driven - Codemotion antimo musone
 
System model.Chapter One(GEOFFREY GORDON)
System model.Chapter One(GEOFFREY GORDON)System model.Chapter One(GEOFFREY GORDON)
System model.Chapter One(GEOFFREY GORDON)Towfiq218
 
Models of Operations Research is addressed
Models of Operations Research is addressedModels of Operations Research is addressed
Models of Operations Research is addressedSundar B N
 
MEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational ExperimentsMEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational ExperimentsGIScRG
 
Simulation theory
Simulation theorySimulation theory
Simulation theoryAbu Bashar
 
Simulation and its application
Simulation and its applicationSimulation and its application
Simulation and its applicationAlesh Dulal
 
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018Codemotion
 
Operation's research models
Operation's research modelsOperation's research models
Operation's research modelsAbhinav Kp
 
Operations research lecture 5
Operations research lecture 5Operations research lecture 5
Operations research lecture 5Najmul Hoda
 
introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...Waqas Afzal
 
OR (JNTUK) III Mech Unit 8 simulation
OR (JNTUK) III Mech Unit 8  simulationOR (JNTUK) III Mech Unit 8  simulation
OR (JNTUK) III Mech Unit 8 simulationNageswara Rao Thots
 
An Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social SciencesAn Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social Sciencesfsmart01
 
Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programmingSoumya Mukherjee
 
Fundamentals of Quantitative Analysis
Fundamentals of Quantitative AnalysisFundamentals of Quantitative Analysis
Fundamentals of Quantitative AnalysisJubayer Alam Shoikat
 
2. System Simulation modeling unit i
2. System Simulation modeling unit i2. System Simulation modeling unit i
2. System Simulation modeling unit iAmita Gautam
 

Tendances (20)

Output analysis of a single model
Output analysis of a single modelOutput analysis of a single model
Output analysis of a single model
 
Tech meetup Data Driven - Codemotion
Tech meetup Data Driven - Codemotion Tech meetup Data Driven - Codemotion
Tech meetup Data Driven - Codemotion
 
System model.Chapter One(GEOFFREY GORDON)
System model.Chapter One(GEOFFREY GORDON)System model.Chapter One(GEOFFREY GORDON)
System model.Chapter One(GEOFFREY GORDON)
 
Models of Operations Research is addressed
Models of Operations Research is addressedModels of Operations Research is addressed
Models of Operations Research is addressed
 
MEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational ExperimentsMEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational Experiments
 
Simulation theory
Simulation theorySimulation theory
Simulation theory
 
Conceptual modeling
Conceptual modelingConceptual modeling
Conceptual modeling
 
Simulation and its application
Simulation and its applicationSimulation and its application
Simulation and its application
 
Simulation
SimulationSimulation
Simulation
 
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
 
Operation's research models
Operation's research modelsOperation's research models
Operation's research models
 
Operations research lecture 5
Operations research lecture 5Operations research lecture 5
Operations research lecture 5
 
Simulation
SimulationSimulation
Simulation
 
introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...
 
OR (JNTUK) III Mech Unit 8 simulation
OR (JNTUK) III Mech Unit 8  simulationOR (JNTUK) III Mech Unit 8  simulation
OR (JNTUK) III Mech Unit 8 simulation
 
An Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social SciencesAn Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social Sciences
 
Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programming
 
Fundamentals of Quantitative Analysis
Fundamentals of Quantitative AnalysisFundamentals of Quantitative Analysis
Fundamentals of Quantitative Analysis
 
2. System Simulation modeling unit i
2. System Simulation modeling unit i2. System Simulation modeling unit i
2. System Simulation modeling unit i
 
OR 14 15-unit_1
OR 14 15-unit_1OR 14 15-unit_1
OR 14 15-unit_1
 

Similaire à Cs854 lecturenotes01

Introduction to modeling_and_simulation
Introduction to modeling_and_simulationIntroduction to modeling_and_simulation
Introduction to modeling_and_simulationAysun Duran
 
Introduction to modeling_and_simulation
Introduction to modeling_and_simulationIntroduction to modeling_and_simulation
Introduction to modeling_and_simulationmukmin91
 
What is sim?ulation
What is sim?ulationWhat is sim?ulation
What is sim?ulationMusab Cannon
 
An Overview of Performance Evaluation & Simulation
An Overview of Performance Evaluation & SimulationAn Overview of Performance Evaluation & Simulation
An Overview of Performance Evaluation & Simulationdasdfadfdsfsdfasdf
 
Computer simulation technique the definitive introduction - harry perros
Computer simulation technique   the definitive introduction - harry perrosComputer simulation technique   the definitive introduction - harry perros
Computer simulation technique the definitive introduction - harry perrosJesmin Rahaman
 
Introduction to simulation.pdf
Introduction to simulation.pdfIntroduction to simulation.pdf
Introduction to simulation.pdfnadimhossain24
 
Introduction to simulation and modeling
Introduction to simulation and modelingIntroduction to simulation and modeling
Introduction to simulation and modelingantim19
 
Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and ModelMd. Hasan Imam Bijoy
 
Discreate Event Simulation_PPT1-R0.ppt
Discreate Event Simulation_PPT1-R0.pptDiscreate Event Simulation_PPT1-R0.ppt
Discreate Event Simulation_PPT1-R0.pptdiklatMSU
 
Modeling & simulation in projects
Modeling & simulation in projectsModeling & simulation in projects
Modeling & simulation in projectsanki009
 
Simulation and Modelling Reading Notes.pptx
Simulation and Modelling  Reading Notes.pptxSimulation and Modelling  Reading Notes.pptx
Simulation and Modelling Reading Notes.pptxDanMuendo1
 
mathematical modeling nikki.pptx
mathematical modeling nikki.pptxmathematical modeling nikki.pptx
mathematical modeling nikki.pptxArikB
 
internship project1 report
internship project1 reportinternship project1 report
internship project1 reportsheyk98
 
4_5821003798000177081.pdf
4_5821003798000177081.pdf4_5821003798000177081.pdf
4_5821003798000177081.pdfozgenn4242
 

Similaire à Cs854 lecturenotes01 (20)

Introduction to modeling_and_simulation
Introduction to modeling_and_simulationIntroduction to modeling_and_simulation
Introduction to modeling_and_simulation
 
Introduction to modeling_and_simulation
Introduction to modeling_and_simulationIntroduction to modeling_and_simulation
Introduction to modeling_and_simulation
 
What is sim?ulation
What is sim?ulationWhat is sim?ulation
What is sim?ulation
 
MODELING & SIMULATION.docx
MODELING & SIMULATION.docxMODELING & SIMULATION.docx
MODELING & SIMULATION.docx
 
Simulation
SimulationSimulation
Simulation
 
Unit-1 Mod-Sim.ppt
Unit-1 Mod-Sim.pptUnit-1 Mod-Sim.ppt
Unit-1 Mod-Sim.ppt
 
An Overview of Performance Evaluation & Simulation
An Overview of Performance Evaluation & SimulationAn Overview of Performance Evaluation & Simulation
An Overview of Performance Evaluation & Simulation
 
Computer simulation technique the definitive introduction - harry perros
Computer simulation technique   the definitive introduction - harry perrosComputer simulation technique   the definitive introduction - harry perros
Computer simulation technique the definitive introduction - harry perros
 
Introduction to simulation.pdf
Introduction to simulation.pdfIntroduction to simulation.pdf
Introduction to simulation.pdf
 
SIMULATION.pdf
SIMULATION.pdfSIMULATION.pdf
SIMULATION.pdf
 
Introduction to simulation and modeling
Introduction to simulation and modelingIntroduction to simulation and modeling
Introduction to simulation and modeling
 
Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and Model
 
Week08.pdf
Week08.pdfWeek08.pdf
Week08.pdf
 
Discreate Event Simulation_PPT1-R0.ppt
Discreate Event Simulation_PPT1-R0.pptDiscreate Event Simulation_PPT1-R0.ppt
Discreate Event Simulation_PPT1-R0.ppt
 
lecture 1.pptx
lecture 1.pptxlecture 1.pptx
lecture 1.pptx
 
Modeling & simulation in projects
Modeling & simulation in projectsModeling & simulation in projects
Modeling & simulation in projects
 
Simulation and Modelling Reading Notes.pptx
Simulation and Modelling  Reading Notes.pptxSimulation and Modelling  Reading Notes.pptx
Simulation and Modelling Reading Notes.pptx
 
mathematical modeling nikki.pptx
mathematical modeling nikki.pptxmathematical modeling nikki.pptx
mathematical modeling nikki.pptx
 
internship project1 report
internship project1 reportinternship project1 report
internship project1 report
 
4_5821003798000177081.pdf
4_5821003798000177081.pdf4_5821003798000177081.pdf
4_5821003798000177081.pdf
 

Dernier

FULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | DelhiFULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | DelhiSaketCallGirlsCallUs
 
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...home
 
Akbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptxAkbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptxAmita Gupta
 
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶delhimunirka444
 
Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305jazlynjacobs51
 
❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.Nitya salvi
 
Storyboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to SingStoryboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to SingLyneSun
 
Young⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort Servicesonnydelhi1992
 
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | DelhiFULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | DelhiSaketCallGirlsCallUs
 
Bobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdfBobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdfMARIBEL442158
 
FULL NIGHT — 9999894380 Call Girls In Najafgarh | Delhi
FULL NIGHT — 9999894380 Call Girls In Najafgarh | DelhiFULL NIGHT — 9999894380 Call Girls In Najafgarh | Delhi
FULL NIGHT — 9999894380 Call Girls In Najafgarh | DelhiSaketCallGirlsCallUs
 
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiFULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiSaketCallGirlsCallUs
 
❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...
❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...
❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...Sheetaleventcompany
 
FULL NIGHT — 9999894380 Call Girls In Paschim Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In  Paschim Vihar | DelhiFULL NIGHT — 9999894380 Call Girls In  Paschim Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Paschim Vihar | DelhiSaketCallGirlsCallUs
 
Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...
Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...
Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...Nitya salvi
 
FULL NIGHT — 9999894380 Call Girls In Delhi Cantt | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi Cantt | DelhiFULL NIGHT — 9999894380 Call Girls In Delhi Cantt | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi Cantt | DelhiSaketCallGirlsCallUs
 

Dernier (20)

FULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | DelhiFULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
 
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
 
Akbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptxAkbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptx
 
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
 
Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305
 
❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Srinagar Srinagar Call Girls 8617697112 💦✅.
 
Storyboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to SingStoryboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to Sing
 
Young⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Tughlakabad Delhi >༒9667401043 Escort Service
 
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | DelhiFULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
 
Bobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdfBobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdf
 
FULL NIGHT — 9999894380 Call Girls In Najafgarh | Delhi
FULL NIGHT — 9999894380 Call Girls In Najafgarh | DelhiFULL NIGHT — 9999894380 Call Girls In Najafgarh | Delhi
FULL NIGHT — 9999894380 Call Girls In Najafgarh | Delhi
 
(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7
(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7
(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7
 
Dubai Call Girls Service # +971588046679 # Call Girls Service In Dubai # (UAE)
Dubai Call Girls Service # +971588046679 # Call Girls Service In Dubai # (UAE)Dubai Call Girls Service # +971588046679 # Call Girls Service In Dubai # (UAE)
Dubai Call Girls Service # +971588046679 # Call Girls Service In Dubai # (UAE)
 
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiFULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
 
❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...
❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...
❤️Call girls in Chandigarh ☎️8264406502☎️ Call Girl service in Chandigarh☎️ C...
 
Pakistani Bur Dubai Call Girls # +971528960100 # Pakistani Call Girls In Bur ...
Pakistani Bur Dubai Call Girls # +971528960100 # Pakistani Call Girls In Bur ...Pakistani Bur Dubai Call Girls # +971528960100 # Pakistani Call Girls In Bur ...
Pakistani Bur Dubai Call Girls # +971528960100 # Pakistani Call Girls In Bur ...
 
FULL NIGHT — 9999894380 Call Girls In Paschim Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In  Paschim Vihar | DelhiFULL NIGHT — 9999894380 Call Girls In  Paschim Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Paschim Vihar | Delhi
 
(NEHA) Call Girls Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(NEHA) Call Girls Mumbai Call Now 8250077686 Mumbai Escorts 24x7(NEHA) Call Girls Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(NEHA) Call Girls Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...
Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...
Mayiladuthurai Call Girls 8617697112 Short 3000 Night 8000 Best call girls Se...
 
FULL NIGHT — 9999894380 Call Girls In Delhi Cantt | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi Cantt | DelhiFULL NIGHT — 9999894380 Call Girls In Delhi Cantt | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi Cantt | Delhi
 

Cs854 lecturenotes01

  • 1. CS 8CS 85544 Computer SimulationComputer Simulation Lecture Notes 01
  • 2. Introduction to SimulationIntroduction to Simulation  Simulation refers to a broad collection of methods and applications to mimic the behavior of real systems usually on a computer with appropriate software.  Simulation is the process of  Formulating a model of the real system, and  Conducting experiments with the model in order to  understand (predict) the systems behavior, and  evaluate various alternatives (design or operational).
  • 3. Introduction to SimulationIntroduction to Simulation  System: Collection of elements working together toward accomplishment of a specific objective.  The facility or process of interest is usually called a system.  Ways to study a system include experimenting with  the actual system, and  a model of the system.  Model: Simplified representation or abstraction of a system.
  • 4. Types of SimulationTypes of Simulation  Iconic (physical) models  Precise replica of an object (maybe in different material or at smaller scale).  Used primarily for training and research purposes.  Examples: Flight simulators (how to fly and handle emergency situations) Wind tunnels Desktop manufacturing labs  Symbolic models  The real system is represented by mathematical equations and logical relations.  Basically computer simulation
  • 5. Types of Symbolic SimulationTypes of Symbolic Simulation ModelsModels Deterministic Stochastic  No random variables (no uncertainty)  Input: random variable(s)  Given input → unique output (might take a lot of computer time to evaluate)  Output is also a random variable
  • 6. Types of Symbolic SimulationTypes of Symbolic Simulation ModelsModels Static Dynamic  No time dimension  System behavior changes over time  Example: Monte Carlo Simulation  Example: A conveyor system
  • 7. Types of Symbolic SimulationTypes of Symbolic Simulation ModelsModels Continuous Discrete  System state changes continuously  System state changes at discrete points in time  Example: Altitude of an airplane (involves differential equations)  Example: Customers visiting a supermarket For Dynamic simulationFor Dynamic simulation
  • 10. Monte Carlo (MC) SimulationMonte Carlo (MC) Simulation  A random number (RN) is a random variable (RV) ~ Uniform (0,1)  In Monte Carlo simulation, an iid sample of RNs is obtained to solve a problem
  • 11. Static, Stochastic MC SimulationStatic, Stochastic MC Simulation Example: Estimation ofExample: Estimation of ππ Area of the circle is π r2 = π since r = 1 Area of shaded quarter-circle = π/4 How can we use MC simulation in estimating the value of π ?
  • 12.  Area of small square (in the main quadrant) = 1  (Area of quarter-circle) / (Area of small square) = π/4 Algorithm:  S1. Generate two RNs ~ uniform (0,1).  S2. Using these as (x, y) coordinates of a point, find the Euclidean distance, d, from the origin.  S3. If d < 1 then the point is inside the quarter-circle, otherwise it is outside the quarter-circle (but inside the small square). Static, Stochastic MC SimulationStatic, Stochastic MC Simulation Example: Estimation ofExample: Estimation of ππ
  • 13. Static, Stochastic MC SimulationStatic, Stochastic MC Simulation Example: Estimation ofExample: Estimation of ππ  Repeat (replicate) S1-S3 n times where n is a very large number. (The points will be distributed uniformly inside the small square.) Count the number of times the generated point falls inside the circle, nq. Then, is an estimate for π/4.  95% confidence interval for π is : nnp q /ˆ = n pp p )ˆ1(ˆ )96.1(4ˆ4 − ±
  • 14. Static, Stochastic MC SimulationStatic, Stochastic MC Simulation Example: Estimation ofExample: Estimation of ππ Empirical results (Seila et al., 2003, Applied Simulation Modeling)
  • 15. Static, Stochastic MC SimulationStatic, Stochastic MC Simulation Example: Estimation ofExample: Estimation of ππ Plot showing convergence of estimates to π
  • 16. 1. Analytical Models: Represent the system by a set of equations and logical relations. Some can be solved analytically using algebra, calculus, probability theory, e.g. LP models, queuing models. Many real world problems are too complex to be solved analytically. 2. Simulation: Often the only symbolic model representing a complex system sufficiently. Yields a different set of outputs (estimates) for each set of inputs. No optimization in the strict sense. Means of Analyzing a SystemMeans of Analyzing a System
  • 17. Cone of AbstractionCone of Abstraction
  • 18. Advantages andAdvantages and Disadvantages of SimulationDisadvantages of Simulation Advantages:  Increased realism: Simulation is closer to reality than analytical models. Fewer simplifying assumptions are made. Hence, complex systems can be modeled.  Existing or non-existing systems can be studied. New strategies for an existing system or a totally new system can be studied without actually investing in the physical system (great savings).  Hazardous systems can be studied without risks.
  • 19. Advantages andAdvantages and Disadvantages of SimulationDisadvantages of Simulation Advantages:  Time compression or expansion is possible  Bottleneck analysis can be performed  “What if” questions can be answered  Results are reproducible. No measurement errors except round off. Same random variates → same results. Random variates: Realizations of an input random variable generated during simulation.
  • 20. Advantages andAdvantages and Disadvantages of SimulationDisadvantages of Simulation Advantages:  Good control on experimental conditions  to eliminate undesired sources of variability, and  to try alternatives under identical conditions  Ease of communication with the management, especially with the help of animation.
  • 21. Advantages andAdvantages and Disadvantages of SimulationDisadvantages of Simulation Disadvantages:  Model building requires special training and data collection  Statistical analysis: Stochasticity requires more and longer runs and special knowledge for analysis  Expensive and time consuming to develop, code and analyze  No exact solutions are obtained. Results are only estimates
  • 22. Advantages andAdvantages and Disadvantages of SimulationDisadvantages of Simulation Disadvantages:  Lack of generality: Results are valid only for a particular configuration of a particular system (given results for 3 servers, we cannot extrapolate for n servers)  Lack of optimization
  • 23. Don’t Simulate When…Don’t Simulate When… (Banks and Gibson, 1997, IIE Solutions)  The problem can be solved using “common sense analysis” (simple calculations), e.g. if customers arrive at an average rate of 100/hr and they are served at a mean rate of 12/hr, then we need 100/12 = 8.33 ~ 9 servers  The problem can be solved analytically, e.g. average waiting time of customers in system can be found analytically for M/M/s queueing systems  Direct experimentation in real system is easier, e.g. direct observation in a drive-in fast food restaurant
  • 24. Don’t Simulate When…Don’t Simulate When… (Banks and Gibson, 1997, IIE Solutions)  Cost of simulation exceeds possible savings  Resources are not available  The model cannot be verified or validated  Project expectations cannot be met (do not overpromise)  The system behavior is too complex or cannot be defined (ill-structured problem)
  • 25. Don’t Simulate When…Don’t Simulate When… Simulation projects cost money, but can produce a significant return on investment when conducted properly. If the project is successful then the money is well spent, and this will promote the technology. If the project is not successful, it hurts the reputation of simulation and, by association, each of us.
  • 26. Steps in a Simulation StudySteps in a Simulation Study Collect data and build a conceptual model (flowchart? Pseudo code?) Collect data and build a conceptual model (flowchart? Pseudo code?) Formulate the problem and plan the study Formulate the problem and plan the study Yes No Valid?Valid? Construct computer program and verify Construct computer program and verify • Define the problem (system and environment) nad objectives • Plan the study (team, cost, time) • Probability distribution of input random variables • Start with simple, build up as necessary • Does the conceptual model represent reality? (Talk to system people) • Choice of language • Test if the program does what you intend it to do
  • 27. Steps in a Simulation StudySteps in a Simulation Study • Preliminary runs for validation purposes • Which input conditions to consider? • How to conduct runs based on the output analysis technique • Statistical outputs • Compare output to real system, if any Document, present and implement Document, present and implement Make pilot runsMake pilot runs Yes No Valid?Valid? Design experiment(s)Design experiment(s) Make production runsMake production runs Analyze ouputAnalyze ouput
  • 28. Elements in a SimulationElements in a Simulation StudyStudy  Entities: Objects of interest (customers, jobs, etc.) that flow through the system. An entity is characterized by its attributes and usually interacts with resources.  Events: An occurrence (arrival, service completion, etc.) that changes the system state.  Input parameters (constants or random variables):  Uncontrollable, e.g. time between customer arrivals  Controllable, e.g. number of parallel servers
  • 29. Elements in a SimulationElements in a Simulation StudyStudy State variables: Variables that define system state at any given time, e.g. number of customers in system, number of busy servers. Performance measures: Output statistics used to evaluate objectives, e.g. average waiting time of customers in system, percentage utilization of servers. Alternative strategies to be evaluated. In developing our conceptual model, we must identify/determine the above.
  • 30. Examples of System andExamples of System and ComponentsComponents SystemSystem EntitiesEntities AttributesAttributes ActivitiesActivities EventsEvents State VariablesState Variables Banking Customers Checking account balance Making deposits Arrival, departure Number of busy teller, number of waiting customer Rapid rail Riders Origination, destination Traveling Arrival at station Number of riders waiting at each station, number of riders in transit Production Jobs Arrival time, process time(s) Welding, stamping Completion of welding, breakdown Status of machines (busy, idle or down) Communications Messages Message length, destination Transmitting Arrival at destination Number of messages waiting to be transmitted Inventory Orders Order quantity, due date Withdrawing renewing Demand Levels of inventory, backlogged demand