33
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

Why building models?

  • Upload
    emilia

  • View
    40

  • Download
    0

Embed Size (px)

DESCRIPTION

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. M&S Entities and Relations. modeling relation. simulation - PowerPoint PPT Presentation

Citation preview

Page 1: 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

Page 2: Why building models?

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

Page 3: Why building models?

Modelling System Dynamics

Page 4: Why building models?

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

Page 5: Why building models?

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

Page 6: Why building models?

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

Page 7: Why building models?

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

Page 8: Why building models?

Declarative models (cont.)

Event-based declarative models Arcs: represent scheduling. Event relation: from arrival of token i to departure of

token i.

Page 9: Why building models?

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

Page 10: Why building models?

Spatial models

Space notions included Relationship between time and space positions

– Example: customers moving through the server.

Page 11: Why building models?

A Systems Dynamics classification

Classifying modelling techniques according to the system dynamics

Page 12: Why building models?

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

Page 13: Why building models?

Discrete time/Discrete variable

Finite State Machines Finite State Automata Petri Nets CSP CCS Markov chains

Page 14: Why building models?

Automata

a

c

bs22

1 2

Page 15: Why building models?

Markov Chains

0 1

P0,1 P1,1

P1,0

Page 16: Why building models?

Finite State Machines

S

X

Y

(a)Moore machine; (b) Mealy machine

S

X

Y

Page 17: Why building models?

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

Page 18: Why building models?

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

Page 19: Why building models?

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

Page 20: Why building models?

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

. . .

. . .

Page 21: Why building models?

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 }

Page 22: Why building models?

Statecharts

Page 23: Why building models?

Classification

Page 24: Why building models?

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

Page 25: Why building models?

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

Page 26: Why building models?

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.

Page 27: Why building models?

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.

Page 28: Why building models?

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

Page 29: Why building models?

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

Page 30: Why building models?

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.

Page 31: Why building models?

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.

Page 32: Why building models?

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

Page 33: Why building models?

ProblemFormulation

ConceptualModeling

DataCollection

Modeling

Simulation

Experimentation

OutputAnalysis

Maintenance

Validation

Verification

cancel strategies

strategies

ConceptualModel

System's model

Simulation Model

Simulation Results