Inconsistent Simulation Outputs of Equivalent FMU Files imported in OpenModelica
Description
There are two equivalent Simulink models that produce consistent simulation results in Simulink. Subsequently, we converted these two models into FMU files (sampleModel_193_me_FMU and sampleModel_193_1_me_FMU) and simulated them in OpenModelica. We observed that the simulation results of these equivalent FMU files in OpenModelica were inconsistent. Specifically, one model produced more outputs, while the other produced fewer outputs.
Steps to Reproduce
First, import the original FMU file, sampleModel_193_me_FMU, into OpenModelica and perform the simulation. Next, import the equivalent variant FMU file, sampleModel_193_1_me_FMU, and simulate it. By comparing the simulation results of the two FMU files, it can be observed that the outputs of the two models are inconsistent: the original FMU file, sampleModel_193_me_FMU, produces fewer outputs, while the equivalent variant FMU file, sampleModel_193_1_me_FMU, generates significantly more outputs.
Expected Behavior
The output results of the two FMU files are consistent.
Screenshots
As shown in the attachment.
Version and OS
- OpenModelica Version: OpenModelica-v1.23.1-64bit
- OS: Windows 10, 64 bit
The support of FMU-ME import in Modelica models using OpenModelica is a thorny issue. For a number of subtle technical reasons it is currently not really possible to import a generic FMU-ME into a Modelica model. We implemented a solution that works in some cases, but it's really not reliable in general. The issue is currently being discussed within the Modelica Association, until that is settled we are not going to invest time on that.
If you just want to simulate a standalone FMU using OpenModelica, please consider using the SSP/OMSimulator feature