Port MODELACCESS¶
Stimulation¶
Restrictions:
Stimulus input signals are not supported.
Trace files being referenced by a DataFileSegment in an STI file are not converted automatically by ecu.test.
Supported execution modes¶
See also: Specifics of time modes
Preferred time source/mode: Stepwise simulation time
- Real-time:
To use real-time mode, the Test configuration in the Execution tab must be configured as the source ‘real time’.
- Stepwise simulation time:
To use the stepwise simulation mode, the port in the Test configuration in the Execution tab must be selected and the mode set to ‘stepwise’.
- Continuous simulation time:
To use the continuous simulation mode, the port in the Test configuration in the Execution tab must be selected and the mode set to ‘continuous’.
Properties 🛈¶
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FMU file |
string |
Relative path to the FMU file relative to the FMU root directory. |
|||
FMI type |
automatic |
[automatic, CoSimulation, ModelExchange] |
string |
The FMI type to be used for the simulation. If “automatic” is selected, the type defined in the model description is used or “CoSimulation” if the FMU supports both types. |
|
Validate Model Description |
☑ |
bool |
Validate the Model Description XML against the schema from the FMI standard upon loading? |
||
Simulation behavior |
|||||
Simulation speed |
Simulation behavior |
unthrottled |
[unthrottled, individual, 1x, 2x, 4x, 8x] |
string |
For real-time simulations, the simulation speed can be reduced to a setpoint (multiple of real time). |
individual simulation speed |
Simulation behavior » Simulation speed: ‘individual’ |
1.0 |
float |
Set individual simulation speed (multiple of real time) |
|
Communication step size |
Simulation behavior |
automatic |
[automatic, determine from Default Experiment, individual] |
string |
Step size that is used to stimulate signals. Also used as “stepSize” for ModelExchange FMUs with fixed-step solver. If “automatic” is set, the system first tries to determine the step size from the default experiment. If this is not available or no default experiment is defined, 0.001 (1 ms) is used. |
individual communication step size |
Simulation behavior » Communication step size: ‘individual’ |
0.001 |
float |
Define individual communication step size (specified in seconds) |
|
Downsampling factor for signal recording |
Simulation behavior |
1 |
int |
Factor for reducing the data points (samples) when recording signals. The factor is related to the communication step size and not to the step size with which the FMU calculates internally. With a factor of 10, only every tenth data point is written to the recording. By default, all data points are recorded (factor 1). |
|
Logging |
|||||
Enable debug logging |
Logging |
☐ |
bool |
Enables debug logging for the FMU. This option should be disabled in production because emitting a lot of debug prints may severely affect the simulation performance. |
|
Enable logging for FMI calls |
Logging |
☐ |
bool |
Enables logging of all FMI calls. This option should be disabled in production because emitting a lot of debug prints may severely affect the simulation performance. |
Jobs 🛈¶
GetFmiType¶
Returns the FMI simulation type of the FMU
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
FMI simulation type |
GetSampleTime¶
Returns the effective communication step size
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
float |
Configured step size |
GetSimulationTime¶
Returns the current simulation time
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
float |
current simulation time |
SetDebugLogging¶
Enables/disables debug logging for the FMU
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
categories |
object |
List of categories for which logging should be enabled (type: list[str]). (affects both regular log output and debug log output). The available categories can be taken from the modelDescription.xml of the FMU. ‘None’ or an empty list ‘[]’ will cause the log outputs to be unfiltered, i.e. all log categories will be output. |
|||
loggingOn |
True |
[False, True] |
bool |
Enable/disable debug logging |
StartSimulation¶
May be used to start the simulation within a package, e.g. if the simulation isn’t started automatically upon package start (see test bench option).
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
/ |
No return value |
StopSimulation¶
May be used to stop the simulation within a package
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
float |
current simulation time |