Modelica 3.2 is released

Modelica 3.2, a new version of the Modelica modelling language was released on 24 March 2010. It comes with some interesting developments including homotopy, functions as formal inputs, improved operator overloading, Unicode support, access to protect intellectual property, improved support of object libraries plus a few other improvements. The Modelica 3.2 release is backward compatible to the previous 3.1 release.

IP protection will give you the chance to license your own libraries and control its distribution. This offers OEMs and supply chain component makers greater control of their assets and who uses them.

The introduction of a homotopy operator will make the initialisation of complex systems easier.

We’ll be writing more about the opportunities for Dymola users shortly. Dymola users are advised to RSS this page to stay in touch.

This is an excerpt from the Modelica newsletter.
The essential changes with respect to 3.1 are:

Improved Initialization
The new built-in operator “homotopy(actual, simple)” allows to define a simplified version of an expression to help in the solution of non-linear algebraic equation systems. The solution might be obtained by first solving the model with the “simple” expression and then continuously transforming it to the “actual” expression. Benchmarks such as for a large power plant and a large vehicle dynamics system demonstrate that steady-state initialization becomes much more reliable if this operator is appropriately used in a library, even without accurate initial guesses.

Functions as formal inputs to functions
It is now possible to pass a function as an input argument to a function. This feature is useful to, e.g., pass an integrand function to a quadrature function.

Improved operator overloading
A new specialized class operator record is introduced with specialized typing rules (the type is identified by the class name; all other Modelica classes define the type by the public elements of a class). 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 now allowed if defined via a short class definition, 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
The character encoding of Modelica classes is now precisely defined: Description strings, strings in annotations and in comments are Unicode characters. In all other cases, the subset of Unicode is used that corresponds to the 7-bit ASCII character set. Modelica files are UTF-8 encoded. This change allows to use, e.g., Arabian, Asian, Indian characters in all descriptive/documentation parts of a class.

Access control to protect intellectual property
The new annotation “Protection” is introduced to define in a standardized way which parts of an encrypted package are accessible by a user. Additionally, the new annotation “License” allows to define, e.g., start and expiration date and restrict the usage to particular machines. The intent is to enable a commercial library vendor to maintain one source version of their Modelica package that can be encrypted and used with several different Modelica tools (using tool specific encryption mechanisms).

Improved support of object libraries used by external functions
Object library, as well as C-header files can be included in a package and can be referenced with URIs (such as “modelica://MyLibrary/Resources/lib”) in the external function annotations Library, Include, LibraryDirectory, and IncludeDirectory. Via standardized directory names, like win32, the tool can select the object library for the desired platform.


  • Global name lookup has been introduced by starting a Modelica name with a “.” (e.g. “.Modelica.Constants.pi”).
  • Constants can once again be modified unless declared final, as this is already used in existing packages.
  • New C-functions ModelicaVFormatMessage and ModelicaVFormatError, to simplify message formatting in external functions.
  • New annotation “groupImage” to associate images with parameter dialogs.
  • New annotation “showStartAttribute” to define start and fixed attributes for variables in parameter dialogs.

This article is provided by Martin Otter (DLR-RM) .


Got a question? Just fill in this form and send it to us and we'll get back to you shortly.


© Copyright 2010-2024 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?