The short-term goal is to develop an efficient interactive computational environment for the Modelica language, as well as a rather complete implementation of the language. It turns out that with support of appropriate tools and libraries, Modelica is very well suited as a computational language for development and execution of both low level and high level numerical algorithms, e.g. for control system design, solving nonlinear equation systems, or to develop optimization algorithms that are applied to complex applications.
The longer-term goal is to have a complete reference implementation of the Modelica language, including simulation of equation based models and additional facilities in the programming environment, as well as convenient facilities for research and experimentation in language design or other research activities. However, our goal is not to reach the level of performance and quality provided by current commercial Modelica environments that can handle large models requiring advanced analysis and optimization by the Modelica compiler.
To export an FMU from a Modelica model one can use a exportFMU.mos script:
// start exportFMU.mos script loadModel(Modelica); getErrorString(); // loadModel(AnotherLibraryIfNeeded); getErrorString(); // loadFile("SomeMOFileContainingYourModel.mo"); getErrorString(); translateModelFMU(ModelName, "2.0", "cs"); getErrorString(); // end exportFMU.mos
One can run the exportFMU.mos script via the omc[.exe] executable. On Windows:
On Linux (if OpenModelica is installed via apt-get):
On MacOS X:
Documentation of the function translateModelFMU.