Improved support for hybrid systems, including friction models and ideal diodes
Support for tearing of equation systems
Support for external Fortran functions
Support for function inlining
Reorganization of the Python code: a new stand-alone package, PyFMI, provided
A novel dynamic optimization algorithm implemented in Python based on collocation and CasADi is provided
Mixed systems of equations, i.e., equation systems containing both real and integer/boolean variables are supported. Such systems commonly occurs in, e.g., friction models and diode models.
Tearing is a technique to improve simulation efficiency by reducing the number of iteration variables when solving systems of equations. A tearing algorithm relying on graph-theoretical methods has been implemented, which is used to generate more efficient simulation code.
With added support for external Fortran function and many bug fixes, the compiler now handles many models that previously would not compile.
Calls to Modelica functions (i.e. not external functions) in equations can now be inlined, by adding the equivalent equations and temporary variables. This allows some transformations that are specific to equations to be performed on the function calls as well. It also allows compilation targets that does not handle functions, such as CasADi, to be used with models containing functions. Currently, only functions that only contains assignment statements are supported. Such function are common in e.g. media libraries.
The Python code has been refactored into three packages:
PyFMI A package for working with FMUs, perform simulations, interact with the model, plotting of result data and more. This package can be used stand-alone, see www.pyfmi.org.
PyJMI A package for working with JMUs, solve optimization problems, perform simulations, model interaction and more.
PyModelica A package containing Modelica and Optimica compilers.
The FMU import and export now supports dependencies on extra shared libraries. For the export, the shared libraries are placed in the same folder as the model binary. Similarly, any shared libraries packed with the model binary will be found when importing the FMU.
The improved compiler support for mixed systems of equations is matched by extensions to the JModelica.org simulation runtime system, enabling simulation of more sophisticated hybrid models. Amongst others, the classic Modelica.Mechanics.Rotational.Examples.CoupledClutches benchmark model can be now simulated.
A novel CasADi-based collocation algorithm is provided. The new algorithm is implemented in Python and relies on the CasADi package for computation of derivatives and interaction with IPOPT. The new algorithm is an order of magnitude faster than the existing collocation algorithm on many problems, and provides significantly improved flexibility.
Bengt-Arne Andersson
Christian Andersson
Tove Bergdahl
Magnus Gäfvert
Petter Lindgren
Fredrik Magnusson
Jesper Mattsson
Patrik Meijer
Iakov Nakhimovski
Johan Ylikiiskilä
Johan Åkesson