Modelica Revision History

This appendix describes the history of the Modelica Language Design, and its contributors. This appendix is just present for historic reasons and is not normative. The current version of this document is available from https://www.modelica.org/documents.

Modelica 3.4

Modelica 3.4 was released April 10, 2017. The Modelica 3.4 specification was edited by Hans Olsson.

Main changes in Modelica 3.4

The following Modelica Change Proposals are backward compatible extensions added in 3.4:

  • Automatic conversions between different versions (MCP-0014), . Ticket #1622.
  • Flattening is clearly specified (MCP-0019), and . Ticket #1829.
  • Convert from Integer to Enumeration (MCP-0022), primarily . Ticket #1842.
  • Explicitly casting a Model to Record (MCP-0023), . Ticket #1953.
  • Initialization of Clocked Continuous States (MCP-0024), , and . Ticket #2007.
  • An added option to Ellipse Annotation to draw only an arc (MCP-0026), . Ticket #2045.
  • Allowing mixed Real and non-Real Record Derivatives (MCP-0028), . Ticket #2134.

The definition of pure functions was refined, in particular to restore backwards compatibility with Modelica 3.2, . Ticket #1937.

The following minor improvements were made (starting from 3.3 Revision 1):

  • Clarified simulation model, . Ticket #730.
  • Clarified structural analysis, . Ticket #588.
  • Clarified meta-symbols, and 2.3.1. Ticket #1616.
  • Typo, . Ticket #1702.
  • Clarified newline, . Ticket #1479.
  • Allow ’”’ and define it to be equal to ’”’ (and similarly for ’?’), . Ticket #1176.
  • Clarified that built-in functions in the specification, and 12.5. Ticket #1608.
  • Clarified named arguments for builtin operators, in particular spatialDistribution, and . Ticket #2002.
  • Clarified that semiLinear is continuous, . Ticket #112.
  • Corrected spelling, . Ticket #1828.
  • Corrected typo in code and reformulated description, . Ticket #1588, #1729, and #2166.
  • Corrected typo for events, . Ticket #1657.
  • Clarified sample operator, . Ticket #677.
  • Additional functions give parameter expression, . Ticket #1082.
  • Clarified ExternalObject, . Ticket #1546.
  • Simplified rules type prefixes for structured components, . Ticket #1686.
  • Clarified that unexpanded bindings shall be unexpanded, . Ticket #2153.
  • Clarified conditional components, . Ticket #2057.
  • Improved example to avoid using class, . Ticket #553.
  • Clarify inheritance from predefines types, . Ticket #1250.
  • Allow connector inheriting from operator record, . Ticket #1714.
  • Clarify restrictions on record components, . Ticket #1615.
  • Clarify that only functions may have external clause, and . Ticket #2014.
  • Clarified equation count for operator record, . Ticket #866.
  • Clarified restriction on attributes, . Ticket #1426.
  • Clarified how reserved the different built-in types are, . Ticket #1538.
  • Removed restriction on nominal and explained purpose, . Ticket #1445.
  • Added unbounded to Real, and . Ticket #926.
  • Added fixed-attribute for String, . Ticket #1797.
  • Clarified and corrected example in . Ticket #1849 and #2150.
  • Clarified nominal attribute, and . Ticket #1877.
  • Added that Connections is builtin package, . Ticket #1883.
  • Clarified lookup-order regarding import, . Ticket #1573.
  • Extend calling functions through component to array case, and . Ticket #1613.
  • Clarified existing use of automatic inner declarations, and . Ticket #1551 and #1749.
  • Removed restriction on array size for modifiers, . Ticket #1432.
  • Clarified that 2/3 and 2^(-3) are Real, . Ticket #1647.
  • Clarified that external declaration is inherited, . Ticket #789.
  • Further clarified order for multiple inheritance, and . Ticket #2015.
  • Clarified inheritance restrictions, . Ticket #1451.
  • Restricted merging of modifiers, . Ticket #791.
  • Clarified each especially for nested arrays, and . Ticket #1596.
  • Clarified replaceable with array sizes on types, . Ticket #1251.
  • Corrected and moved example, and . Ticket #1034.
  • Clarified “redeclare class extends B”, . Ticket #462 and #709.
  • Corrected example, . Ticket #1725.
  • Clarified description and annotation on constraining-clause, . Ticket #512.
  • Corrected typo, . Ticket #1770.
  • Clarified for-equation with types, . Ticket #915.
  • Clarified event generation, . Ticket #2114.
  • Further clarified initial() for when-clauses, – and indicated that this appendix is not normative. Ticket #1852.
  • Clarified using start-attribute for parameters, . Ticket #2136.
  • Clarified that states for first order ODE, . Ticket #937.
  • Clarified adding input/output prefix for expandable connector variables, . Ticket #829.
  • Clarified creating elements in expandable connectors, . Ticket #428.
  • Corrected expandable connector example, . Ticket #1763.
  • Clarified that stream-variables do not generate equations, . Ticket #1584.
  • Restrict that stream only connects to stream, . Ticket #796.
  • Clarified section heading, . Ticket #727.
  • Clarified vector arguments for operators in . Ticket #1590.
  • Corrected example, . Ticket #2143.
  • Clarified return type for reduction expressions, . Ticket #981.
  • Extended reduction expression sum to operator records, . Ticket #1897.
  • Clarified table in . Ticket #1722.
  • Match parenthesis, . Ticket #1558.
  • Recommend better alternative for generating vector, . Ticket #1837.
  • Defined unary operators, . Ticket #2027.
  • Allow missing trailing indices, sections and . Ticket #1603.
  • Clarified that element-wise division gives real result, . Ticket #1119.
  • Removed misleading comment, . Ticket #938.
  • Clarified how assignment works for multi-returning functions, . Ticket #1921.
  • Clarified no equations and initial algorithms in functions, . Ticket #2160.
  • Clarified assigning to record variables with bindings in functions, . Ticket #2016.
  • Clarified initialization of variables in functions, . Ticket #1708.
  • Standarize current practice of using = instead of := for bindings in functions, . Ticket #1595.
  • Clarified function partial evaluation, . Ticket #647.
  • Clarified initialization of record components in functions, . Ticket #1230.
  • Clarified flexible array sizes, . Ticket #2158.
  • Clarified name of output for record constructor in . Ticket #366.
  • Clarified derivatives for functions in several ways, . Ticket #985, #1543, #1544, #1545, #1547, #1548, #1788, #1972, #1987.
  • Clarified that using C89 and added possibility for C89, C99, and C11 , . Ticket #1088.
  • Clarified input/output to external functions, . Ticket #775.
  • Clarified handling of Boolean variables for external C, . Ticket #1846.
  • Added that Strings can be sent to FORTRAN 77, . Ticket #1971.
  • Allow multiple include directories, . Ticket #2103.
  • Allow specific libraries for different compiler versions, . Ticket #1316.
  • Added external warning functions, . Ticker #1967.
  • Clarified that pointers are only valid during each call, . Ticket #1611.
  • Clarified constructor and destructor, . Ticket #1907.
  • Clarified ’structured entity’ to be ’directory’, . Ticket #922.
  • Clarified handling of incorrect package.order, . Ticket #1858.
  • Restricted use of files with multiple classes, . Ticket #1854.
  • Clarified storing resources in a file-system, . Ticket #685, #1623.
  • Used correct font, . Ticket #2061.
  • Clarified that inStream optimizations are allowed, . Ticket #1766.
  • Corrected actualStream example in . Ticket #1652.
  • Corrected non-periodic rational clocks, . Ticket #2022.
  • Clarified initialization of clocked discretized continuous-time partitions, . Ticket #1528.
  • Defined rendering order, . Ticket #1750.
  • Clarified rotation direction, . Ticket #1830.
  • Clarified coordinate system definition, . Ticket #1831.
  • Defined coordinate system inheritance to be less suprising, and . Ticket #1978.
  • Clarified lineThickness and borderPattern, . Ticket #1896.
  • Corrected formatting, . Ticket #1825.
  • Made the different Text-annotations more similar, . Ticket #1621.
  • Clarified LinePatterns in . Ticket #1483.
  • Corrected flipping of components and bitmaps, and clarified various aspects of bitmaps, and . Ticket #1923.
  • Clarified arrows, . Ticket #1894.
  • Clarified existing use of zero-width texts, . Ticket #1636.
  • Added specific fontnames, . Ticket #1986.
  • Added alternative for macro-expansion, . Ticket #2148.
  • Corrected example in . Ticket #2111.
  • Placed annotation last in classes, in particular . Ticket #1009.
  • Cleaned up code and formatting in . Ticket #2041, #2042, and #2125.
  • Added missing nano-prefix, . Ticket #1261.
  • Replaced the outdated contents of by a hyperlink. Ticket #2130.
  • Added ModelicaServices to . Ticket #2132.
  • Restrict grammar to avoid modifiers with leading dot, . Ticket #1027.
  • Restrict grammar for base-prefix, . Ticket #917.
  • Restrict grammar for arrays, . Ticket #809.
  • Restrict grammar for function arguments (replacing semantic restriction), . Ticket #1634.
  • Corrected typo in . Ticket #1317.

