CATIA-Systems / FMPy

Simulate Functional Mockup Units (FMUs) in Python
Other
429 stars 118 forks source link

CoSim FMU causes fmpy.gui to crash #689

Open AHaumer opened 1 month ago

AHaumer commented 1 month ago

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

t-sommer commented 1 month ago

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

AHaumer commented 1 month ago

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.