Equation-Based Object-Oriented Languages for Acausal Modeling and Simulation

Lecture 12a in EECS 144/244 University of California, Berkeley April 17, 2013

David Broman [email protected]

EECS Department University of California, Berkeley, USA

and

Linköping University, Sweden

Some of the slides are based OSMC tutorials and contributed by Peter Fritzson (Based on book and lecture nodes), David Broman, Emma Larsdotter Nilsson, Peter Bunus, Adrian Pop, Jan Brugård, Mohsen Torabzadeh-Tari, and Adeel Asghar. Copyright © Open Source Consortium.

2

Agenda [email protected]

Part I Part II EOO Languages for CPS Modelica Overview

Platform 1 Physical Actuator Physical Plant 2 Interface Network Physical Platform 2 Interface

Sensor Computation 1 Delay 1

Computation 4 Computation 2 Sensor Platform 3 Physical Delay 2 Interface

Computation 3

Physical PPhhyyssicicaall Pllannt t1 2 Interface Actuator

Part III Part IV OpenModelica Demo Modelyze – a research language

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 3

[email protected]

Part I EOO Languages for CPS

Platform 1 Physical Actuator Interface Physical Plant 2

Network Physical Platform 2 Interface

Sensor Computation 1 Delay 1

Computation 4 Computation 2

Sensor Platform 3 Physical Delay 2 Interface

Computation 3

Physical PPhhyyssicicaall Pllannt t1 2 Interface Actuator

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

4 Cyber-Physical Systems (CPS) [email protected]

Aircraft Industrial Robots Power Plants

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 5 Modeling and Simulating Cyber-Physical Systems [email protected]

Platform 1 Physical Actuator Physical Plant 2 Interface Network Physical Platform 2 Interface

Sensor Computation 1 Delay 1

Computation 4 Computation 2

Sensor Platform 3 Physical Delay 2 Simulation with Interface Computation 3

Physical Physical Plant 1 timing properties Physical Plant 2 Interface Actuator Model Various models of computation (MoC) Equation-based model Hardware-in-the-loop Modeling (HIL) simulation Modeling

Physical system available? Sensors System

Actuators

Physical system (the plant) Cyber system: Computation (embedded) + Networking

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

6 Equation-Based Object-Oriented (EOO) Languages [email protected]

Domain-Specific Language (DSL) Models and Objects • Object in e.g., Java, C++: • Primarily domain: object = data + methods Modeling of physical Equation-Based systems Object-Oriented • Objects in EOO languages: (EOO) object = data + equations • Multiple physical domains: e.g., mechanical, electrical, hydraulic

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 7 Equation-Based Object-Oriented (EOO) Languages [email protected]

Domain-Specific connections! objects (components)! Language (DSL) Models and Objects • Object in e.g., Java, C++: • Primarily domain: object = data + methods Modeling of physical Equation-Based systems portsObject-Oriented! • Objects in EOO languages: (EOO) object = data + equations • Multiple physical domains: e.g., mechanical, electrical, hydraulic

EOO model (textual) EOO model (graphical)

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

8 Equation-Based Object-Oriented (EOO) Languages [email protected]

Domain-Specific Language (DSL) Models and Objects • Object in e.g., Java, C++: • Primarily domain: object = data + methods Modeling of physical Equation-Based systems Object-Oriented • Objects in EOO languages: (EOO) object = data + equations • Multiple physical domains: e.g., mechanical, electrical, hydraulic

• At the equation-level u = R * i Acausality • At the object connection level

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 9 Equation-Based Object-Oriented (EOO) Languages [email protected]

Domain-Specific Direction not determined at modeling time! Language (DSL) Models and Objects • Object in e.g., Java, C++: • Primarily domain: object = data + methods Modeling of physical Equation-Based systems acausal (non-causal) Object-Oriented • Objects in EOO languages: (EOO) object = data + equations • Multiple physical domains: e.g., mechanical, electrical, hydraulic

• At the equation-levelPhysical topology ! u = Ris * lost i ! Acausality • At the object connection level causal

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

10 Equation-Based Object-Oriented (EOO) Languages [email protected]

Domain-Specific Language (DSL) Models and Objects • Object in e.g., Java, C++: • Primarily domain: object = data + methods Modeling of physical Equation-Based systems acausal (non-causal) Object-Oriented • Objects in EOO languages: (EOO) object = data + equations • Multiple physical domains: e.g., mechanical, electrical, hydraulic

• At the equation-level u = R * i Acausality • At the object connection level causal

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 11 Equation-Based Object-Oriented (EOO) Languages [email protected]

Domain-Specific Language (DSL) Models and Objects • Object in e.g., Java, C++: • Primarily domain: object = data + methods Modeling of physical Equation-Based systems Object-Oriented • Objects in EOO languages: (EOO) object = data + equations • Multiple physical domains: e.g., mechanical, electrical, hydraulic

