1. Release notes for JModelica.org version 1.9

1.1. Highlights

  • Improved function inlining

  • Manual selection of iteration variables in tearing algorithm - Hand Guided Tearing (HGT)

  • Support for external objects

  • Simulation of Co-simulation FMUs in Python

  • Improved compiler execution speed

  • Improved compiler memory efficiency

  • Support for MSL CombiTables

  • Improvements to the CasADi-based collocation optimization algorithm, including support for non-fixed time horizons and supplying nominal trajectories for scaling purposes

  • Updated to MSL 3.2

1.2. Compilers

1.2.1. Improved Modelica compliance

The following compliance improvements have been made:

  • Support for external objects (classes extending the predefined partial class ExternalObject)

  • Support for the same component being added from more than one extends clause.

  • Many bug fixes, notably concerning inheritance and redeclares.

1.2.2. Support for MSL CombiTables

There is now support for MSL CombiTables, both 1D and 2D. The table can be either read from file or explicitly supplied as a parameter matrix.

1.2.3. Support for hand guided tearing

The tearing algorithm in the compiler can now be influenced by user selected residuals and iteration variables, in order to make such selections explicit, e.g., to exploit physical insight in the choice of iteration variables. The selections are made by means of vendor specific annotations and can be done at the component level and at the system level.

1.2.4. Improved function inlining

Improved support for inlining of functions. Notably a new in-lining mode has been added, where functions that can be inlined without introducing additional variables to the model. The inlining algorithm has also been expanded to handle more situations.

1.2.5. Memory and execution time improvements in the compiler

The compilation times for large simulation models has been reduced by more than two orders of magnitudes. Also, the memory required to compile large models has been decreased by two orders of magnitude. As a consequence, larger models up to 100.000 equations can be comfortably compiled on a standard computer.

1.3. Python

1.3.1. Compile in separate process

The possibility to compile in a separate process from the Python interface has been added. This is enabled with an argument to compile_fmu, compile_jmu or compile_fmux which is False by default. It is also possible to pass arguments to the JVM. This enables, among other things, users on 64 bit Windows to use a 64 bit JRE (Java Runtime Environment) for compiling a model.

1.4. Simulation

1.4.1. Simulation of co-simulation FMUs

Support for simulation of co-simulation FMUs following the FMI version 1.0 has been implemented and follows the same work-flow as for loading and simulating an model exchange FMU, i.e:

from pyfmi import load_fmu
model = load_fmu("CS_Model.fmu")
res = model.simulate(final_time=1.0)

1.5. Optimization

1.5.1. Improvements to CasADi-based collocation algorithm

The following features have been added to the CasADi-based collocation algorithm

  • Support for non-fixed time horizons, allowing the formulation of, for example, minimum-time problems

  • Possibility to supply nominal trajectories based on simulation results, which are used to compute (possibly time-variant) scaling factors. This makes it possible to conveniently obtain good scaling for all variables in a model.

  • Possibility to use more advanced interpolation of optimized inputs based on collocation polynomials, instead of linear interpolation, providing higher accuracy when simulating a system using optimized inputs

  • Setting of nominal attributes from Python in loaded models

1.6. Contributors

Bengt-Arne Andersson

Christian Andersson

Tove Bergdahl

Magnus Gäfvert

Fredrik Magnusson

Jesper Mattsson

Iakov Nakhimovski

Jonas Rosenqvist

Jon Sten

Johan Ylikiiskilä

Johan Åkesson

1.6.1. Previous contributors

Sofia Gedda

Petter Lindgren

Tobias Mattsson

Lennart Moraeus

Philip Nilsson

Patrik Meijer

Kristina Olsson

Roberto Parrotto

Jens Rantil

Philip Reuterswärd