OpenModelica / OMSimulator

The OpenModelica FMI & SSP-based co-simulation environment.
Other
71 stars 50 forks source link

Co-simulation FMU prints double rows #1196

Open Thewodoros opened 1 year ago

Thewodoros commented 1 year ago

Description

I tried to make an FMU out of Amesim’s tutorial model, the driveline, and then launch it in OMSimulator (python library). But for every step, it prints the same row in the CSV result file twice: two lines for time=0.0001, two for time=0.0002, etc.

Version and OS

MathiasMalandain commented 5 months ago

Up on this one. I have a simple test case with two FMUs (basically, FMU1 produces a value, FMU2 consumes it). With fixed time step 1, I get one row for t=0, then two for t=1, two for t=2, etc. until I reach the end time, at which point I get 3 rows.

For each time point, the input value for FMU2 (directly sent by FMU1 after its time stepping) is updated between the first and second rows.

This is a weird behavior, although I at least know that only keeping the "odd numbered rows" in the output file yields what was expected.

Version and OS