• Modelica • VHDL-AMS • At the equation-level • gPROMS u = R * i Acausality • Modelyze • At the object connection level • …

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

12

[email protected]

Part II Modelica Overview

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 13

What is Modelica? [email protected]

A language for modeling of complex physical systems

• Robotics • Automotive • Aircrafts • Satellites • Power plants • Systems biology

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

14

What is Modelica? [email protected]

A language for modeling of complex physical systems

Primary designed for simulation, but there are also other usages of models, e.g. optimization.

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 15

What is Modelica? [email protected]

A language for modeling of complex physical systems i.e., Modelica is not a tool

Free, open language specification:

Available at: www.modelica.org

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

16 Modelica Tools [email protected]

Commercial Environments Free Environments

Dymola by Dassault Systemes OpenModelica supported by OSMC SimulationX by ITI GmbH Jmodelica.org supported by Modelon

LMS Imagine.Lab AMESim by LMS Modelicac (part of Scilab) MapleSim by Maplesoft SimForge MOSILAB by Fraunhofer FIRST CyModelica by CyDesign Labs OPTIMICA Studio by Modelon AB MWorks by Suzhou Tongyuan Wolfram SystemModeler by Wolfram

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 17

What is special about Modelica? [email protected]

Multi-Domain Modeling

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

18

What is special about Modelica? [email protected]

Multi-Domain Visual Acausal Modeling Keeps the physical structure! Component ! Modeling

Acausal model (Modelica)

Causal block-based model ()

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 19

What is special about Modelica? [email protected]

Hierarchical system Multi-Domain Visual Acausal modeling Modeling Component k2 i Modeling axis6 qddRef cut joint qdRef qRef k1 r3Control r3Motor r3Drive1 tn 1 1 i 1 S S qd axis5

q: angle qd: angular velocity qdRef Kd qdd: angular acceleration S 0.03 rel

joint=0 Jmotor=J spring=c axis4 S qRef pSum Kv sum wSum rate2 rate3 iRef gear=i +1 b(s) 340.8 0.3 - +1 - a(s) S fric=Rv0 axis3

rate1 tacho2 tacho1 b(s) b(s) PT1 a(s) a(s) g5 axis2

q Ra=250

qd Rp2=50