Contributors to the Modelica Language 3.4

The members of the Modelica Association contributed to the Modelica 3.4 specification.

Modelica 3.3 Revision 1

Modelica 3.3 Revision 1 was released July 11, 2014. The Modelica 3.3 Revision 1 specification was edited by Hans Olsson.

Main changes in Modelica 3.3 Revision 1

The changes made in Modelica 3.2 Revision 2 are included, and in addition the following improvements were made:

  • Clarified that String-operator cannot use positional arguments, . Ticket #1468.
  • Corrected size of enumeration, and . Ticket #1369.
  • Clarified spatialDistribution, . Ticket #1510.
  • Restricted cardinality to give a clear definition, . Ticket #1409.
  • Clarified which constants need a value, . Ticket #1220.
  • Clarified type prefixes rules, . Tickets #1196, #1221, #1301.
  • Added exception for cyclic parameter bindings (already used in MSL), . Ticket #1320.
  • Added example for use of conditional components, . Ticket #1227.
  • Corrected annotation-grammar, . Ticket #1378.
  • Corrected duplicated class-definition grammar, . Ticket #1388.
  • Clarified short class definition, . Ticket #527.
  • Removed unusable variant for operator and operator function, . Ticket #1459, #1497.
  • Added definition of AssertionLevel, . ticket #962.
  • Corrected typos at end of loops in examples, and . Ticket #902
  • Clarified temporary flattening, . Ticket #1327.
  • Added definition of modification equations, . Ticket #959.
  • Clarified modifiers for array elements, . Ticket #1324.
  • Corrected example for final element modification, Ticket #1326.
  • Corrected duplicated class-definition grammar, . Ticket #1388.
  • Clarified modifiers on constraining type, . Ticket #1033.
  • Clarified when redeclare can be used with the same type and rules for redeclaring array types, . Tickets #1252, #1281.
  • Clarified default for annotation choicesAllMatching, . Ticket #1391.
  • Forbid when-statements in initial equation/algorithm (they would in most cases not be active; leading to confusion), and . Ticket #1288.
  • Clarified reinit during initialization, . Ticket #1372.
  • Clarified using start-values as guess-values; . Tickets #1133, #1246.
  • Clarified allowed use of variables in expandable connectors; . Ticket #1279.
  • Clarified causality for expandable connectors; . Ticket #1305.
  • Clarified expandable connectors in general; . Ticket #1330.
  • Clarified connection matching, . Ticket #884.
  • Added quantity checks for connectors (MSL already relies on this check); . Ticket #1284.
  • Clarified arrays with non-Integer dimensions, . Ticket #1501.
  • Clarified that ndims is allow for a scalar, . Ticket #1303.
  • Clarified number of arguments for zeros, ones, fill, . Ticket #1351.
  • Clarified min/max, . Ticket #1036.
  • Clarified array expressions using iterations allow non-simple types, . Ticket #1521.
  • Clarified arrays with non-Integer dimensions, . Ticket #1463.
  • Clarified calling function as specialized class, . Ticket #1362.
  • Clarified default values in functions depending on other inputs, . Ticket #1346.
  • Corrected syntax error in example, . Ticket #1338.
  • Clarified annotations on external functions, . Ticket #660.
  • Add possibility for sending arrays in records to external functions, . Ticket #351.
  • Corrected spelling to FORTRAN 77, . Ticket #1278.
  • Clarified default directories, . Ticket #1456.
  • Clarified constructing/destructing external objects, . Ticket #1518.
  • Clarified encapsulation requirement for operator record, . Ticket #1254.
  • Clarified operator record: arrays, priority, and zero result, . Tickets #1469, #1476, #1481.
  • Added element wise operations for operator record, . Ticket #1455.
  • Improved formulation, . Ticket #1362.
  • Clarified why noClock exists; . Ticket #1094.
  • Added initial conditions to solver methods for clocked discretized continuous-time partitions; . Ticket #1379.
  • Added requirement that priorities must be unique for statechart transitions (the restriction was present in original description and is necessary to ensure deterministic behavior), . Ticket #853.
  • Corrected syntax in Line definition, . Ticket #1464.
  • Corrected connectorSizing description, . Ticket #1441.
  • Corrected license example, . Ticket #1127.
  • Clarified names of productions in grammar and changed to use hyphen, . Tickets #713 and #1033.
  • Modified grammar use consistent style for import-list, . Ticket #1374.

Contributors to the Modelica Language, Version 3.3 Revision 1

The following members of the Modelica Association contributed to the Modelica 3.3 Revision 1 and/or Modelica 3.2 Revision 2 specification (alphabetical list):

  Peter Aronsson, MathCore AB, Linköping, Sweden
  Peter Fritzson, PELAB, Linköping University, Linköping, Sweden
  Hilding Elmqvist, Dassault Systèmes, Lund, Sweden
  Christoph Höger, Technical University of Berlin, Berlin, Germany
  Gerd Kurzbach, ITI GmbH, Dresden, Germany
  Jesper Mattsson, Modelon AB, Lund, Sweden
  Hans Olsson, Dassault Systèmes, Lund, Sweden
  Martin Otter, DLR, Oberpfaffenhofen, Germany
  Adrian Pop, Linköping University, Linköping, Sweden
  Elena Shmoylova, Maplesoft, Waterloo, Canada
  Martin Sjölund, PELAB, Linköping University, Linköping, Sweden
  Stefan Vorkoetter, Maplesoft, Waterloo, Canada

Modelica 3.3

Modelica 3.3 was released on May 9, 2012. The Modelica 3.3 specification was edited by Hans Olsson, Hilding Elmqvist and Martin Otter.

Main changes in Modelica 3.3

The following backward compatible extensions have been introduced with Modelica 3.3:

  • Language elements for describing synchronous behavior suited for implementation of control systems, .
  • Language elements to define synchronous state machines, .
  • The spatialDistribution function for special one-dimensional flow problems, .
  • The getInstanceName function for diagnostic messages, .
  • Possible to call a function through an instance name, .
  • Can use the start-value for a parameter to give a non-zero default that should be changed, .
  • A recommened procedure for priority between initial values have been added, .
  • Functions can be defined without algorithm-section, .
  • Functions can be marked as pure or impure with specified semantics, .
  • The rules for ExternalObject have been clarified, and .
  • Multiple definition import, .
  • Additional annotations allowing:
    • Functions to generate events, .
    • Experiments to specify a time-resolution of simulation result, .
    • Single instance of class, .
    • Text in the diagram layer can use a macro syntax, .
    • Color selection dialog for parameters, .
    • Conversion to specify a set of versions to convert with one script, .
    • Licensed libraries to define the set of allowed operations (including binary/source export), .

The following changes in Modelica 3.3 are not backwards compatible:

  • “Mapping of Models to Execution Environments” from Modelica 3.2 has been removed (a more powerful functionality is instead provided with the new and ). Since, no released tools has yet supported the previous , this not backwards compatible change is uncritical.
  • The new spatialDistribution and getInstanceName functions could cause problems if another function with that name was already used.
  • Conditional physical connectors must be connected if enabled, and . In almost all cases they have to be connected to generate correct result, and it is not possible to check that they are connected in the models

Contributors to Modelica 3.3

The language elements for describing synchronous behavior, , was mainly developed by Hilding Elmqvist, Martin Otter, and Sven Erik Mattsson. Hilding Elmqvist wrote a detailed tutorial. Sven Erik Mattsson developed a test implementation of the language elements and the needed new algorithms. Based on the prototype, tests and feedback have been provided by Martin Otter and Bernhard Thiele.

The language elements to define synchronous state machines, , was mainly developed by Hilding Elmqvist with contributions from Francois Dupont, Sven Erik Mattsson and Fabien Gaucher. Hilding Elmqvist wrote a tutorial. Sven Erik Mattsson and Carl-Fredrik Abelson developed a test implementation. Based on the prototype, tests and feedback have been provided by Alain Thura, Emmanuel Ledinot, Claire Campan, and Martin Malmheden.

The spatialDistribution operator was initiated by Hubertus Tummescheit, based on an operator of Dymola, and with contributions from Hans Olsson.

The improved definition of pure and impure functions and the enhanced import statement was proposed by Peter Fritzson.

The various smaller language improvements based on submitted tickets have been developed by a group headed by Hans Olsson and with group members Peter Fritzson, Christoph Höger, Gerd Kurzbach, Jesper Mattsson, Martin Sjölund, and Stefan Vorkoetter.

