CATIA-Systems / FMIKit-Simulink

Import and export Functional Mock-up Units with Simulink
Other
155 stars 50 forks source link

At import, FMI3Reset does not reset correctly the instance time #431

Open antvl opened 1 year ago

antvl commented 1 year ago

If an FMU version 3.0 is imported with the resettable option enabled, and a reset is triggered by the corresponding signal, the instance time is not correctly reseted. This means that after the reset the currentCommunicationPoint argument of the fmi3DoStep function is not consistent with the startTime value defined when calling fmi3EnterInitializationMode. Notice that this issue only exists with FMI 3.0, this is working for version 2.0.

This issue can be fixed by adding: instance->time = startTime; in the FMI3EnterInitializationMode function.

BrunoLione commented 11 months ago

Hello Torsten. The same issue seems to exist in version 1.0 (FMI for co-simulation 1.0).