The JModelica.org C runtime library
This documentation was generated from revision 2480
The JModelica C runtime library contains functions and data structures for accessing the C model representation that is generated by the JModelica Modelica and Optimica front-ends, respectively. The library is organized into four main parts.
The Functional Mock-up Interface (FMI) defines a standard for model exchange with a small set of functions for model interaction while at the same time provide the necessary means for simulation of complex hybrid dynamic models.
The JMI Model interface interface contains functions for evaluating the function generated by the compiler, including the DAE residual, the residual functions for the DAE initialization problem, and the functions related to the optimization problem such as cost functions and constraint residual functions. The JMI Model interface also supports evaluation of symbolic Jacobians (if available) and/or Jacobians computed by means of automatic differentiation. Sparsity patterns for Jacobians are supported.
Based on the JMI Model interface, algorithms (in particular optimization algorithms) are implemented. These includes a framework for implementation of simultaneous optimization algorithms as well as a particular implementation of an algorithm based on Lagrange polynomials on Radau points.
Typically, the JMI Model and Algorithm interfaces are intended to be integrated with numerical solvers. Currently, the JMI interface provides an interface to the NLP solver Ipopt (https://projects.coin-or.org/Ipopt
The JModelica.org JMI interface in under development. The function signatures are likely to change in the future - all feedback is very welcome. The following limitations apply:
- Optimization of element lengths in the JMI simultaneous optimization interface is not supportd.
- Symbolic Jacobians are not provided by the compiler. This is actually a limitation in the code generation module, but as a consequence, the JMI_DER_SYMBOLIC flag cannot be used in the JMI interface.
- The ODE interface is very limited and requires a Modelica model to be stated on explicit ODE form () in order to work.