Up: Component summary Component


Compile a Modelica model into binary form using OpenModelica. First, the OpenModelica compiler translates the model into C, which is then compiled into binary using a C compiler. Static model errors are detected at this stage. The compiled model can be simulated with ModelicaSimulator. Compilation and simulation are split into different components to enable faster execution of a model with several parameter sets.

This component has been tested on Linux and OpenModelica 1.5.

Version 0.5
Bundle tools
Categories Pathway
Authors Kristian Ovaska (kristian.ovaska@helsinki.fi)
Issue tracker View/Report issues
Requires OpenModelica ; GCC ; GNU-compatible make
Source files component.xml
Usage Example with default values


Name Type Mandatory Description
sourceModel Modelica Mandatory Modelica model in source format. The model may be split into several files: all .mo and .mof source files are compiled into a combined model. If an existing config.ini file is present, it is ignored and overwritten.


Name Type Description
binaryModel Modelica Compiled model in binary format, along with a config.ini file. Also, all files present in the sourceModel are present in the binary model as well.
flatModel Modelica Flattened model, under the name ${modelName}.mof.


Name Type Default Description
cFlags string "-O2" Additional command-line flags for the C compiler.
compilerCommand string "omc" Path to the OpenModelica compiler.
libraries string "" Comma-separated list of Modelica libraries that need to be loaded. For example, "Modelica,SBLTools" loads the standard Modelica library as well as SBLTools, a utility library bundled with this component. If the root directory of a library contains resources such as *.{a, dll, h, lib, so} files, these are copied to the binary model before C compilation.
makeCommand string "make" Path to the GNU make tool.
modelName string (no default) Name of the main (top level) Modelica class in the model. This determines, among other things, filenames for the makefile and compiled binary.

Test cases

Test case Parameters IN
case1 properties sourceModel (missing) flatModel


case2_error properties sourceModel (expecting failure) (expecting failure)


Generated 2019-02-08 07:42:18 by Anduril 2.0.0