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.

ArgumentValue if not given
startTimeStartTime of the experiment annotation, else 0.
stopTimeStopTime, else 1.
numberOfIntervals(StopTime - StartTime) / Interval, rounded to the nearest integer, or NumberOfIntervals, else 500. For optimize(), 50.
stepSizeNot used. If it is given, numberOfIntervals is (stopTime - startTime) / stepSize, rounded down.
toleranceTolerance, else 1e-6.
method"dassl". With --daeMode, "ida". For optimize(), "optimization".
fileNamePrefixThe name of the class. The result file is <fileNamePrefix>_res.<outputFormat>.
optionsNot 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.
simflagsThe __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

TypeNameDefaultDescription
TypeNameclassNameThe model
RealstartTimenan()Start time
RealstopTimenan()Stop time
IntegernumberOfIntervals-1Number of intervals
RealstepSizenan()Interval of the result file
Realtolerancenan()Integration tolerance
Stringmethod"<default>"Integration method
StringfileNamePrefix"<default>"File name prefix
Stringoptions"<default>"Not used
StringoutputFormat"<default>"Result file format
StringvariableFilter"<default>"Variables to store
Stringcflags"<default>"Flags for the C compiler
Stringsimflags"<default>"Flags for the simulation