Port MODELACCESS¶
Stimulation¶
Restrictions:
不支持激励输入信号。
由 STI 文件中的 DataFileSegment 引用的 Trace 文件不会由 ecu.test 自动转换。
Supported execution 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 |
在以下情况下可用 |
默认值 |
有效值 |
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 |
定义单独的通信步长(以秒为单位) |
|
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
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
FMI simulation type |
GetSampleTime¶
Returns the effective communication step size
Parameterization
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
float |
配置的步长 |
GetSimulationTime¶
Returns the current simulation time
Parameterization
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
float |
current simulation time |
SetDebugLogging¶
Enables/disables debug logging for the FMU
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
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
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
/ |
No return value |
StopSimulation¶
May be used to stop the simulation within a package
Parameterization
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
float |
current simulation time |