Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 40

Simulation & Modeling

Dr. Gulzar Ahmad


Associate Professor
Week
Simulation and Modeling?

Learning System Components?


Outcome
Ways to study a System
s
Classifying Simulation
Models
System
A group of objects joined together
in some regular interaction or
interdependence towards the
accomplishment of some purpose.
Systems
System Environment
o/p

i/p Environment
A system is affected by changes
that occur outside its
boundaries. Such changes are
said to occur in the system
environment.

The boundary between the


system and its environment
depend on the purpose of the
Boundary
study
System Components
Object of interest
Entity in the system

An instantaneous
occurrence that may
change the state of the Event Attribute Property of an entity
system
System

An action that takes place over


a period of specified length and Collection of variables
Activity State necessary to describe the
changes the state of the system
system at a particular time
System Entities Attributes Activities Events State Variables

Arrival at Number of
Origin,
Railway Passengers Traveling station, arrival passengers waiting
destination
at destination at each station

Speed,
Status of machines
capacity, Welding,
Production Machines Breakdown (busy, idle,
breakdown stamping
shutdown)
rate

Number of packets
Length, Arrival at
Communications Messages Transmitting waiting to be
destination destination
transmitted

Inventory Warehouse Capacity Withdrawal Demand Level of inventory


Ways to Study a
System
Why do we Need Modeling
 It is not possible to experiment with the actual system,
e.g.: the experiment is destructive
 The system might not exist, i.e. the system is in the
design stage
 In essence it boils down to:

Time Cost Complexity


Model
 A model is a representation of a system for the purpose of studying
that system
 It is only necessary to consider those aspects of the system that affect
the problem under investigation
 The model is a simplified representation of the system
 The model should be sufficiently detailed to permit valid conclusions
to be drawn about the actual system
 Different models of the same system may be required as the purpose
of the investigation changes
Types of Models
A Mathematical Model utilizes symbolic notations and
equations to represent a system
Example: current and voltage equations are mathematical
models of an electric circuit
A Physical Model is a larger or smaller version of an object
Example: enlargement of an atom or a scaled version of the
solar system
Approaches to Solving Models
Mathematically:
Derivation of equations to answer questions regarding the model.
Derivation Process and Solving could be handled:
 Analytically: Derives closed form (hopefully concise) expressions
 Numerically: Utilizes the help of numerical approximations (by hand or by
programming)
By Simulation:
Building a program that tries to imitate the behavior of the model under study.
Modeling is a design methodology
based on producing a model
Modeling implementation for a system and
representing its functionality.
Simulation
 Simulation is the imitation of a real-world process or
system over time [Banks et al.]
 It is used for analysis and study of complex systems
 Simulation requires the development of a simulation
model
 Computer-based experiments are conducted to describe,
explain, and predict the behavior of the real system
Simulation
Simulation is used when working on real systems is not
convenient due to high costs, technical impossibility, and
the non-existence of a real system. The simulation predicts
what will happen to the real system if certain inputs are
used: changing these input parameters reproduces
different scenarios by identifying the most convenient one
from various points of view.
Simulation
Simulation is the process that puts the model into
operation and allows you to evaluate its behavior under
certain conditions.
Simulation is a fundamental tool for modeling because,
without necessarily resorting to physical prototyping, the
developer can verify the functionality of the modeled
system with the project specifications.
Pros of Simulation Modeling
 It reproduces the behavior of a system in reference to
situations that cannot be directly experienced.
 It represents real systems, even complex ones, while also
considering the sources of uncertainty
 It requires limited resources in terms of data
 It allows experimentation in a limited time
 The models that are obtained are easily interpretable
Cons of Simulation Modeling
 The simulation provides indications of the behavior of the system but not
exact results.
 The analysis of the output of a simulation could be complex, and it could
be difficult to identify which may be the best configuration.
 The implementation of a simulation model could be laborious and,
moreover, it may take a long time to carry out a significant simulation.
 The results that are returned by the simulation depend on the quality of
the input data: it cannot provide accurate results in the case of inaccurate
input data.
 The complexity of the simulation model depends on the complexity of the
system it intends to reproduce.
When are Simulations not
Necessary
 The problem can be solved by common sense
 The problem can be solved analytically
 It is less expensive to perform direct experiments
 Costs of modeling and simulation exceed savings
 Resources or time are not available
 Lack of necessary data
 System is very complex or cannot be defined
Decision-Making Workflow
Classifying
Simulation Models
Static Dynamic

Deterministic Stochastic

Discrete Continuous
Static and Dynamic Models
Static Dynamic

 Represents a system at a particular  Represents systems as they change


