Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling
Hans Vangheluwe Modelling and Simulation Causes of Complexity - - PowerPoint PPT Presentation
Hans Vangheluwe Modelling and Simulation Causes of Complexity - - PowerPoint PPT Presentation
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation to tackle Complexity Hans Vangheluwe Modelling and Simulation Causes of Complexity Dealing with Complexity
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling
1
Modelling and Simulation Modelling and Simulation for . . . The Modelling Relationship
2
Causes of Complexity Large Number of Components Diversity of Components Non-compositional/Emergent Behaviour Uncertainty
3
Dealing with Complexity Multiple Abstraction Levels Optimal Formalism Multi-Formalism Multiple Views/Aspects
4
Multi-Paradigm Modelling
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
Simulation . . . when too costly/dangerous analysis ↔ design
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
Simulation . . . real experiment not ethical “physical” simulation, training
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
Simulation . . . evaluate alternatives
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
Simulation . . . “Do it Right the First Time”
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
essence: “shooting” problems
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
defining a “hit”
5 10 15 20 5 10 15 20 25 30
θ
- rigin (0, 2)
target (30, 1) Height (m) Distance (m)
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
- ptimizing a “performance metric”
10 20 30 40 50 60 70 80 90 5 10 15 20 25 30
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
- ptimal solution. . . s
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
Modelling/Simulation . . . and code/app Synthesis
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
The spectrum of uses of models Documentation Formal Verification (all models, all behaviours) Model Checking (one model, all behaviours) Test Generation Simulation (one model, one behaviour) . . . calibration, validation, optimization, . . . Application Synthesis
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . . Requirements (“What?”) Detached or Semi-detached Style (classical, modern, . . . ) Number of Floors Number of rooms of different types (bedrooms, bathrooms, . . . ) Garage, Storage, . . . Cellar Energy-saving measures . . . Design (“How?”)
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
System Boundaries System to be built/studied Environment with which the system interacts
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Modelling and Simulation for . . .
System vs. “Plant”
www.mathworks.com/products/demos/simulink/PowerWindow/html/PowerWindow1.html
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling The Modelling Relationship
Real-World entity Base Model System S
- nly study behaviour in
experimental context experiment within context Model M Simulation Results Experiment Observed Data
within context
simulate = virtual experiment Model Base a-priori knowledge
validation
REALITY MODEL GOALS
Modelling and Simulation Process
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling The Modelling Relationship
System (real or model) generator transducer acceptor Experimental Frame
Frame Input Variables Frame Output Variables
set of all “contexts” in which model is valid includes experiment descriptions: parameters, initial conditions ∼ re-use, testing
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling
Dealing with Complexity
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Large Number of Components
Crowds
www.3dm3.com
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Large Number of Components
Number of Components – hierarchical (de-)composition
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Diversity of Components
Diversity of Components: Power Window
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Diversity of Components
Diversity of Components: Paper Mill
www.gov.karelia.ru
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Diversity of Components
Paper Mill Model
M,S M,S M,S M,S
Q
M,S
Q
M,S M,S M,S M,S
PaperPulp mill Waste Water Treatment Plant Fish Farm
Effluent Recycle (return) flow Clarifier (DESS) Activated sludge unit (DESS) Mixing Aeration Sedimentation Influent Stormwater tank 1 Stormwater tank 2
- verflow
Switch
WWTP (DESS) System of WWTP and Stormwater tanks (DEVS)
Input/Output function Input function Output function
algae fish
GE RRA X CFA
+
CFF
EDRF
+ GF
X X
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Non-compositional/Emergent Behaviour
Non-compositional/Emergent Behaviour
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Non-compositional/Emergent Behaviour
Engineered Emergent Behaviour
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Uncertainty
Often related to level of abstraction: for example continuous vs. discrete
www.engr.utexas.edu/trafficSims/
uncertainty = imprecise = not rigorous
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling
Guiding principle (∼ physics: principle of minimal action) minimize accidental complexity,
- nly essential complexity remains
Fred P . Brooks. No Silver Bullet – Essence and Accident in Software Engineering. Proceedings of the IFIP Tenth World Computing Conference, pp. 1069–1076, 1986. http://www.lips.utexas.edu/ee382c-15005/Readings/Readings1/05-Broo87.pdf
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling
Solutions multiple abstraction levels
- ptimal formalism
multiple formalisms multiple views
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Abstraction Levels
Different Abstraction Levels – properties preserved
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Abstraction Levels
Levels of Abstraction/Views: Morphism
detailed (technical) level abstract (decision) level abstraction simulation M_d M_t trajectory model traj_t traj_d
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Abstraction Levels
Abstraction Relationship foundation: the information contained in a model M. Different questions (properties) P = I(M) which can be asked concerning the model. These questions either result in true or false. Abstraction and its opposite, refinement are relative to a non-empty set of questions (properties) P. If M1 is an abstraction of M2 with respect to P, for all p ∈ P: M1 | = p ⇒ M2 | = p. This is written M1 ⊒P M2. M1 is said to be a refinement of M2 iff M1 is an abstraction
- f M2. This is written M1 ⊑P M2.
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Optimal Formalism
Most Appropriate Formalism
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Optimal Formalism
Forrester System Dynamics model
- f Predator-Prey interaction
Predator Prey Grazing_efficiency uptake_predator loss_prey predator_surplus_DR prey_surplus_BR
2−species predator−prey system
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Optimal Formalism
Causal Block Diagram model of Harmonic Oscillator
x0 0.0 y0 1.0
IC
x
IC
y −
I OUT
K 1.0 0.0 PLOT
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Optimal Formalism
Petri Net model of Producer – Consumer
P.Calculating 1 Wait4Cons Buffer Buffer−p 1 Wait4Prod 1 C.Calculating Produce Put in Buffer Rem.from buffer Consume
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Optimal Formalism
GPSS model of Telephone Exchange
FN1 12 2 V2 V1 PH 1 LR PH1 V1 H 2 P2 NE P1 S PH1 LNKS R PH1 1 LR PH2 R PH1 LNKS 1 S PH2 FN1 120 Function: 1 LNKS 10
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multi-Formalism
Multiple Formalisms: Power Window
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multi-Formalism
Components in Different Formalisms
www.mathworks.com/products/demos/simulink/PowerWindow/html/PowerWindow1.html
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multi-Formalism
Controller, using Statechart(StateFlow) formalism
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multi-Formalism
Mechanics subsystem
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Views/Aspects
Multiple (consistent !) Views (in = Formalisms)
(work by Esther Guerra and Juan de Lara)
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Views/Aspects
View: Runtime Diagram
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Views/Aspects
View: Events Diagram
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Views/Aspects
View: Protocol Statechart
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling Multiple Views/Aspects
No Free Lunch!
Solutions often introduce their own accidental complexity multiple abstraction levels (need morphism)
- ptimal formalism (need precise meaning)
multiple formalisms (need relationship) multiple views (need consistency)
Modelling and Simulation Causes of Complexity Dealing with Complexity Multi-Paradigm Modelling
Multi-Paradigm Modelling ( minimize accidental complexity ) at the most appropriate level of abstraction using the most appropriate formalism(s) Differential Algebraic Equations, Petri Nets, Bond Graphs, Statecharts, CSP , Queueing Networks, Lustre/Esterel, . . . with transformations as first-class models
Pieter J. Mosterman and Hans Vangheluwe. Computer Automated Multi-Paradigm Modeling: An Introduction. Simulation 80(9):433–450, September 2004. Special Issue: Grand Challenges for Modeling and Simulation.