impure functionsimulate
Simulates a model.
Extends from Internal.simulationArguments (The arguments of simulate, buildModel and the other simulation calls. An argument that is not given is taken from the experiment annotation.).
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
| Type | Name | Default | Description |
|---|---|---|---|
| TypeName | className (from simulationArguments) | the class that should simulated | |
| Real | startTime (from simulationArguments) | nan() | the start time of the simulation. <default> = 0.0 |
| Real | stopTime (from simulationArguments) | nan() | the stop time of the simulation. <default> = 1.0 |
| Integer | numberOfIntervals (from simulationArguments) | -1 | number of intervals in the result file. <default> = 500 |
| Real | stepSize (from simulationArguments) | nan() | step size that is used for the result file; overrides numberOfIntervals. <default> = 0.002 |
| Real | tolerance (from simulationArguments) | nan() | tolerance used by the integration method. <default> = 1e-6 |
| String | method (from simulationArguments) | "<default>" | integration method used for simulation. <default> = dassl |
| String | fileNamePrefix (from simulationArguments) | "<default>" | fileNamePrefix. <default> = "" |
| String | options (from simulationArguments) | "<default>" | options. <default> = "" |
| String | outputFormat (from simulationArguments) | "<default>" | Format for the result file. <default> = "mat" |
| String | variableFilter (from simulationArguments) | "<default>" | Only variables fully matching the regexp are stored in the result file. <default> = ".*" |
| String | cflags (from simulationArguments) | "<default>" | cflags. <default> = "" |
| String | simflags (from simulationArguments) | "<default>" | simflags. <default> = "" |
| String | resimulateExecutable | "" | If non-empty, skip translation and build and simulate this already-built executable directly. |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| SimulationResult | simulationResults |
Contents
| Name | Description |
|---|---|
| SimulationResult |