The following members of the Modelica Association participated at design meetings and contributed to the Modelica 3.3 specification:

  Johan Åkesson, Lund University and Modelon AB, Lund, Sweden
  Peter Aronsson, MathCore AB, Linköping, Sweden
  Ingrid Bausch-Gall, BAUSCH-GALL GmbH, Munich, Germany
  Volker Beuter, Kämmerer AG, Germany
  Torsten Blochwitz, ITI GmbH, Dresden, Germany
  David Broman, PELAB, Linköping University, Sweden
  Dag Brück, Dassault Systèmes, Lund, Sweden
  Francesco Casella, Politecnico di Milano, Milano, Italy
  Christoph Clauss, Fraunhofer, Dresden, Germany
  Mike Dempsey, Claytex Services Limited, Leamington Spa, U.K.
  Karin Dietl, TU Hamburg-Harburg, Germany
  Francois Dupont, Dassault Systèmes, Brest, France
  Jonas Eborn, Modelon, Lund, Sweden
  Hilding Elmqvist, Dassault Systèmes, Lund, Sweden
  Guilioano Fontanella, AIT, Vienna, Austria
  Rüdiger Franke, ABB Power Generation, Mannheim, Germany
  Peter Fritzson, PELAB, Linköping University, Sweden
  Sébastien Furic, LMS International, Roanne. France
  Leo Gall, BAUSCH-GALL Gmbh, Munich, Germany
  Peter Harman, deltatheta uk limited, U.K.
  Anton Haumer, AIT, Vienna, Austria
  Dan Henriksson, Dassault Systèmes, Lund, Sweden
  Christoph Höger, TU Berlin, Berlin, Germany
  Christian Kral, AIT, Vienna, Austria
  Gerd Kurzbach, ITI GmbH, Dresden, Germany
  Kilian Link, Siemens AB, Erlangen, Germany
  Krisitin Majetta, Fraunhofer, Dresden, Germany
  Martin Malmheden, Dassault Systèmes, Velicy, France
  Jesper Mattsson, Modelon, Lund, Sweden
  Sven Erik Mattsson, Dassault Systèmes, Lund, Sweden
  Eric Neuber, ITI GmbH, Dresden, Germany
  Ramine Nikoukhah, Altair, France
  Hans Olsson, Dassault Systèmes, Lund, Sweden
  Martin Otter, DLR-RM (German Aerospace Center), Oberpfaffenhofen,Germany
  Peter Pepper, Fraunhofer FIRST, Berlin, Germany
  Adrian Pop, Linköping University, Linköping, Sweden
  Olena Rogovchenko, PELAB, Linköping, Sweden
  Stefan-Alexander Schneider, BMW, Munich, Germany
  Michael Sielemann, German Aerospace Center, Oberpfaffenhofen, Germany
  Martin Sjölund, PELAB; Linköping, Sweden
  Kristian Stavåker, PELAB, Linköping, Sweden
  Bernhard Thiele, DLR-RM (German Aerospace Center), Oberpfaffenhofen,Germany
  Eric Thomas, Dassault Aviation, Paris, France
  Michael Tiller, Dassault Systèmes, Velicy, France
  Hubertus Tummescheit, Modelon AB, Lund, Sweden
  Andreas Uhlig, ITI, Dresden Germany
  Vladimir Vukovic, AIT, Vienna, Germany
  Stefan Vorkoetter, Maplesoft, Waterloo, Canada
  Daniel Weil, Dassault Systèmes, Grenoble, France
  Hans-Jürg Wiesmann, ABB Switzerland, Corporate Research, Baden,Switzerland
  Dietmar Winkler, Telemark University College, Porsgrunn, Norway
  Stefan Wischhusen, XRG Simulation, Hamburg, Germany
  Dirk Zimmer, DLR-RM (German Aerospace Center), Oberpfaffenhofen, Germany

Acknowledgments

For the design of the synchronous language elements () and synchronous state machines (), and for the understanding of fine details of synchronous languages, especially from Lucid Synchrone, very helpful discussions with

  Albert Benveniste, IRISA/INRIA, Rennes, France
  Marc Pouzet, Laboratoire d’Informatique de l’ENS, Paris
  Benoit Caillaud, IRISA, Rennes, France
  Timothy Bourke, INRIA, Rennes, France

are appreciated.

Modelica 3.2 Revision 2

Modelica 3.2 Revision 2 was released 2013. The Modelica 3.2 Revision 2 specification was edited by Hans Olsson and Martin Otter.

Main changes in Modelica 3.2 Revision 2

The Modelica language was slightly adapted (in a backwards compatible way – except as listed below) in order that the Modelica Standard Library (MSL) version 3.2.1 is fully compliant to Modelica Language 3.2 Revision 2. This required the following improvements compared to 3.2 Revision 1:

  • Possible to call a function through an instance name,
    (used in MSL 3.2 to compute the gravity acceleration in Modelica.Mechanics.MultiBody.World; this feature was also introduced in Modelica Language version 3.3 in May 2012).
  • New built-in operator Connections.rooted(A.R) to inquire whether an overdetermined type or record instance A.R in a call to Connections.branch(A.R,B.R) is closer to the root of the spanning tree than B.R, (used in MSL 3.2 to avoid algebraic loops in several components such as in Modelica.Mechanics.MultiBody.Joints.Revolute).

  • Several new annotations where vendor-specific variants were used in MSL 3.2; , , , , , and .

  • Specified that Evaluate can also occur in types, since this is used in MSL and important for performance; . Ticket #925.

  • Macros in graphical text items, . Ticket #659. (This feature was also introduced in Modelica Language version 3.3.)

  • Initial equations are discrete – used in MSL for initialization of pre-variables, . Ticket #853.

  • Updated noDerivative to be consistent with MSL, . This is an incompatibility – but the other variant was not used. Ticket #1035.

  • Clarified handling of component with missingInnerMessage; . Ticket #891.

  • Clarified definition of protected; . Ticket #975, #1123.

In addition several issues with the specification text were corrected:

  • Clarified an unclear sequence regarding functions as input arguments in . Ticket #1182.
  • Clarified allowed binding equations for redeclarations, . Ticket #1111.
  • Unspecified enumerations now have defined semantics, . Ticket #834.
  • Transitively non-Replaceable, . Ticket #854.
  • Modification text improved to not refer to inherited class, . Ticket #1042.
  • Precedence for modifiers on constraining-clause clarified, . Ticket #1128.
  • Clarified arrays for constraining type, . Ticket #1148.
  • Avoid all forms of connections depending on connections, . Ticket #828.
  • Clarified equation count for if-equations, . Ticket #888.
  • Complete definition of reinit, . Ticket #578. This forbids reinit in algorithms – but it was previously not well-defined.
  • Clarified initializaton of pre(vc) for a non-discrete (that is continuous-time) Real variable vc, . Ticket #1195.
  • Only one way of handling arrays of connectors is now defined, . Ticket #757.
  • Example now use correct sine-source, . Ticket #750.
  • Restricted parameters in connectors, . Ticket #768.
  • Clarified type restrictions for some operators, , . Ticket #622.
  • Clarified that if at least one array element is used on the left hand side of the assignment operator in an algorithm section, then the complete array is initialized in this section, . Ticket #1190.
  • Record constructor corrected to not refer to keywords that should not occur, . Ticket #907.
  • External storage of classes, , and . Tickets #1019, #892, #887.
  • Added example and explanation for inheritance restriction on operator record; . Ticket #1065.
  • Chapter “Mapping of Models to Execution Environments” was removed; this change was already decided for Modelica 3.3 and no tool had released an implementation of this feature. Ticket #1015.
  • Corrected license-example in . Ticket #1127.
  • Grammar was internally restructured for short-class-definition, , . Ticket #1140.

Contributors to the Modelica Language, Version 3.2 Revision 2

The following members of the Modelica Association contributed to the Modelica 3.2 Revision 2 specification (alphabetical list):

Peter Aronsson, MathCore AB, Linköping, Sweden

Peter Fritzson, PELAB, Linköping University, Linköping, Sweden

Hilding Elmqvist, Dassault Systèmes, Lund, Sweden

Christoph Höger, Technical University of Berlin, Berlin, Germany

Gerd Kurzbach, ITI GmbH, Dresden, Germany

Jesper Mattsson, Modelon AB, Lund, Sweden

Hans Olsson, Dassault Systèmes, Lund, Sweden

Martin Otter, DLR, Oberpfaffenhofen, Germany

Adrian Pop, Linköping University, Linköping, Sweden

Elena Shmoylova, Maplesoft, Waterloo, Canada

Martin Sjölund, PELAB, Linköping University, Linköping, Sweden

Stefan Vorkoetter, Maplesoft, Waterloo, Canada

Modelica 3.2 Revision 1

Modelica 3.2 Revision 1 was released on Feb. 29, 2012. The Modelica 3.2 Revision 1 specification was edited by Hans Olsson and Peter Fritzson.

Main changes in Modelica 3.2 Revision 1

