1. Release notes for JModelica.org version 1.10

1.1. Highlights

  • Export of FMUs for Co-Simulation

  • Import of FMU 2.0b4 in PyFMI

  • Improved log format for FMUs

  • Improved variable scaling in the CasADi collocation

  • Improved handling of measurement data in the CasADi collocation

  • Improved logging from compilers

  • Improved Modelica compliance

1.2. Compilers

The following compliance improvements have been made:

  • The following operators are now supported:

    • smooth()

    • skew(x)

    • scalar(A)

    • vector(A)

    • matrix(A)

    • diagonal(v)

  • Improved handling of unmatched HGT. All unmatched iteration variables and residual equations are now paired and treated the same way as regular HGT pairs.

  • Improvements have been made to analytical jacobians. Notably full support for functions and bug fixes.

Also many bug fixes and performance improvements have been made.

1.2.1. Export of FMUs for Co-Simulation

Export of FMUs for Co-Simulation version 1.0 is now supported. Specifying a co-simulation FMU instead of a model exchange FMU is done via an option to the compile_fmu method. The internal solver in the co-simulation FMU is CVode from the Sundials suite and there is also an explicit Euler method. The choice of the solver can be changed via a parameter in the FMU.

1.3. Python

1.3.1. Improved result data access

Modified handling of simulation and optimization results to facilitate post processing of results such as plotting. Accessing variables and parameters from results will always return a vector of size equal to the time vector. Also, the base result class (JMResultBase) has two new functions, initial and final, which will always return initial and final value of the simulation/optimization as scalar values. See both Chapter 5 and Chapter 7 for plotting code examples.

1.3.2. Improved error handling

Improved error handling of compiler problems (exceptions, errors and warnings). Problems are now given in the same way as regardless if JPype or separate process is used when compiling. Additionally errors and warning are now returned as python objects to facilitate easier post processing of compiler problems. It is also possible to retrieve warnings from the return result of compile_fmu, compile_jmu and compile_fmux, e.g.:

r = compile_fmu('Test', 'test.mo')
print r.warnings

1.3.3. Parsing of FMU log files

FMUs and JMUs created with JModelica.org now produce logs in a structured XML format, which can be either parsed using tools in the Python module pyjmi.log or using general purpose XML tools. See Section 5.3 for code examples.

1.4. Simulation

1.4.1. Support for FMU version 2.0b4

Added support for simulation of models following the FMI version 2.0 beta 4, both model exchange FMUs and co-simulation FMUs.

1.4.2. Result filter

Added an option to the simulation method for filtering which variables are stored. This is especially useful in case of large models with many variables as just selecting a subset of variables to store can speed up the simulation. Additionally there is now the option to store the result directly in the memory instead of writing the result to file.

1.4.3. Improved solver support

Improvements on the solvers has been made resulting in that simulation of Model Exchange FMUs can now be performed by a number of solvers. See the simulation options for the supported solvers. For example there is now an Radau5 solver.

1.5. Optimization

1.5.1. Improved variable scaling

The variable scaling performed based on nominal trajectories for the CasADi collocation has been improved and can now be set individually for each variable. It also has a more robust default behavior.

1.5.2. Improved handling of measurement data

The old class ParameterEstimationData for the CasADi collocation has been replaced by MeasurementData. The new class can also be used for optimal control, and not only parameter estimation, and also offers additional strategies in the handling of the data.

1.6. Contributors

Bengt-Arne Andersson

Christian Andersson

Tove Bergdahl

Emil Fredriksson

Magnus Gäfvert

Toivo Henningsson

Jonathan Kämpe

John Lindskog

Fredrik Magnusson

Jesper Mattsson

Iakov Nakhimovski

Teo Nilsson

Jon Sten

Johan Ylikiiskilä

Johan Åkesson

1.6.1. Previous contributors

Sofia Gedda

Björn Lennernäs

Petter Lindgren

Tobias Mattsson

Lennart Moraeus

Philip Nilsson

Patrik Meijer

Kristina Olsson

Roberto Parrotto

Jens Rantil

Philip Reuterswärd

Jonas Rosenqvist