impure functionsimulate

Simulates a model.

Extends from Internal.simulationArguments (The arguments of simulate, buildModel and the other simulation calls.).

Information

Simulates a Modelica model by generating C code, building it and running the simulation executable.

simulate(className, [startTime], [stopTime], [numberOfIntervals], [stepSize], [tolerance], [method], [fileNamePrefix], [options], [outputFormat], [variableFilter], [cflags], [simflags], [resimulateExecutable])

Example command:

simulate(A);

If resimulateExecutable is given, simulate() does not translate and build the model. It runs that executable, which an earlier buildModel() made in the current directory, with only the flags in simflags. To change the run, give simulation flags, for example simflags="-stopTime=2".

Inputs

TypeNameDefaultDescription
TypeNameclassName (from simulationArguments)The model
RealstartTime (from simulationArguments)nan()Start time
RealstopTime (from simulationArguments)nan()Stop time
IntegernumberOfIntervals (from simulationArguments)-1Number of intervals
RealstepSize (from simulationArguments)nan()Interval of the result file
Realtolerance (from simulationArguments)nan()Integration tolerance
Stringmethod (from simulationArguments)"<default>"Integration method
StringfileNamePrefix (from simulationArguments)"<default>"File name prefix
Stringoptions (from simulationArguments)"<default>"Not used
StringoutputFormat (from simulationArguments)"<default>"Result file format
StringvariableFilter (from simulationArguments)"<default>"Variables to store
Stringcflags (from simulationArguments)"<default>"Flags for the C compiler
Stringsimflags (from simulationArguments)"<default>"Flags for the simulation
StringresimulateExecutable""Executable to run

Outputs

TypeNameDefaultDescription
SimulationResultsimulationResults

Contents

NameDescription
SimulationResult