The Modelica language was not changed with respect to the previous version 3.2. Only issues with the specification text have been fixed. In particular:

  • Corrected typos and improved formatting.

  • Comments:
    There are 2 and not 3 kinds of comments and comments are treated as white space character.
    Added definition of white space character.
  • Identifiers:
    The single quotes are part of the identifier, e.g., ’x’.
  • Built-in Variable time:
    Variable “time” is only available in models and blocks and not in the other classes.
  • Built-in Mathematical Functions
    Definition of “atan2” corrected.
  • Special Purpose Operators
    Included definition of inStream and actualStream operators from .
  • Event-Related Operators
    Clarified, that the first argument of “smooth” is a scalar.
    Improved the definition of “reinit”.
  • Discrete-Time Expressions
    Improved definition of ordered relations (>,<,>=,<=).
  • Conditional Component Declaration
    Clarified redeclaration of a component.
  • Specialized Classes
    Clarified that “stream” cannot be used in a record.
    Clarified restrictions on elements in a “connector”.
    Errors in example of operator record Complex corrected.
  • Enumeration Types
    Error in example corrected.
  • Simulataneous Inner/Outer Declarations
    Clarified inner/outer declarations.
  • Inheritance
    Clarified that the elements of a flattened base class are added at the place of the extends clause.
    Equations of the flattened base class that are syntactically equivalent to equations in the flattened enclosing class are deprecated.
  • Modifications
    Element modifiers are no longer part of language, reference grammar instead of duplicating it.
  • Redeclaration
    Improved redeclarations definition and moved an example from at the right place.
  • reinit
    Improved reinit definition.
  • Initialization
    Clarified that only when-clauses with restricted form of initial() as condition will be active during initialization.
  • Reduction Expressions
    Improved definition
  • Types as iteration ranges
    Newly introduced section to improve the definition of iteration ranges
  • Function
    Added missing restrictions that model, block, inner, outer cannot be used in a function.
  • Positional or Named Input Arguments of Functions
    Corrected formal syntax of a function call
  • Initialization and Declaration Assignments of Components in Functions
    Added the restriction of acylic bindings.
  • Records
    Mapping of arrays in records to C-structs is removed.
  • Bitmap
    Defined flipping more precisely.
  • Lexical conventions
    More precisely defined whitespace and comments.
  • Grammar
    Improved/corrected grammar definition

Contributors to the Modelica Language, Version 3.2 Revision 1

The following members of the Modelica Association contributed to the Modelica 3.2 Revision 1 specification (alphabetical list):

Peter Aronsson, MathCore AB, Linköping, Sweden

Peter Fritzson, PELAB, Linköping University, Linköping, Sweden

Christoph Höger, Technical University of Berlin, Berlin, Germany

Gerd Kurzbach, ITI GmbH, Dresden, Germany

Jesper Mattsson, Modelon AB, Lund, Sweden

Hans Olsson, Dassault Systèmes, Lund, Sweden

Adrian Pop, Linköping University, Linköping, Sweden

Martin Sjölund, PELAB, Linköping University, Linköping, Sweden

Stefan Vorkoetter, Maplesoft, Waterloo, Canada

Modelica 3.2

Modelica 3.2 was released on March 24, 2010. The Modelica 3.2 specification was edited by Hans Olsson, Martin Otter and others.

Main changes in Modelica 3.2

