Why building models?
description
Transcript of Why building models?
Why building models?
Cannot experience on the real system of interest Cost Danger The real system does not exist
Why using simulation?
Reduced cost of computers Improved facilities of modern computers Ease to use Flexibility
Real WorldReal World SimulatorSimulator
modelingrelation
simulationrelation
Each entity can be formalized as a Mathematical Dynamic System(mathematical manipulations to prove system properties)
Structure generating behaviorclaimed to represent real world
Device forexecuting model
Model
Conditions under which the system is experimented with/observed
Experimental Frame
Data: Input/output relation pairs
M&S Entities and Relations
Modelling System Dynamics
Interested in modeling systems’ dynamic behavior how it organizes itself over
time in response to imposed conditions and stimuli.
Predict how a system will react to external inputs and proposed structural
changes.
Modelling system dynamics
Modelling techniques classification
Example: waiting in a line for service.
Conceptual Modelling: informal model. – Communicates the basic nature of the process– Provides a vocabulary for the system (ambiguous)– General description of the system to be modeled
Advantage of Formal Methods– Correctness and completeness Testing– Communication means Teamwork
Formalism– Communication convention– Formal specification in unambiguous manner– Abstraction (representation) + Manipulation of abstraction– Formal model - Formal specification
Formal Modelling
Declarative models
System states (representing system entities) Transitions between states
State-based declarative models– Example: States = number of persons waiting in line– Transitions: arrival of new customers/departure of serviced ones
Declarative models (cont.)
Event-based declarative models Arcs: represent scheduling. Event relation: from arrival of token i to departure of
token i.
Functional models
“Black box”. Input: signal defined over time Output: depending on the internal function. Timing delays: discrete or continuous
– Example: inputs = customers arriving– Outputs = delayed output of the input customers
Spatial models
Space notions included Relationship between time and space positions
– Example: customers moving through the server.
A Systems Dynamics classification
Classifying modelling techniques according to the system dynamics
Classification
Vars./Time Continuous Discrete
Continuous [1] DESSPartial Differential EquationsOrdinary Differential EquationsBond GraphsModelicaElectrical circuits
[2] DTSSDifference EquationsFinite Element MethodFinite DifferencesNumerical methods (in general, any computing method for the continuous counterparts], like Runge-Kutta, Euler, DASSL and others.
Discrete [3] DEVSDEVS FormalismTimed Petri NetsTimed Finite State MachinesEvent Graphs
[4] AutomataFinite State MachinesFinite State AutomataPetri NetsBoolean LogicMarkov Chains
Discrete time/Discrete variable
Finite State Machines Finite State Automata Petri Nets CSP CCS Markov chains
Automata
a
c
bs22
1 2
Markov Chains
0 1
P0,1 P1,1
P1,0
Finite State Machines
S
X
Y
(a)Moore machine; (b) Mealy machine
S
X
Y
Characteristic of DES (DTS is a special case of DES)– Man-made system– Naturally concurrent system– Not well-grounded mathematical formalism form modeling– Difficulties in computer experimentation– Non-linear– No accurate analytic solution– No transformation method
DES modelling
Examples of Discrete Event System : Man-made system– Multi-computer system– communication network– Distributed control– Manufacturing system– Game– Traffic system
Examples of Discrete Event Systems
Discrete variable/Continuous time
Min-max algebra Timed Finite State Machines Timed Petri Nets Generalized Semi-Markov Process (GSMP) Timed automata Timed graphs Event graphs Event scheduling DEVS
Event Graphs
Arrive
t = t + 0.05q = q+1 (q<=85)
(q >= 1)
Leave
Heat Off
t = t - 3
t = t - 0.05q = q - 1
t > 25
. . .
. . .
Timed Automata
Gbutton
pressed
YR
b_pressed, t<43
t < 2
t <= 2, {yellow}t < 10
t = 45, { yellow }
t < 45
t = 55, { green }
t < 55
t = 10; { red }
Statecharts
Classification
Different Abstraction Level of Dynamic System
time
statetime
statetime
statetime
state
High
er Ab
straction L
evel
S/W
Real-timeprogram
Concurrentprogram
Sequential program
H/W
Timed DES
Untimed DES
Finite StateAutomata
Diff. EqnFMS
< Multilevel Abstraction in System Design >
event1 event2 event3 event4 event5
Multiformalism utility
Operator
Planning/scheduling
Discrete EventController
PID controlleranalog/digital
Plant
Command Discrete state
actuation Sensor
Event-based control
Time-based control
Supervisory control
Example: hierarchical control
Basic definitions
System: “natural” or artificial entity. Ordered set of related objects that interact.
Source of observational data or more specifically, behavior. Data viewed or acquired through an experimental frame of interest to the modeller.
Model: abstract representation of a system. Constructed to generate behavior, indistinguishable from system behavior within one or more
experimental frames. Behavior generated using specific rules, equations or a modelling formalism.
More Definitions
Behavior: specific form of data observable in a system over time within an experimental frame.
Experimental Frame: conditions under which a system or model are observed or experimented with.
We do not reason but on MODELS. Problems cannot be solved on the real systems. Every problem is studied on
abstract representations of the systems.
Problem solving is related to an experimental frame in which the model is analyzed.
A definition
Simulation is the reproduction of the dynamic behavior of a real system with the goal of obtaining
conclusions that can be applied to the real system.
Dynamic behavior Real system Obtaining conclusions
More definitions
Event: a change in the state of the model, which occurs at a given instant (called the event time), causing
the model to activate. model's activation produce state change (i.e., at least
one attribute in the model will change). model's state is the set of values of all the attributes of
the model at a given instant. State variables: those that can be used to uniquely
define the model’s behavior in the future
More definitions
Abstraction: basic process we use when modeling to extract a set of entities and relations from a
complex reality. Higher level of abstraction: information is lost, but
allows to better define the model's behavior, prove properties of the system by manipulating
the abstract model definition.
Verification and Validation (V&V)– Validation: relationship between model, system and
experimental frame (it is possible to distinguish behavior of model/system within EF?)
– Verification: process of checking that a simulator of a model correctly generates the desired behavior.
Types of Simulation Models According to the objectives and decisions to be taken we distinguish: Exploration: to better understand the operation of the system; Prediction: to predict the future behavior of the system. Improvement: to optimize performance through analysis of alternatives; Conception: system does not exist yet; model is used to test different options prior
construction. Engineering design: design devices in engineering applications (ranging from bridges
to electron devices). Rapid prototyping: quickly obtain a working model to test ideas and get early
feedback from stakeholders. Planning: risk-free mechanism for thinking about the future (manufacturing to
governance). Acquisition: very large pieces of equipment (i.e., helicopters, airplanes, submarines)
are extremely expensive. M&S can help to decide in the purchasing process, enabling the customer to exploring different alternatives without the need of constructing the equipment prior to take the decision.
Proof of concept: test ideas and put them to work before creating the actual application.
Training: controlled experiments to enhance decision making skills in defense (called constructive simulation). business gaming and virtual simulators (human-in-the-loop simulators to learn and enhance motor skills when operating complex vehicles).
Education: used in sciences to provide insight into the nature of dynamic phenomena as well as the underlying mechanisms.
Entertainment: games and animations are the two most popular applications of simulation.
Phases in a M&S study
Problem definition Input/output data collection and analysis Modelling Implementation Verification and validation Experimentation Experiment optimization Output data analysis
ProblemFormulation
ConceptualModeling
DataCollection
Modeling
Simulation
Experimentation
OutputAnalysis
Maintenance
Validation
Verification
cancel strategies
strategies
ConceptualModel
System's model
Simulation Model
Simulation Results