functionsimulate

Simulates a model.

Information

Simulates a Modelica model by generating C code, building it and running the simulation executable. The only required argument is the className, while all others have some default values.

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

Example command:

simulate(A);

Inputs

TypeNameDefaultDescription
TypeNameclassNamethe class that should simulated
RealstartTime"<default>"the start time of the simulation. <default> = 0.0
RealstopTime1.0the stop time of the simulation. <default> = 1.0
IntegernumberOfIntervals500number of intervals in the result file. <default> = 500
Realtolerance1e-6tolerance used by the integration method. <default> = 1e-6
Stringmethod"<default>"integration method used for simulation. <default> = dassl
StringfileNamePrefix"<default>"fileNamePrefix. <default> = ""
Stringoptions"<default>"options. <default> = ""
StringoutputFormat"mat"Format for the result file. <default> = "mat"
StringvariableFilter".*"Only variables fully matching the regexp are stored in the result file. <default> = ".*"
Stringcflags"<default>"cflags. <default> = ""
Stringsimflags"<default>"simflags. <default> = ""
StringresimulateExecutable""If non-empty, skip translation and build and simulate this already-built executable directly.

Outputs

TypeNameDefaultDescription
SimulationResultsimulationResults

Contents

NameDescription
SimulationResult