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
The following compliance improvements have been made:
The following operators are now supported:
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.
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.
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,
final, which will always return initial and final value of the simulation/optimization as scalar values. See both Chapter 5, Simulation of FMUs and Chapter 6, Optimization for plotting code examples.
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
r = compile_fmu('Test', 'test.mo') print r.warnings
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.2, “Runtime logging” for code examples.
Added support for simulation of models following the FMI version 2.0 beta 4, both model exchange FMUs and co-simulation FMUs.
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.
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.
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.