C=0.004*D/w m Rd1=100 Rp1=200 a(5/2Dwm)) La=(250/(2*D*w axis1 Rd2=100 Ri=10 - - - + + diff + pow er cut in OpI Vs Rd4=100 emf iRef g3 y g1 Rd3=100 x

hall2 inertial Courtesy of Martin Otter hall1 w r

g4 g2 qd q Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

20

What is special about Modelica? [email protected]

Multi-Domain Visual Acausal Modeling A textual class-based language Component OO primary used for as a structuring concept Modeling Behaviour described declaratively using • Differential algebraic equations (DAE) (continuous-time) • Event triggers (discrete-time)

Variable! class VanDerPol "Van der Pol oscillator model" declarations! Real x(start = 1) "Descriptive string for x”; Real y(start = 1) "y coordinate”; ! parameter Real lambda = 0.3; equation Typed der(x) = y; der(y) = -x + lambda*(1 - x*x)*y; Declarative end VanDerPol; Textual Language Differential equations! ! Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 21

What is special about Modelica? [email protected]

Multi-Domain Visual Acausal Modeling Component Modeling Hybrid modeling =

continuous-time + discrete-time modeling

Continuous-time

Discrete-time

Typed time Declarative Hybrid Textual Language Modeling

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

22 Some Domains [email protected]

Domain Potential Flow Carrier Modelica Type Library

Electrical Voltage Current Charge Electrical. Analog Mechanical. Translational Position Force Linear momentum Translational

Angular Mechanical. Rotational Angle Torque momentum Rotational

Magnetic Magnetic Magnetic Magnetic flux potential flux rate

Hydraulic Pressure Volume flow Volume HyLibLight

Heat Temperature Heat flow Heat HeatFlow1D

Chemical Under Chemical Particle flow Particles potential construction

PneuLibLight Pneumatic Presure Mass flow Air

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 23

Modelica Standard Library [email protected]

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

24

Modelica in Autmotive Industry [email protected]

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 25

Modelica in Avionics [email protected]

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

26 Modelica in Power Generation GTX Gas Turbine [email protected]

Hello Developed by MathCore Courtesy of Siemens Industrial Turbomachinery AB for Siemens Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 27

Brief Modelica History [email protected]

Modelica design group meetings • First meeting in fall 1996 • International group of people with expert knowledge in both language design and physical modeling • Industry and academia

Modelica Language Versions • v1.0 (1997), v2.0 (2002) v.2.2 (2005) v.3.0 (2007) 3.1 (2009) 3.2 (2010), 3.2 revision 1 (2012) Modelica Association established 2000 • Open, non-profit organization Modelica Conferences • 9 international conferences (2000-2012)

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

28

Typical Simulation Process [email protected]

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 29

Acausal Modeling [email protected]

The order of computations is not decided at modeling time

Acausal Causal

Visual Component Level

Equation A resistor equation: Causal possibilities: !" Level R*i = v;! i := v/R; v := R*i; R := v/i;!

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

30

Simple model - Hello World! [email protected]

Name of model! Initial condition! Equation: x = - x Initial condition: x(0) = 1 model HelloWorld "A simple equation" Continuous-time! Real x(start=1); variable ! parameter Real a = -1; equation Parameter, constant! der(x)= a*x; during simulation ! end HelloWorld; Simulation in OpenModelica environment Differential equation ! 1 0.8 simulate(HelloWorld, stopTime = 2) 0.6 plot(x) 0.4

0.2

0.5 1 1.5 2

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 31

Differential Algebraic Equations [email protected]

General representation of DAEs: Force it to be the Algebraic variable! start value! 0 = f (t, x(t),x(t), y(t),u(t), p) Differentiated model DAEexample t time variable! Real x(start=0.9, fixed=true); x(t) vector of differentiated state variables Real y; x(t) vector of state variables equation der(y)+sin(x)= sin(time); y(t) vector of algebraic variables x - y = exp(-0.9*x)*cos(y); u(t) vector of input variables end DAEexample; p vector of parameters and/or constants

Typically, the compiler transforms the DAE to an Built-in functions and ODE before simulation, sometimes using an global time variable! index reduction algorithms (more about this in lecture 12b). Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

32

Textual and Graphical Models [email protected]

R1 L

RR=100=10 ! LL=1=0.1! A C

Used model (defined elsewhere)!

G Named component = Enables later model instance! modification of component! Modification of parameter value!

Connect equations!

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 33

Equations and Inheritance [email protected]

R1 Pin p, n and L Reals v and i are copied to the R=100R=10 ! LL=1=0.1! A subclass C Equations are copied as well.

G Inherits equations and ! components from ! TwoPin

Differential equation!

Algebraic equation!

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

34

Connectors (Ports) [email protected]

R1 L

R=100R=10 ! LL=1=0.1! A C

G

Connectors are instances ! of a connector class.

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 35

Connections and Flow Variables [email protected]

R1 L

R=100R=10 ! LL=1=0.1! A C

G Fundamental concept making acausal modeling Equations from potential variables: work (simplified) L.n.v = AC.n.v AC.n.v = G.p.v

Equation from flow variables:! L.n.i + AC.n.i + G.p.i = 0

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

36 Models and Equation Generation [email protected]

Positive port Negative port Each port in electrical domain: i – flow variable (current) v – potential variable (voltage)

Modelica connect-equations connect(VS.n,G.p)! connect(R.n,G.p) !

Port set for a3 {G.p,R.n,VS.n} !

Potential equations (generated) R.n.v = G.p.v! VS.n.v = G.p.v! Behavior equations Sum-to-zero equation (generated) L * der(i) = v ! R * i = v ! G.p.i + R.n.i + VS.n.i = 0! Inductor Resistor

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 37 Abstraction and Composition [email protected]

VS.n.i + SC.n.i + G.p.i = 0!

(a) and (c) describes the same circuit

Same port SC is an instance (e.g. SC.n) of model (b) can be seen as: inside port outside port

Abstracted model SC.R.n.i - SC.n.i = 0!

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

38

Hybrid Modeling [email protected]

Hybrid modeling = continuous-time + discrete changes (events) (Using Modelica terminology) Continuous-time Real x; Voltage v; Current i; Discrete changes in time discrete Real x; Integer i; Boolean b; time Events! • A point in time that is instantaneous, i.e., has zero duration • An event condition so that the event can take place • A set of variables that are associated with the event • Some behavior associated with the event, e.g. conditional equations that become active or are deactivated at the event Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 39

Event creation – when [email protected]

when-equations when then time end when; event 1 event 2 event 3

Equations only active at event times

Time event State event when time >= 10.0 then ... when sin(x) > 0.5 then end when; ... end when;

Only dependent on time, can be Related to a state. Check for scheduled in advance zero-crossing

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

40

Reinit - discontinuous changes [email protected]

The value of a continuous-time state variable can be instantaneously changed by a reinit-equation within a when-equation

model BouncingBall "the bouncing ball model" parameter Real g=9.81; //gravitational acc. parameter Real c=0.90; //elasticity constant Real height(start=10),velocity(start=0); equation der(height) = velocity; der(velocity)=-g; when height<0 then reinit(velocity, -c*velocity); end when; end BouncingBall;

Initial conditions Reinit ”assigns” continuous-time variable velocity a new value Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 41

Modelica – large and complex [email protected]

We have just “scratched on the surface of the language”

Examples of the features which has not been covered • Functions and algorithm sections • Arrays and matrices • Inner / outer variables (lookup in instance hierarchy) • Annotations • Loop constructs • Partial classes • Packages, blocks... And much more...

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

42

[email protected]

Part IV

Open Modelica Demo

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 43

Open Source Modelica Consortium (OSMC)[email protected]

OSMC • Founded in 2007 in Linköping, Sweden • Seven founding organizations • Non-profit, non-governmental organization • Aim of developing and promoting the OpenModelica project • Non-commercial and commercial usage under the OSMC public license

Part I ! Part II ! Part III Part IV 4/24/13&EOO Languages! Modelica OpenModelica! Modelyze – a! 43& for CPS! Overview! Demo! Research language!

44

[email protected]

Part IV

Modelyze – a Research Language

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 45

What is Modelyze? [email protected]

Purpose: Research language – address the expressiveness and analyzability problem by making the language extensible Modelyze Small, simple, host language for (MODEL and analYZE) embedding domain-specific languages (DSL) of different models of computation (MoC) Key aspect: Both the DSL and models in the DSL are defined in Modelyze Gradually typed functional language (call-by-value) Novelty: Typed symbolic expressions Formal semantics for a core of the language. Proven type soundness for the core. Prototype implementation (interpreter). Evaluated for series of equation-based DSLs.

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

46

Modelica Environment [email protected]

ModelModel LibraryModel Library Library

Modelica Result Modelica Model Tool (e.g., simulation)

Language Specification - Type checking - Collapsing the instance hierarchy - Connection Semantics - Simulation (Runtime)

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 47

Modelyze Environment [email protected]

ModelModel LibraryModel Library Library

Modelyze DSL Modelyze Result Model Tool (e.g., simulation)

Library for using models LanguageLanguage Specification Specification - ConnectionLibrary for Semanticsusing models -- Type Type checking checking - ConnectionLibrary for Semantics using models - Simulation- Connection (Runtime) Semantics -- Collapsing Collapsing the the instance instance hierarchy hierarch - Simulation (Runtime) - Simulation (Runtime) - Connection Semantics - Simulation (Runtime)

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

48 Example DSL embedded in Modelyze [email protected]

Tension in the string!

Pendulum (y position)!

String breaks (3.2 s)! Ball is flying freely!

Ball bounces on the floor!

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 49 Example DSL embedded in Modelyze [email protected]

Function as model abstraction!

Unknowns!

Initial Values! Two modes !

Guarded Transition !

Differential equations !

Self transition, updating the velocity!

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!

50

Conclusions [email protected]

Platform 1 Physical Actuator Interface Physical Plant 2

Network Physical Platform 2 Interface

Sensor Computation 1 Delay 1 EOO Languages are particularly good for physical modeling Computation 4 Computation 2

Sensor Platform 3 Physical Delay 2 because of their acausal capability Interface

Computation 3

Physical PPhhyyssicicaall Pllannt t1 2 Interface Actuator

Modelica is the current state-of-the-art EOO language. The fundamental formalism is DAEs.

OpenModelica is a free Modelica environment that includes both compiler and a graphical modeling IDE.

Modelyze is an extensible research language for embedding equation-based languages.

Thank you for listening!

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language! 51

References and Further Reading [email protected]

• Sven Erik Mattsson, Hilding Elmqvist, and Martin Otter. Physical System Modeling with Modelica. Control Engineering Practice 6. Pages 501-510, 1998. • Peter Fritzson. Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. Wiley-IEEE Press, New York, 2004. • Peter Fritzson, Peter Aronsson, Håkan Lundvall, Kaj Nyström, Adrian Pop, Levon Saldamli, and David Broman The OpenModelica Modeling, Simulation, and Software Development Environment. Simulation News Europe. Issue 44, Pages 8-16, ARGESIM, 2005 • David Broman, Peter Fritzson, and Sébastien Furic. Types in the Modelica Language. In Proceedings of the Fifth International Modelica Conference, pages 303-315, Vienna, Austria, 2006. • David Broman and Jeremy G. Siek. Modelyze: a gradually typed host language for embedding equation-based modeling languages. Technical Report UCB/EECS-2012-173, EECS Department, University of California, Berkeley, June 2012.

See http://www.modelica.org for more information on Modelica, including the latest language specification.

Part I ! Part II ! Part III Part IV EOO Languages! Modelica OpenModelica! Modelyze – a! for CPS! Overview! Demo! Research language!