Simulate a Modelica model by
executing a compiled model. The model must have been compiled first using
ModelicaCompiler. Model parameters can be assigned before simulation
(the Modelica keyword parameter
), as can simulation
parameters.
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 |
Source files | component.xml |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
binaryModel | Modelica | Mandatory | Compiled model in binary format. Must contain a config.ini files which specifies names of the executable, parameters file and results file. |
parameters | AnnotationTable | Optional | Optionally, contains values for model parameters. The first column gives the parameter name, and the column specified by parameterColumn gives the value. Parameter names are fully qualified, e.g., "abc.xyz.par". Boolean parameters have values true or false. |
Name | Type | Description |
---|---|---|
timepoints | CSV | Results of the simulation as a table of time points. The first column (time) gives the time, and other columns give values of variables at the time point. |
Name | Type | Default | Description |
---|---|---|---|
digits | int | -1 | Number of digits in the result, or -1 for all available digits. If several time points differ by less that 10^-digits, they are combined by taking the value of the last time point as the combined value. |
endTime | float | 1 | End time for recording simulation values. |
intervals | int | 100 | Number of simulation intervals (time points) that are recorded. Depending on the solver, there may be more intervals than this. |
outputVariables | string | ".*" | Java regular expression that defines names of variables that are included in the output. This allows to select the variables of interest. |
parameterColumn | string | "" | Column name in the parameters input that contains parameter values, or empty string for the second column. |
solverMethod | string | "" | Method for solving differential equations. If empty, use the default. For OpenModelica 1.5, legal values are dassl, euler, rungekutta and dassl2. Depending on build, the options inline-euler and inline-rungekutta may be available as well. |
startTime | float | 0 | Start time for recording simulation values. |
tolerance | float | 0 | Tolerance for the solver. If 0, use the default. Common values are around 1e-6. |
Test case | Parameters▼ | IN binaryModel |
IN parameters |
OUT timepoints |
||
---|---|---|---|---|---|---|
case1 | properties | binaryModel | parameters | (missing) | ||
digits=5, |