13. Release notes for JModelica.org version 1.3

13.1. Highlights

  • Functional Mockup Interface (FMI) simulation support

  • Support for minimum time problems

  • Improved support for redeclare/replaceable in the compiler frontend

  • Limited support for external functions

  • Support for stream connections (with up to two connectors in a connection)

13.2. Compilers

13.2.1. The Modelica compiler

Arrays

Slice operations are now supported.

Array support is now nearly complete. The exceptions are:

  • Functions with array inputs with sizes declared as ':' - only basic support.

  • A few array-related function-like operators are not supported.

  • Connect clauses does not handle arrays of connectors properly.

Redecare

Redeclares as class elements are now supported.

Conditional components

Conditional components are now supported.

Constants and parameters

Function calls can now be used as binding expressions for parameters and constants. The handling of Integer, Boolean and record type parameters is also improved.

External functions
  • Basic support for external functions written in C.

  • Annotations for libraries, includes, library directories and include directories supported.

  • Platform directories supported.

  • Can not be used together with CppAD.

  • Arrays as arguments are not yet supported. Functions in Modelica_utilies are also not supported.

Stream connectors

Stream connectors, including the operators inStream and actualStream and connections with up to two stream connectors are supported.

Miscellaneous

The error checking has been improved, eliminating many erroneous error messages for correct Modelica code.

The memory and time usage for the compiler has been greatly reduced for medium and large models, especially for complex class structures.

13.2.2. The Optimica compiler

All support mentioned for the Modelica compiler applies to the Optimica compiler as well.

New class attribute objectiveIntegrand

Support for the objectiveIntegrand class attribute. In order to encode Lagrange cost functions of the type

the Optimica class attribute objectiveIntegrand is supported by the Optimica compiler. The expression L may be utilized by optimization algorithms providing dedicated support for Lagrange cost functions.

Support for minimum time problems

Optimization problems with free initial and terminal times can now be solved by setting the free attribute of the class attributes startTime and finalTime to true. The Optimica compiler automatically translates the problem into a fixed horizon problems with free parameters for the start en terminal times, which in turn are used to rescale the time of the problem.

Using this method, no changes are required to the optimization algorithm, since a fixed horizon problem is solved.

13.3. JModelica.org Model Interface (JMI)

13.3.1. The collocation optimization algorithm

Dependent parameters

Support for free dependent parameters in the collocation optimization algorithm is now implemented. In models containing parameter declarations such as:

parameter Real p1(free=true);
parameter Real p2 = p1;

where the parameter p2 needs to be considered as being free in the optimization problem, with the additional equality constraint:

p1 = p2

included in the problem.

Support for Lagrange cost functions

The new Optimica class attribute objectiveIntegrand, see above, is supported by the collocation optimization algorithm. The integral cost is approximated by a Radau quadrature formula.

13.4. Assimulo

Support for simulation of an FMU (see below) using Assimulo. Simulation of an FMU can either be done by using the high-level method *simulate* or creating a model from the FMIModel class together with a problem class, FMIODE which is then passed to CVode.

13.5. FMI compliance

Improved support for the Functional Mockup Interface (FMI) standard. Support for importing an FMI model, FMU (Functional Mockup Unit). The import consist of loading the FMU into Python and connecting the models C execution interface to Python. Note, strings are not currently supported.

Imported FMUs can be simulated using the Assimulo package.

13.6. XML model export

13.6.1. noEvent operator

Support for the built-in operator noEvent has been implemented.

13.6.2. static attribute

Support for the Optimica attribute static has been implemented.

13.7. Python integration

13.7.1. High-level functions

Model files

Passing more than one model file to high-level functions supported.

New result object

A result object is used as return argument for all algorithms. The result object for each algorithm extends the base class ResultBase and will therefore (at least) contain: the model object, the result file name, the solver used and the result data object.

13.7.2. File I/O

Rewriting xmlparser.py has improved performance when writing simulation result data to file considerably.

13.8. Contributors

Christian Andersson

Tove Bergdahl

Magnus Gäfvert

Jesper Mattsson

Roberto Parrotto

Johan Åkesson

Philip Reuterswärd

13.8.1. Previous contributors

Philip Nilsson

Jens Rantil