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
| Type | Name | Default | Description |
|---|---|---|---|
| TypeName | className | the class that should simulated | |
| Real | startTime | "<default>" | the start time of the simulation. <default> = 0.0 |
| Real | stopTime | 1.0 | the stop time of the simulation. <default> = 1.0 |
| Integer | numberOfIntervals | 500 | number of intervals in the result file. <default> = 500 |
| Real | tolerance | 1e-6 | tolerance used by the integration method. <default> = 1e-6 |
| String | method | "<default>" | integration method used for simulation. <default> = dassl |
| String | fileNamePrefix | "<default>" | fileNamePrefix. <default> = "" |
| String | options | "<default>" | options. <default> = "" |
| String | outputFormat | "mat" | Format for the result file. <default> = "mat" |
| String | variableFilter | ".*" | Only variables fully matching the regexp are stored in the result file. <default> = ".*" |
| String | cflags | "<default>" | cflags. <default> = "" |
| String | simflags | "<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 |