point in time over time
 Example: Simulation of a coin toss  Example: The simulation of a bank
game from 9:00am – 4:00pm
Deterministic and Stochastic Models
Deterministic Stochastic
 Has one or more random variables
 Random inputs lead to random
 Contain no random variables outputs
 Has a known set of inputs that will  Random outputs only estimates of
result in a unique set of outputs the true characteristics of the system
 Example: Patients arriving at the  Example: random arrivals at a bank.
dentist’s office exactly at their Output may be average number of
scheduled appointments waiting customers, average waiting
time. This output is only a statistical
estimate of the system
Discrete and Continuous Models
Discrete Continuous
 Not always used to simulate a  Not always used to simulate a
discrete system continuous system
 Example: Tanks and pipes may be
modeled discretely, even though the
flow is continuous

The choice of whether to use a discrete or continuous model depends on the


characteristics of the system and the objectives of the study
Static models are the representation of a system
in an instant of time or representative models of
a system in which the time variable plays no
role.
Static and If the output of the system depends only the
present value of the input then system is called
Dynamic Static.
Memory less system
Models Instantaneous System
If the output of the system depends present
input as well as past input then system is called
Dynamic System
• Problem formulation: statement of the problem
Ph
ase • Setting of objectives and overall design: questions to be answered by the simulation
I
• Model conceptualization: abstract the essential features of the problem, select and modify basic
assumptions that characterize the system, start with a simple model, enrich and elaborate the
model
• Data collection: start early because it may take a lot of time
Phase • Model translation: programming
II • Verification: is the computer program functioning properly
• Validation: does the model accurately represent the system

• Experimental design: which alternatives (designs) to simulate


• Production runs and analysis: to estimate measures of performance for the system designs that
Phase
have been simulated. Measures of performance may depend on statistical analysis, e.g.: average,
III probability, frequency, etc.
• More runs? a sufficient number is needed to guarantee statistical accuracy

• Documentation
Ph
ase • Implementation
IV
Simulation Modeling
Terminology
The context of an investigation is
represented through a system, that
System is, the set of elements that interact
with each other.
A system is described in each instant of time by
a set of variables. These are called state
variables.
For example, in the case of a weather system,
State the temperature is a state variable.
In discrete systems, the variables change
Variables instantly at precise moments of time that are
finite.
In continuous systems, the variables vary in
terms of continuity with respect to time.
An event is defined as any instantaneous event
that causes the value of at least one of the status
Events variables to change. The arrival of a blizzard for
a weather system is an event, as it causes the
temperature to drop suddenly.
Parameters represent essential terms when
building a model. They are adjusted during the
model simulation process to ensure that the
results are brought into the necessary
Parameters convergence margins.
They can be modified iteratively through
sensitivity analysis or in the model calibration
phase.
Calibration represents the process by which the
parameters of the model are adjusted to adapt the
results to the data observed in the best possible way.
When calibrating the model, we try to obtain the best
possible accuracy.
A good calibration requires eliminating, or
Calibration minimizing, errors in data collection and choosing a
theoretical model that is the best possible description
of reality.
The choice of model parameters is decisive and must
be done in such a way as to minimize the deviation of
its results when applied to historical data.
Calibration represents the process by which the
parameters of the model are adjusted to adapt the
results to the data observed in the best possible way.
When calibrating the model, we try to obtain the best
possible accuracy.
A good calibration requires eliminating, or
Calibration minimizing, errors in data collection and choosing a
theoretical model that is the best possible description
of reality.
The choice of model parameters is decisive and must
be done in such a way as to minimize the deviation of
its results when applied to historical data.
Accuracy is the degree of correspondence of the
simulation result that can be inferred from a
series of calculated values with the actual data,
that is, the difference between the average
modeled value and the true or reference value.
Accuracy Several indicators are available to measure
accuracy. The most widely used ones are Mean
Absolute Error (MAE),
Mean Absolute Percentage Error (MAPE), and
Mean Square Error (MSE).
The sensitivity of a model indicates the degree to
which the model’s outputs are affected by changes in
the selected input parameters.
Sensitivity analysis identifies the sensitive parameters
for the output of the model. It allows us to determine
Sensitivity which parameters require further investigation so
that we have a more realistic evaluation of the
model’s output values. Furthermore, it allows us to
identify which parameters are not significant for the
generation of a certain output and, therefore, can
possibly be eliminated from the model.
This is the process that verifies the accuracy of
the proposed model.
The model must be validated to be used as a tool
Validation to support decisions. It aims to verify whether
the model that’s being analyzed corresponds
conceptually to our intentions.
System
Key System Components
Takeawa
Ways to study a System
y
Simulation and
Modeling

You might also like