The following backward compatible extensions have been introduced with Modelica 3.2:

  • Homotopy function for making it easier to solve initialization problems (see ).

  • Functions as formal inputs to functions (see new ).

  • Overloaded operators have been refined (see ):

    • A new specialized class “operator record” is introduced – with specialized typing rules (the type is identified by the class name; all other Modelica classes have a structural type system where the type is only defined by the public elements). Overloaded operators can only be defined inside an “operator record”. This change fixes a flaw in Modelica 3.1, since the look-up of overloaded operators is performed by the record class name.
    • Inheritance of an “operator record” is allowed if defined via a short class definition. This removes a restriction of operator overloading in Modelica 3.1, e.g., to define derived classes with units for the record elements, like deriving ComplexVoltage from Complex.
    • New overloaded element ‘0’ in order that operator record classes can be used as flow variables in connectors.
  • Unicode support in description strings, strings in annotations and in comments in order to improve Modelica, e.g., for Arabian, Asian or Indian users (see grammar changes in ). Modelica files are UTF-8 encoded, and can start with the UTF-8 encoded byte order mark (0xef 0xbb 0xbf) to indicate that it may contain UTF-8 characters; this is treated as white-space in the grammar (see ).

  • Constants can once again be modified unless declared final – as this is already used in packages.
    (see ).
  • Global name lookup has been introduced (e.g. “.Modelica.Constants.pi”), see .

  • New C-functions ModelicaVFormatMessage and ModelicaVFormatError, to simplify message formatting in external functions (see )

  • Additional annotations allowing:

    • Inclusion of C-header and object library files in packages and referencing them with URIs.
      (new annotations IncludeDirectory, LibraryDirectory, and standardized platform names like win32; see ; resolves ticket #297).
    • Images in parameter dialogs (new annotation groupImage; see ).

    • Start and fixed attributes for variables in parameter dialogs
      (new annotation showStartAttribute; see ).
    • Access control for packages to protect intelectual property.
      (new annotations Protection, and License; see new ).

The following changes in Modelica 3.2 are not backwards compatible:

  • The new built-in operator name “homotopy”. In rare cases this might give name clashes in existing models.
  • Records with overloaded operations must be declared as “operator record” instead of as “record”. This is uncritical because tools that already support operator overloading will support the Modelica 3.1 form still for some time.

Contributors to the Modelica Language, Version 3.2

The initial version of “functions as formal inputs to functions” was proposed by Peter Fritzson.

The definition of header-files and object-libraries with the “IncludeDirectory” and “LibraryDirectory” annotations was mainly developed by Hans Olsson.

The Protection annotation used for access control is an improved version of existing annotations from Dymola. The License annotation was mainly developed by Dag Brück with improvements from Magnus Gäfvert.

The flaw in the operator overloading concept was detected by Sébastien Furic. He also proposed the basic fix, by using a nominal type system for records with overloaded operations.

The global name lookup was proposed by Stefan Vorkoetter.

The support for Unicode was initiated by Rui Gao and Hoyoun Kim.
The “homotopy” operator was proposed by Martin Otter, Michael Sielemann and Francesco Casella. Michael Sielemann demonstrated with benchmark problems that non-linear solvers are not able to solve reliably initialization problems and that the homotopy operator is therefore needed. He provided a prototype implementation of the homotopy-operator and demonstrated its use on a vehicle dynamics example. Utilizing the prototype implementation, Francesco Casella demonstrated with a model of a thermal power plant with 390 iteration variables of the initialization problem, that an appropriate usage of the homotopy operator allows to reliably initialize the system without providing guess values for the iteration variables. This was a strong indication that the homotopy operator will indeed improve initialization in Modelica significantly.

The following members of the Modelica Association participated at design meetings and contributed to the Modelica 3.2 specification:

Johan Åkesson, Lund University and Modelon AB, Lund, Sweden

Peter Aronsson, MathCore AB, Linköping, Sweden

Bernhard Bachmann, University of Applied Sciences, Bielefeld, Germany

Jonathan Beck, Dassault Systèmes, Paris, France

Torsten Blochwitz, ITI GmbH, Dresden, Germany

David Broman, PELAB, Linköping University, Sweden

Dag Brück, Dassault Systèmes, Lund, Sweden

Francesco Casella, Politecnico di Milano, Milano, Italy

Mike Dempsey, Claytex Services Limited, Leamington Spa, U.K.

Karin Dietl, TU Hamburg-Harburg, Germany

Filippo Donida, Politecnico di Milano, Milano, Italy

Hilding Elmqvist, Dassault Systèmes, Lund, Sweden

Peter Fritzson, PELAB, Linköping University, Sweden

Sébastien Furic, LMS International, Roanne. France

Manuel Gräber, TU Braunschweig, Germany

Peter Harman, deltatheta uk limited, U.K.

Anton Haumer, AIT, Vienna, Austria

Carsten Heinrich, Institut für Luft- und Kältetechnik, Dresden, Germany

Dan Henriksson, Dassault Systèmes, Lund, Sweden

Fredrik Karlsson, PELAB, Linköping University, Sweden

Christian Kral, AIT, Vienna, Austria

Imke Krüger, TU Hamburg-Harburg, Hamburg, Germany

Gerd Kurzbach, ITI GmbH, Dresden, Germany

Kilian Link, Siemens AB, Erlangen, Germany

Sven Erik Mattsson, Dassault Systèmes, Lund, Sweden

Eric Neuber, ITI GmbH, Dresden, Germany

Hans Olsson, Dassault Systèmes, Lund, Sweden

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

Adrian Pop, Linköping University, Linköping, Sweden

Katrin Prölß, Modelon AB, Lund, Sweden

Michael Sielemann, German Aerospace Center, Oberpfaffenhofen, Germany

Bernhard Thiele, German Aerospace Center, Oberpfaffenhofen, Germany

Thorben Vahlenkamp, XRG Simulation, Hamburg, Germany

Eric Thomas, Dassault Aviation, Paris, France

Michael Tiller, Emmeskay, Plymouth, MI, U.S.A

Hubertus Tummescheit, Modelon AB, Lund, Sweden

Stefan Vorkoetter, Maplesoft, Waterloo, Canada

Hans-Jürg Wiesmann, ABB Switzerland, Corporate Research, Baden, Switzerland

Dietmar Winkler, Telemark University College, Porsgrunn, Norway

Acknowledgments

Partial financial support for the development of Modelica 3.2 by the following funding agencies has been received:

  • The German Ministry BMBF has partially funded DLR, Fraunhofer and Siemens (BMBF Förderkennzeichen: 01IS07022F) within the ITEA2 project EUROSYSLIB (http://www.eurosyslib.com).
  • The German Ministry BMBF has partially funded ITI GmbH (BMBF Förderkennzeichen: 01IS08002K), and the Swedish funding agency VINNOVA has partially funded Dynasim (2008-02291), within the ITEA2 project MODELISAR (http://www.itea2.org/public/project_leaflets/MODELISAR_profile_oct-08.pdf).
  • The Swedish funding agency VINNOVA has partially funded Linköping University (PELAB) within the ITEA2 project OPENPROD (http://www.openprod.org).
  • The Swedish Research Council has partially funded Linköping University (PELAB) within the project “High-Level Debugging of Equation-Based System Modeling & Simulation Languages”.
  • The German Ministry BMBF has partially funded FH Bielefeld (BMBF Förderkennzeichen: 01IS09029C) within the ITEA2 project OPENPROD (http://www.openprod.org).

Modelica 3.1

Modelica 3.1 was released on May 27, 2009. The Modelica 3.1 specification was edited by Francesco Casella, Rüdiger Franke, Hans Olsson, Martin Otter, and Michael Sielemann.

Main changes in Modelica 3.1

The following backward compatible extensions have been introduced with Modelica 3.1:

  • Overloading of operators like ‘+’ or ‘*’ to allow convenient usage of user-defined data structures like complex numbers, polynomials, transfer functions. Usually, only scalar operations for one data type need to be overloaded. All other needed operations, like operations between different data types or on arrays of the new data type, can be automatically constructed by the tool.
  • Stream connector concept to ensure efficient and reliable simulation of fluid systems.
  • Partitioning models in parts and mapping these parts to execution environments. This allows convenient definition of, e.g., Model-in-the-Loop, Software-in-the-Loop, Hardware-in-the-Loop Simulation, from the same “logical” system, by inheriting from the logical system and setting configuration options.
  • Arrays in buses (expandable connector) are much better supported. Furthermore, variables declared in an expandable connector need not to be referenced in the model and are then not available in the simulation model.
  • The order of classes stored in separate files can be given.
  • A restriction of balanced models was removed, so that modifiers to connector and record instances can be used and are considered for the equation count. This allows, e.g., a much easier implementation of the support connector of the Modelica.Mechanics.Rotational/Translational libraries.
  • A tool that uses missingInnerMessage to give information may also automatically use the corresponding inner-component.
  • URIs can be used for links in html-documentation and for the Bitmap annotation (such as: “modelica://Modelica.Mechanics/C.jpg” for image “C.jpg” that is stored in the directory of package Modelica.Mechanics). This allows to store resources in a package on persistent storage and to reference resources via package and resource names.
  • Annotation “connectorSizing” to automatically enlarge a vector of connectors and connect to a free element of this vector when a connection line is drawn. This allows to improve the user convenience, especially for state machine and fluid models.
  • Annotation “inverse” to define inverses of functions. This allows a tool to solve non-linear algebraic loops by using the user-provided inverse function.
  • Annotations “versionDate”, “versionBuild”, “dateModified”, “revisionId” to improve version handling. For example, this allows handling of maintenance (bug-fix) releases and gives a library developer the possibility to state that a particular “build” is needed for a used library.

The following defects have been fixed in the Modelica specification:

  • Modifier with subscripts were previously allowed, but not clearly defined, not implemented in many tools, and not used in libraries. They were thus removed.

  • Modelica keywords () updated.

  • Clarification: Exponentiation and array range operator are non-associative
    (x^y^z or a:b:c:d:e:f are not allowed; parentheses are required)
  • Clarification: Restrictions on combining base classes ().

  • Clarification: Execution of an algorithm (new ).

  • The default type for arrays sent to external functions has been clarified.

  • The “iconTransformation” defaults to the (diagram) “transformation”, as was originally the intention.

  • The Connection set section was rewritten:

    • Connection set is clearly defined including examples.
    • The handling of connections involving outer components was rewritten to ensure that models that seem to have the same connection structure generate the same equations from the connect equations. Previously a connection between an outer component and an outside connector would move the connection upwards. The implication of this movement was unclear: if it turned the connector into an inside connector (as was likely the intention) it would prohibit default-connection of this normal connector leading to counter-intuitive results; and otherwise it would have no impact.
  • Example of using fields was corrected.

  • Example with MatrixGain was corrected.

  • Ambiguous annotations after external-declarations were corrected (as already used).

  • The reinit-operator can be used multiple times in one algorithm, and the semantics clarified.

  • Made clearer that acyclic parameters also hold for one parameter equation.

  • Changed in the text “attributes” to “prefix”, if a prefix is meant.

The following changes in Modelica 3.1 are not backwards compatible:

  • A class-level annotation can only be placed before the end-statement. This is uncritical because tools can easily fix incorrect models (ignore this new rule when reading a model and use this rule when storing the model).
  • New Modelica keywords “stream” and “operator”, a new built-in package “Subtask” and new-built-in operators “inStream” and “actualStream” have been introduced. In rare cases this might give name clashes in existing models.
  • Modifiers on declared variables in expandable connectors are no longer allowed. This should be uncritical, because expandable connectors are usually used for signal buses where the signal is communicated to the bus from a block with a connect equation.

Contributors to the Modelica Language, Version 3.1

The concept of operator overloading was developed by Hans Olsson, based on work of Dag Brück, Peter Fritzson, and Martin Otter.

The streams concept was developed by Rüdiger Franke based on work from Francesco Casella and with contributions especially from Hilding Elmqvist, Sven Erik Mattson, Hans Olsson, Martin Otter and Michael Sielemann.

The concept to map models to execution environments was developed by Hilding Elmqvist, Dan Henriksson, Martin Otter, Bernhard Thiele and Sven Erik Mattson.

The following members of the Modelica Association participated at design meetings and contributed to the Modelica 3.1 specification:

Johan Akesson, Lund University and Modelon AB, Lund, Sweden

Johan Andreasson, Modelon AB, Lund, Sweden

Peter Aronsson, MathCore AB, Linköping, Sweden

Bernhard Bachmann , University of Applied Sciences, Bielefeld, Germany

Torsten Blochwitz, ITI GmbH, Dresden, Germany

David Broman, Linköping University, Linköping, Sweden

Dag Brück, Dynasim, Lund, Sweden

Francesco Casella, Politecnico di Milano, Milano, Italy

Christoph Clauß, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Karin Dietl, TU Hamburg-Harburg, Germany

Filippo Donida, Politecnico di Milano, Milano, Italy

Thomas Doumenc, Dassault Systèmes, Paris, France

Jonas Eborn, Modelon AB, Lund, Sweden

Hilding Elmqvist, Dynasim, Lund, Sweden

Rüdiger Franke, ABB Power Generation, Mannheim, Germany

Peter Fritzson, Linköping University, Sweden

Magnus Gäfvert, Modelon AB, Lund, Sweden

Manuel Gräber, TU Braunschweig, Germany

Anton Haumer, Technical Consulting & Electrical Engineering, St.Andrae-Woerdern, Austria

Carsten Heinrich, Institut für Luft- und Kältetechnik, Dresden, Germany

Dan Henriksson, Dynasim, Lund, Sweden

Roland Kossel, TLK Thermo GmbH, Braunschweig, Germany

Christian Kral, arsenal research, Vienna, Austria

Gerd Kurzbach, ITI GmbH, Dresden, Germany

Kilian Link, Siemens AB, Erlangen, Germany

Sven Erik Mattsson, Dynasim, Lund, Sweden

Ramine Nikoukhah, INRIA, Paris, France

Hans Olsson, Dynasim, Lund, Sweden

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

Adrian Pop, Linköping University, Linköping, Sweden

Katrin Prölß, Technical University Hamburg-Harburg, Germany

Christoph Richter, TU Braunschweig, Germany

Michael Sielemann, German Aerospace Center, Oberpfaffenhofen, Germany

Bernhard Thiele, German Aerospace Center, Oberpfaffenhofen, Germany

Michael Tiller, Ford Motor Company/Emmeskay, Dearborn/Plymouth, MI, U.S.A

Hubertus Tummescheit, Modelon AB, Lund, Sweden

Stefan Vorkoetter, Maplesoft, Waterloo, Canada

Hans-Jürg Wiesmann, ABB Switzerland, Corporate Research, Baden, Switzerland

Dietmar Winkler, TU Berlin, Germany

Acknowledgments

Partial financial support for the development of Modelica 3.1 by the following funding agencies has been received:

  • The German Ministry BMBF has partially funded ABB, DLR, Fraunhofer and Siemens (BMBF Förderkennzeichen: 01IS07022F) within the ITEA2 project EUROSYSLIB (http://www.itea2.org/public/project_leaflets/EUROSYSLIB_profile_oct-07.pdf).
  • The German Ministry BMBF has partially funded ITI GmbH (BMBF Förderkennzeichen: 01IS08002K), and the Swedish funding agency VINNOVA has partially funded Dynasim (2008-02291), within the ITEA2 project MODELISAR (http://www.itea2.org/public/project_leaflets/MODELISAR_profile_oct-08.pdf).
  • The Swedish funding agency VINNOVA has partially funded Linköping University (PELAB) within the project “Safe and Secure Modeling and Simulation”.
  • The Swedish funding agency VR has partially funded Linköping University (PELAB) within the project “High-Level Debugging of Equation-Based System Modeling & Simulation Languages”.

Modelica 3.0

Modelica 3.0 was released Sept. 5, 2007. The Modelica 3.0 specification was edited by Peter Fritzson, Hans Olsson, and Martin Otter.

Contributors to the Modelica Language, Version 3.0

The Modelica 3.0 specification was newly structured and written by Peter Fritzson using text from the previous specification and also adding new explanatory text. This draft specification was afterwards improved by members of the Modelica Association.

The concept of “balanced models” (which is the major change of the language) was developed by Hans Olsson with contributions from Martin Otter, Hilding Elmqvist, and Sven Erik Mattsson. The original inspiration was from Mike Tiller.

This goes together with making the type interface and sub-typing cleaner and stricter (the new ). This concept fixes flaws of the language that have been pointed out by Sébastien Furic.

The graphical annotations have been redesigned and improved by Daniel Hedberg, Erik Areskog, Dag Brück, and Hilding Elmqvist with contributions from Peter Aronsson and Gerd Kurzbach.

The following members of the Modelica Association participated at design meetings and contributed to the Modelica 3.0 specification:

Peter Aronsson, MathCore AB, Linköping, Sweden

Bernhard Bachmann , University of Applied Sciences, Bielefeld, Germany

John Batteh, Ford Motor Company, Dearborn, MI, U.S.A.

David Broman, Linköping University, Linköping, Sweden

Peter Bunus, Linköping University, Linköping, Sweden

Dag Brück, Dynasim, Lund, Sweden

Francesco Casella, Politecnico di Milano, Milano, Italy

Christoph Clauß, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Thomas Doumenc, Dassault Systèmes, Paris, France

Jonas Eborn, Modelon AB, Lund, Sweden

Hilding Elmqvist, Dynasim, Lund, Sweden

Rüdiger Franke, ABB Corporate Research, Ladenburg, Germany

Peter Fritzson, Linköping University, Sweden

Sebastien Furic, Imagine, Roanne, France

Anton Haumer, Technical Consulting & Electrical Engineering, St.Andrae-Woerdern, Austria

Daniel Hedberg, MathCore AB, Linköping, Sweden

Carsten Heinrich, Institut für Luft- und Kältetechnik gGmbH, Dresden, Germany

Olof Johansson, Linköping University, Linköping, Sweden

Christian Kral, arsenal research, Vienna, Austria

Roland Kossel, TLK Thermo GmbH, Braunschweig, Germany

Gerd Kurzbach, ITI GmbH, Dresden, Germany

Christian Kral, arsenal research, Vienna, Austria

Kilian Link, Siemens AB, Erlangen, Germany

José Diaz Lopez, Dynasim AB, Lund, Sweden

Karin Lund, Fachhochschule Ulm, Germany

Håkan Lundvall, Linköping University, Linköping, Sweden

Ludwig Marvan, VA TECH ELIN EBG Elektronik GmbH & Co, Vienna, Austria

Sven Erik Mattsson, Dynasim, Lund, Sweden

Jakob Mauss, Qtronic GmbH, Berlin, Germany

Chuck Newman, Ford Motor Company, Dearborn, MI, U.S.A.

Kaj Nyström, Linköping University, Linköping, Sweden

Hans Olsson, Dynasim, Lund, Sweden

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

Markus Plainer, Arsenal Research, Vienna, Austria

Adrian Pop, Linköping University, Linköping, Sweden

Katrin Prölß, Technical University Hamburg-Harburg, Germany

Christoph Richter, Technical University of Braunschweig, Braunschweig, Germany

Anders Sandholm, Linköping University, Linköping, Sweden

Christian Schweiger, German Aerospace Center, Oberpfaffenhofen, Germany

Michael Tiller, Ford Motor Company/Emmeskay, Dearborn, MI, U.S.A

Hubertus Tummescheit, Modelon AB, Lund, Sweden

Hans-Jürg Wiesmann, ABB Switzerland Ltd.,Corporate Research, Baden, Switzerland

Main Changes in Modelica 3.0

Modelica 3.0 is a “clean-up” version of the Modelica language. For example, the specification is newly written to define the language in a better way, errors in the language are fixed, unclear or undefined items are more precisely described, and mild restrictions are introduced into the language in order that a Modelica translator can much earlier and more precisely detect modeling errors. Automated conversion of models to Modelica 3.0 is possible. Furthermore, a tool can potentially handle much larger models.

This Modelica version is for the first time (slightly) not backward compatible to previous versions (all previous versions have been backward compatible with exception of tiny issues as newly introduced keywords). As a result, e.g., “unsafe” models of previous Modelica versions are no longer valid. It is expected that Modelica tool vendors provide (semi-) automatic mechanisms for conversion of models and libraries.

The following main changes in Modelica 3.0 are not backwards compatible:

  • Restrictions to connectors (see ): For each non-partial connector class the number of flow variables shall be equal to the number of variables that are neither parameter, constant, input, output, nor flow. For example, the following connector is illegal in Modelica 3:

    connector notValid // illegal connector
      Real r1;
      Real r2;
      flow Real r3;
    end notValid;
    
  • In a non-partial model or block, all non-connector inputs of model or block components must have binding equations.

  • A component declared with the inner or outer prefix shall not be of a class having top-level public connectors containing inputs.

  • Modifiers for components shall only contain redeclarations of replaceable elements and binding equations for parameters, constants, inputs and variables having a default binding equation.

  • All non-partial model and block classes must be locally balanced (see ). This means that the local number of unknowns equals the local equation size. Together with other restrictions, this leads to the strong property that a simulation model is always globally balanced (i.e., the number of unknowns is equal to the number of equations).

  • Prefixes input, output, inner, outer, flow are not allowed in a record

  • The built-in operators “abs(…)” and “sign(…)” do no longer generate events but are implicitly defined with a noEvent(…) operator.

  • The constraining clause of a replaceable class or component is changed from keyword extends to the new keyword constrainedby (since the extends keyword could lead to the wrong impression that the redeclared model must inherit from the constraining class, but this is not the case).

  • The isPresent(…) construct, which was not implemented in tools, was removed.

The following changes in the Modelica 3.0 graphical annotations are also not backwards compatible:

  • Changed the definition of icon placement (record Transformation), so that the actual coordinates of the icon of a model instance are defined in the class where the instance is defined and no longer in the class where the icon is defined (this was a flaw in the Modelica 2.0 graphical annotations).
  • Improved the definition of the rotation of a graphical primitive.
  • Change fontSize unit from DrawingUnit to pt (since this is the usual unit for fonts).

The following main changes in Modelica 3.0 are backwards compatible:

  • New element-wise operators: .+, .-, .*, ./, .^.

  • A third argument AssertionLevel to built-in function assert(…) in order that warnings can optionally be defined.

  • New annotations “Vendor-Specific Annotations”:
    In this section it is precisely defined how vendor-specific annotations should be marked. Any tool shall save files with all standard annotations (defined in ) and all vendor-specific annotations intact. The advantage is that a typo in non-vendor annotations can now be detected and marked as an error, whereas in previous versions this had to be ignored.
  • New annotation in “Annotations for Documentation”:
    preferredView = info, diagram or text
  • New annotations “Annotations for Code Generation”:
    Evaluate, HideResult, Inline, LateInline, smoothOrder
  • New annotation “Annotations for Simulation Experiments”:
    StartTime, StopTime, Tolerance to define important parameters of an experiment setup.
  • New annotations for graphical annotations in :
    New attribute Smooth = enumeration(None, Bezier) for graphical objects and connection lines (Bezier defines a Bezier spline).
    New attribute visible in record Placement allows to make a graphical annotation invisible (e.g. after inheritance).
    New attributes startAngle, endAngle in record ellipse to define part of an ellipse.
    New layer specific annotations IconMap and DiagramMap for extends.
    New attribute horizontalAlignment to the Text record to define the horizontal alignment of text.
  • New annotations for schematic animation and interactive user input in :
    DynamicSelect(..) to modify annotation literals by the actual values of variables.
    OnMouseDownSetBoolean, OnMouseUpSetBoolean, OnMouseMoveXSetReal, OnMouseMoveYSetReal, OnMouseDownEditReal, OnMouseDownEditString to interactively set the variable of a class during simulation.

The following errors have been fixed in the Modelica specification:

  • Syntax rule for a function call (e.g., according to the grammar in Modelica 2.2 a function call of the form Modelica.Math.Matrices.eig(…) was invalid because the function name could not have “.”. However, all Modelica tools supported the desired “full Modelica name” also for function calls).

Modelica 2.2

Modelica 2.2 was released February 2, 2005. The Modelica 2.2 specification was edited by Hans Olsson, Michael Tiller and Martin Otter.

Contributors to the Modelica Language, Version 2.2

Bernhard Bachmann , University of Applied Sciences, Bielefeld, Germany

John Batteh, Ford Motor Company, Dearborn, MI, U.S.A.

Dag Brück, Dynasim, Lund, Sweden

Francesco Casella, Politecnico di Milano, Milano, Italy

Christoph Clauß, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Jonas Eborn, Modelon AB, Lund, Sweden

Hilding Elmqvist, Dynasim, Lund, Sweden

Rüdiger Franke, ABB Corporate Research, Ladenburg, Germany

Peter Fritzson, Linköping University, Sweden

Anton Haumer, Technical Consulting & Electrical Engineering, St.Andrae-Woerdern, Austria

Christian Kral, arsenal research, Vienna, Austria

Sven Erik Mattsson, Dynasim, Lund, Sweden

Chuck Newman, Ford Motor Company, Dearborn, MI, U.S.A.

Hans Olsson, Dynasim, Lund, Sweden

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

Markus Plainer, Arsenal Research, Vienna, Austria

Adrian Pop, Linköping University, Sweden

Katrin Prölß, Technical University Hamburg-Harburg, Germany

André Schneider, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Christian Schweiger, German Aerospace Center, Oberpfaffenhofen, Germany

Michael Tiller, Ford Motor Company, Dearborn, MI, U.S.A.

Hubertus Tummescheit, Modelon AB, Lund, Sweden

Hans-Jürg Wiesmann, ABB Switzerland Ltd.,Corporate Research, Baden, Switzerland

Main Changes in Modelica 2.2

The main changes in Modelica 2.2 are:

  • Conditional component declarations to ignore component declarations depending on a parameter expression. Connection equations that reference a component that is no longer present, are ignored.
  • In redeclarations some parts of the original declaration are automatically inherited by the new declaration. This is intended to make it easier to write declarations by not having to repeat common parts of the declarations, and does in particular apply to attributes that must be identical.
  • Recursive inner/outer definitions to define hierarchically structured inner/outer declarations that can communicate with each other: An element declared with both the prefixes inner and outer conceptually introduces two declarations with the same name, one that follows the rules for inner and another that follows the rules for outer.
  • A non-input array component declared in a function with a dimension size specified by colon(:) and no declaration assignment, can change size in the function in a simple and convenient way.
  • A new type of connector, called “expandable connector” was introduced. This connector has less strict requirements about name matching of connected connectors and can be used conveniently in situations that required replaceable connectors previously. One main application area is to construct signal buses of complex systems.
  • The derivative operator der(expr) may have an expression as argument and not only a variable name as previously, e.g., der(m*h) is interpreted as der(m)*h + m*der(h).
  • A function can be defined as partial derivative of another function, e.g.:
  • ”function Gibbs_T = der(Gibbs,T)” is a function that computes the partial derivative of function Gibbs with respect to its input argument T.
  • External functions may have the new attribute “builtin”, additionally to “C” or ”FORTRAN 77”. The “builtin” specification is only used for functions that are defined to be built-in in the Modelica language. The external-function call mechanism for “builtin” functions is implementation-defined.

The language changes are backward compatible.

Modelica 2.1

Modelica 2.1 was released January 30, 2004. The Modelica 2.1 specification was edited by Hans Olsson and Martin Otter.

Contributors to the Modelica Language, Version 2.1

Mikael Adlers, MathCore, Linköping, Sweden

Peter Aronsson, Linköping University, Sweden

Bernhard Bachmann , University of Applied Sciences, Bielefeld, Germany

Peter Bunus, Linköping University, Sweden

Jonas Eborn, United Technologies Research Center, Hartford, U.S.A.

Hilding Elmqvist, Dynasim, Lund, Sweden

Rüdiger Franke, ABB Corporate Research, Ladenburg, Germany

Peter Fritzson, Linköping University, Sweden

Anton Haumer, Technical Consulting & Electrical Engineering, St.Andrae-Woerdern, Austria

Olof Johansson, Linköping University, Sweden

Karin Lunde, R.O.S.E. Informatik GmbH, Heidenheim, Germany

Sven Erik Mattsson, Dynasim, Lund, Sweden

Hans Olsson, Dynasim, Lund, Sweden

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

Levon Saldamli, Linköping University, Sweden

Christian Schweiger, German Aerospace Center, Oberpfaffenhofen, Germany

Michael Tiller, Ford Motor Company, Dearborn, MI, U.S.A.

Hubertus Tummescheit, United Technologies Research Center, Hartford, U.S.A.

Hans-Jürg Wiesmann, ABB Switzerland Ltd.,Corporate Research, Baden, Switzerland

Main Changes in Modelica 2.1

The main changes in Modelica 2.1 are:

  • Arrays and array indices of Enumerations (needed, e.g., in the Electrical.Digital library currently under development).
  • Connections into hierarchical connectors (needed, e.g., for convenient implementation of buses).
  • Optional output arguments of Modelica functions. The presence of actual input and/or output arguments can be inquired with the new built-in function isPresent(..). The previous built-in function and attribute enable was removed.
  • Making the default constraining type more useful by inheriting the base constraining type automatically to modifications.
  • Enhanced redeclaration as needed, e.g., in the Modelica.Media library under development (e.g. “redeclare model name” or “model extends name (<modifications>)”).
  • Handling of overdetermined connectors (needed, e.g., for multi-body systems and electrical power systems) including the new built-in package Connections with operators Connections.branch, Connections.root, Connections.potentialRoot, Connections.isRoot.
  • Statement break in the while loop of an algorithm section.
  • Statement return in a Modelica function.
  • Built-in function String(..) to provide a string representation of Boolean, Integer, Real and Enumeration types.
  • Built-in function Integer(..) to provide the Integer representation of an Enumeration type.
  • Built-in function semiLinear(..) to define a characteristics with two slopes and a set of rules for symbolic transformations, especially when the function becomes underdetermined (this function is used in the Modelica Fluid library under development to define reversing flow in a mathematically clean way).
  • More general identifiers by having any character in single quotes, e.g. ’+’ or ’123.456#1’ are valid identifiers. ’x’ and x are different identifiers. This is useful for a direct mapping of product identifiers to model names and for having the usual symbols for digital electrical signals as enumerations (such as ’+’, ’-’, ’0’, ’1’).
  • New annotations:
    • For version handling of libraries and models (version, uses, conversion),
    • for revision logging (revisions),
    • for using a Modelica name as link in a HTML documentation text,
    • for convenient “inner” declaration in a GUI (defaultComponentName, defaultComponentPrefixes),
    • for parameter menu structuring (Dialog, enable, tab, group), and
    • for library specific error messages (missingInnerMessage, unassignedMessage).

Fixing some minor errors in the grammar and semantic specification.

The language changes are backward compatible, except for the introduction of the new keywords break and return, the new built-in package Connections and the removing of built-in function and attribute enable.

Modelica 2.0

Modelica 2.0 was released January, 30 2002, and the draft was released on December 18 in 2001. The Modelica 2.0 specification was edited by Hans Olsson. Modelica is a registered trademark owned by the Modelica Association since November 2001.

Contributors to the Modelica Language, Version 2.0

Peter Aronsson, Linköping University, Sweden

Bernhard Bachmann , University of Applied Sciences, Bielefeld

Peter Beater, University of Paderborn, Germany

Dag Brück, Dynasim, Lund, Sweden

Peter Bunus, Linköping University, Sweden

Hilding Elmqvist, Dynasim, Lund, Sweden

Vadim Engelson, Linköping University, Sweden

Peter Fritzson, Linköping University, Sweden

Rüdiger Franke, ABB Corporate Research, Ladenburg

Pavel Grozman, Equa, Stockholm, Sweden

Johan Gunnarsson, MathCore, Linköping

Mats Jirstrand, MathCore, Linköping

Sven Erik Mattsson, Dynasim, Lund, Sweden

Hans Olsson, Dynasim, Lund, Sweden

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

Levon Saldamli, Linköping University, Sweden

Michael Tiller, Ford Motor Company, Dearborn, MI, U.S.A.

Hubertus Tummescheit, Lund Institute of Technology, Sweden

Hans-Jürg Wiesmann, ABB Switzerland Ltd.,Corporate Research, Baden, Switzerland

Main Changes in Modelica 2.0

A detailed description of the enhancements introduced by Modelica 2.0 is given in the papers

The main changes in Modelica 2.0 are:

  • Full specification of initialization in order to compute consistent initial values of all variables appearing in a model before performing an operation, such as simulation or linearization.
  • Specified the graphical appearance of Modelica object diagrams, thereby ensuring portability of model topology information and improving the previous informal graphical description, e.g., with separate icon and diagram positions.
  • Enumeration types to allow the definition of options and properties in an understandable, safe and efficient way.
  • Support for (optional) explicit preference in state-selection in order that a modeler can incorporate application specific knowledge to guide the solution process, e.g., for real-time simulation.
  • Iterators in array constructors and reduction operators, to support more powerful expressions, especially in declarations, in order to avoid inconvenient and less efficient local function definitions.
  • Support for generic formulation of blocks applicable to both scalar and vector connectors, connection of (automatically) vectorized blocks, and simpler input/output connectors. This allows significant simplifications of the input/output block library of Modelica, e.g., since only scalar versions of all blocks have to be provided. Furthermore, new library components can be incorporated more easily.
  • Record constructor to allow, e.g., the construction of data sheet libraries.
  • Functions with mixed positional and named arguments. Optional results and default arguments make the same function fit for beginners and expert users.
  • Additional utilities for external C-functions that are interfaced to Modelica models, especially supporting external functions returning strings and external functions with internal memory (e.g., to interface user-defined tables, property databases, sparse matrix handling, hardware interfaces).
  • Added an index, and specification of some basic constructs that had previously not formally be defined, such as while-clauses, if-clauses.

The language changes are backward compatible, except for the introduction of the new keyword enumeration and the removal of the operator analysisType(). The library change of the block library which will become available soon requires changes in user-models.

Modelica 1.4

Modelica 1.4 was released December 15, 2000. The Modelica Association was formed in Feb. 5, 2000 and is now responsible for the design of the Modelica language. The Modelica 1.4 specification was edited by Hans Olsson and Dag Brück.

Contributors to the Modelica Language, Version 1.4

Bernhard Bachmann, Fachhochschule Bielefeld, Germany

Peter Bunus, MathCore, Linköping, Sweden

Dag Brück, Dynasim, Lund, Sweden

Hilding Elmqvist, Dynasim, Lund, Sweden

Vadim Engelson, Linköping University, Sweden

Jorge Ferreira, University of Aveiro, Portugal

Peter Fritzson, Linköping University, Linköping, Sweden

Pavel Grozman, Equa, Stockholm, Sweden

Johan Gunnarsson, MathCore, Linköping, Sweden

Mats Jirstrand, MathCore, Linköping, Sweden

Clemens Klein-Robbenhaar, Germany

Pontus Lidman, MathCore, Linköping, Sweden

Sven Erik Mattsson, Dynasim, Lund, Sweden

Hans Olsson, Dynasim, Lund, Sweden

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

Tommy Persson, Linköping University, Sweden

Levon Saldamli, Linköping University, Sweden

André Schneider, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Michael Tiller, Ford Motor Company, Dearborn, MI, U.S.A.

Hubertus Tummescheit, Lund Institute of Technology, Sweden

Hans-Jürg Wiesmann, ABB Corporate Research Ltd., Baden, Switzerland

Contributors to the Modelica Standard Library

Peter Beater, University of Paderborn, Germany

Christoph Clauß, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany

André Schneider, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Hubertus Tummescheit, Lund Institute of Technology, Sweden

Main Changes in Modelica 1.4

  • Removed declare-before-use rule. This simplifies graphical user environments, because there exists no order of declarations when components are graphically composed together.
  • Refined package concept by introducing encapsulated classes and import mechanism. Encapsulated classes can be seen as “self-contained units”: When copying or moving an encapsulated class, at most the import statements in this class have to be changed.
  • Refined when-clause: The nondiscrete keyword is removed, equations in when-clauses must have a unique variable name on left hand side variable and the exact mapping of when-clauses to equations is defined. As a result, when-clauses are now precisely defined without referring to a sorting algorithm and it is possible to handle algebraic loops between when-clauses with different conditions and between when-clauses and the continuous-time part of a model. The discrete keyword is now optional, simplifying the library development because only one type of connector is needed and not several types which do contain or do not contain the discrete prefix on variables. Additionally, when-clauses in algorithm sections may have elsewhen-clauses which simplifies the definition of priorities between when-clauses.
  • For replaceable declarations: allowed constraining clauses, and annotations listing suitable redeclarations. This allows a graphical user environment to automatically build menus with meaningful choices.
  • Functions can specify their derivative. This allows, e.g., the application of the Pantelides algorithm to reduce the index of a DAE also for external functions.
  • New built-in operator “rem” (remainder) and the built-in operators div, mod, ceil, floor, integer, previously only allowed to be used in when-clauses can now be used everywhere, because state events are automatically generated when the result value of one of these operator changes discontinuously.
  • Quantity attribute also for base types Boolean, Integer, String (and not only for Real), in order to allow abstracted variables to refer to physical quantities (e.g. Boolean i(quantity=”Current”) is true if current is flowing and is false if no current is flowing).
  • final keyword also allowed in declaration, to prevent modification. Example:
model A
  Real x[:];
  final Integer n=size(x,1);
end A;
  • Several minor enhancements, such as usage of dot-notation in modifications
    (e.g.: “A x(B.C=1,B.D=2)” is the same as “A x(B(C=1,D=2));”).
  • Internally restructured specification.

Modelica 1.4 is backwards compatible with Modelica 1.3, with the exception of (1) some exotic cases where different results are achieved with the removed “declare-before-use-rule” and the previous declaration order, (2) when-clauses in equations sections, which use the general form “expr1 = expr2” (now only “v=expr” is allowed + some special cases for functions), (3) some exotic cases where a when-clause may be no longer evaluated at the initial time, because the initialization of the when-condition is now defined in a more meaningful way (before Modelica 1.4, every condition in a when-clause has a “previous” value of false), and (4) models containing the nondiscrete keyword which was removed.

Modelica 1.3 and Older Versions.

Modelica 1.3 was released December 15, 1999.

Contributors up to Modelica 1.3

The following list contributors and their affiliations at the time when Modelica 1.3 was released.

Hilding Elmqvist, Dynasim AB, Lund, Sweden

Bernhard Bachmann, ABB Corporate Research Center Heidelberg

Francois Boudaud, Gaz de France, Paris, France

Jan Broenink, University of Twente, Enschede, Netherlands

Dag Brück, Dynasim AB, Lund, Sweden

Thilo Ernst, GMD FIRST, Berlin, Germany

Ruediger Franke, ABB Network Partner Ltd. Baden, Switzerland

Peter Fritzson, Linköping University, Sweden

Alexandre Jeandel, Gaz de France, Paris, France

Pavel Grozman, Bris Data AB, Stockholm, Sweden

Kaj Juslin, VTT, Espoo, Finland

David Kågedal, Linköping University, Sweden

Mattias Klose, Technical University of Berlin, Germany

Nathalie Loubere, Gaz de France, Paris, France

Sven-Erik Mattsson, Dynasim AB, Lund, Sweden

Peter J. Mosterman, DLR Oberpfaffenhofen, Germany

Henrik Nilsson, Linköping University, Sweden

Hans Olsson, , Dynasim AB, Lund, Sweden

Martin Otter, DLR Oberpfaffenhofen, Germany

Per Sahlin, Bris Data AB, Stockholm, Sweden

Andrée Schneider, Fraunhofer Institute for Integrated Circuits, Dresden, Germany

Michael Tiller, Ford Motor Company, Dearborn, MI, U.S.A.

Hubertus Tummescheit, Lund Institute of Technology, Sweden

Hans Vangheluwe, University of Gent, Belgium

Main Changes in Modelica 1.3

Modelica 1.3 was released December 15, 1999.

  • Defined connection semantics for inner/outer connectors.
  • Defined semantics for protected element.
  • Defined that least variable variability prefix wins.
  • Improved semantic definition of array expressions.
  • Defined scope of for-loop variables.

Main Changes in Modelica 1.2

Modelica 1.2 was released June 15, 1999.

  • Changed the external function interface to give greater flexibility.
  • Introduced inner/outer for dynamic types.
  • Redefined final keyword to only restrict further modification.
  • Restricted redeclaration to replaceable elements.
  • Defined semantics for if-clauses.
  • Defined allowed code optimizations.
  • Refined the semantics of event-handling.
  • Introduced fixed and nominal attributes.
  • Introduced terminate and analysisType.

Main Changes in Modelica 1.1

Modelica 1.1 was released in December 1998.

Major changes:

  • Specification as a separate document from the rationale.
  • Introduced prefixes discrete and nondiscrete.
  • Introduced pre and when.
  • Defined semantics for array expressions.
  • Introduced built-in functions and operators (only connect was present in Modelica 1.0).

Modelica 1.0

Modelica 1, the first version of Modelica, was released in September 1997, and had the language specification as a short appendix to the rationale.