some context for Adrian Pops thesis Integrated Model-Driven - - PowerPoint PPT Presentation

some context for adrian pop s thesis integrated model
SMART_READER_LITE
LIVE PREVIEW

some context for Adrian Pops thesis Integrated Model-Driven - - PowerPoint PPT Presentation

5 June 2008 Link oping, Sweden some context for Adrian Pops thesis Integrated Model-Driven Development Environments for Equation-Based Object-Oriented Languages Hans Vangheluwe Modelling, Simulation and Design Lab (MSDL) School of


slide-1
SLIDE 1

5 June 2008 Link¨

  • ping, Sweden

some context for Adrian Pop’s thesis Integrated Model-Driven Development Environments for Equation-Based Object-Oriented Languages

Hans Vangheluwe

Modelling, Simulation and Design Lab (MSDL) School of Computer Science, McGill University, Montr´ eal, Canada

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 1

slide-2
SLIDE 2

Overview

  • 1. Why/When Simulation of Complex Systems?
  • 2. Modelling and Simulation Concepts
  • 3. Modelling Languages Evolution
  • 4. Desirable Features
  • 5. Domain-specific Modelling and Language Engineering

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 2

slide-3
SLIDE 3

Simulation . . . when too costly/dangerous

analysis ↔ design

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 3

slide-4
SLIDE 4

Simulation . . . real experiment not ethical

training, physical simulation

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 4

slide-5
SLIDE 5

Simulation . . . evaluate alternatives

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 5

slide-6
SLIDE 6

Simulation . . . “Do it Right the First Time”

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 6

slide-7
SLIDE 7

Modelling/Simulation . . . and code/app Synthesis

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 7

slide-8
SLIDE 8

Complex Systems: complexity due to . . .

large number of components

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 8

slide-9
SLIDE 9

Complex Systems: complexity due to . . .

www.mathworks.com/products/demos/simulink/PowerWindow/html/PowerWindow1.html

heterogeneity of components

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 9

slide-10
SLIDE 10

Complex Systems: complexity due to . . .

non-compositionality of networks (“emergent” behaviour)

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 10

slide-11
SLIDE 11

Modelling/Simulating Complex Systems . . .

  • at the most appropriate level of abstraction
  • using the most appropriate formalism(s)

Ordinary Differential Equations, Petri Nets, Bond Graphs, Statecharts, Forrester System Dynamics, CSP, Queueing Networks, . . .

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 11

slide-12
SLIDE 12

Defining “simulation”

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

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 12

slide-13
SLIDE 13

Modelling Languages: Simulation Code Library

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 13

slide-14
SLIDE 14

Modelling Languages: CSSL

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 14

slide-15
SLIDE 15

Modelling Languages: Causal Block Diagram

x0 0.0 y0 1.0

IC

x

IC

y −

I OUT

K 1.0 0.0 PLOT

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 15

slide-16
SLIDE 16

Non-Causal Modelling Languages

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 16

slide-17
SLIDE 17

Modelica: Electrical Resistor

model Resistor "Ideal linear electrical resistor" extends OnePort; parameter Resistance R=1 "Resistance"; equation R*i = v; end Resistor;

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 17

slide-18
SLIDE 18

Modelica: Electrical Network

model circuit Resistor R1(R=10); Capacitor C(C=0.01); Resistor R2(R=100); Inductor L(L=0.1); VsourceAC AC; Ground G; equation connect(AC.p, R1.p); connect(R1.n, C.p); connect(C.n, AC.n); connect(R1.p, R2.p); connect(R2.n, L.p); connect(L.n, C.n); connect(AC.n, G.p); end circuit;

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 18

slide-19
SLIDE 19

Modelling Languages: EcosimPro

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 19

slide-20
SLIDE 20

Modelling Languages: Visual Modelling

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 20

slide-21
SLIDE 21

Visual Modelling Environments: gProms

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 21

slide-22
SLIDE 22

Quality Criteria for (Modelling) Languages

  • well-defined syntax and semantics
  • modularity
  • library mechanism (and standard libraries)
  • appropriate abstraction level for particular task

(e.g., virtual experimentation with physical systems)

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 22

slide-23
SLIDE 23

Were missing for Modelica:

  • Tools for debugging
  • Language features Beyond Equations

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 23

slide-24
SLIDE 24

Beyond Equations Wishlist

  • Tools for going “under the hood”
  • Multi-formalism modelling
  • Domain-Specific (visual) modelling
  • Ability to bootstrap

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 24

slide-25
SLIDE 25

Meta-Modelica and meta-programming

eat your own dogfood!

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 25

slide-26
SLIDE 26

Multi-formalism / Heterogeneous MoC (Ptolemy)

solution:

  • co-simulation
  • formalism transformation

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 26

slide-27
SLIDE 27

DSM: Waste Water Treatment Plants (WWTPs)

NATO’s Sarajevo WWTP www.nato.int/sfor/cimic/env-pro/waterpla.htm

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 27

slide-28
SLIDE 28

DS(V)M Environment

www.hemmis.com/products/west/

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 28

slide-29
SLIDE 29

Why DS(V)M ? (as opposed to General Purpose modelling)

  • match the user’s mental model of the problem domain
  • maximally constrain the user (to the problem at hand)

⇒ easier to learn ⇒ avoid errors

  • separate domain-expert’s work

from analysis/transformation expert’s work Anecdotal evidence of 5 to 10 times speedup

Steven Kelly and Juha-Pekka Tolvanen. Domain-Specific Modeling: Enabling Full Code Generation. Wiley 2008. Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 29

slide-30
SLIDE 30

Language Engineering (with Modelica)

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 30

slide-31
SLIDE 31

Warning: A Fool with a Tool . . .

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation: System Specification 31