FMPy icon indicating copy to clipboard operation
FMPy copied to clipboard

CoSim FMU causes fmpy.gui to crash

Open AHaumer opened this issue 1 year ago • 2 comments

I exported an FMU from OpenModelica btoh ME and CoSim v.2.0: It is the bouncing ball (see enclosed source and FMU). The ME version runs but shows incorrect result at the end, it seems that some when-clauses are not handled correctly. So I tried CoSim but the simulation gets stuck just before the first reflection of the ball and subsequently the gui crashes. Interesting: In Simulink ME shows of course the same shows incorrect result, but CoSIm runs smoothly and shows correct results. BouncingBall.zip

AHaumer avatar Aug 25 '24 12:08 AHaumer

Can you try to run the FMU in the FUMSim GUI https://github.com/modelica/Reference-FMUs/releases/tag/v0.0.33 ?

t-sommer avatar Aug 26 '24 12:08 t-sommer

Works in FMUSim both as ME and CS without crash. Yes a nice example where CS works well if one takes care about the communication interval but ME delivers nonsens. Sorry I didn't know FMUSim. Why didn't you try this yourself? The FMU is enclosed as zip.

AHaumer avatar Aug 26 '24 17:08 AHaumer

When I re-export the FMU with OpenModelica v1.23.1 (64-bit), I can successfully simulate it as both CS and ME with a710177756745ca1010a14d4e79999bba4dcbb93. I assume it is a bug in the OpenModelica export.

t-sommer avatar Nov 20 '24 16:11 t-sommer