functionsimulationArguments
The arguments of simulate, buildModel and the other simulation calls.
Information
Only className is necessary. An argument that is not given gets its value from the
experiment annotation of the class, or of a class that it extends, or else from the default below.
The declared values nan(), -1 and "<default>" only mark an argument that is not given.
| Argument | Value if not given |
|---|---|
startTime | StartTime of the experiment annotation, else 0. |
stopTime | StopTime, else 1. |
numberOfIntervals | (StopTime - StartTime) / Interval, rounded to the nearest integer,
or NumberOfIntervals, else 500. For optimize(), 50. |
stepSize | Not used. If it is given, numberOfIntervals is (stopTime - startTime) / stepSize, rounded down. |
tolerance | Tolerance, else 1e-6. |
method | "dassl". With --daeMode, "ida". For optimize(), "optimization". |
fileNamePrefix | The name of the class. The result file is <fileNamePrefix>_res.<outputFormat>. |
options | Not used. |
outputFormat | "mat". The other formats are "csv", "plt", "arrow" and "empty", which writes no result file. |
variableFilter | ".*". Only the variables whose full name matches this regular expression go into the result file. |
cflags | "". Extra flags for the C compiler. |
simflags | The __OpenModelica_simulationFlags annotation of the class, else "".
With --ignoreSimulationFlagsAnnotation, omc does not use the annotation. |
The flags in simflags apply when the simulation executable runs, and they replace the values above:
for example, -s=euler replaces method.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| TypeName | className | The model | |
| Real | startTime | nan() | Start time |
| Real | stopTime | nan() | Stop time |
| Integer | numberOfIntervals | -1 | Number of intervals |
| Real | stepSize | nan() | Interval of the result file |
| Real | tolerance | nan() | Integration tolerance |
| String | method | "<default>" | Integration method |
| String | fileNamePrefix | "<default>" | File name prefix |
| String | options | "<default>" | Not used |
| String | outputFormat | "<default>" | Result file format |
| String | variableFilter | "<default>" | Variables to store |
| String | cflags | "<default>" | Flags for the C compiler |
| String | simflags | "<default>" | Flags for the simulation |