Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A state event of a 2.0 ME FMU is located too early #730

Open
TorstenBlochwitz opened this issue Dec 17, 2024 · 1 comment
Open

A state event of a 2.0 ME FMU is located too early #730

TorstenBlochwitz opened this issue Dec 17, 2024 · 1 comment
Labels

Comments

@TorstenBlochwitz
Copy link

FMPy locates a state event of an 2.0 ME FMU too early. According to the FMI 2.0 specification (point 3 above below Figure 4) an event instant occurs "where an event indicator zj(t) changes its domain from zj > 0 to zj ≤ 0 or from zj ≤ 0 to zj > 0".

Please have a look at the attached picture:
FMPyLog
At the last successful time, the event indicator has negative sign (green boxes). Later on, searching for the next event starts. Then fmi2EnterEventMode is called, after fmi2getEventIndicators returned 0.0 (red boxes). But this is too early!

As a result, the outputs discReal1, discReal2, intOut1 and intOut2 do not jump, but stay constant.

The FMU is treated correctly in Dymola, Simulink, OpenModelica and SimulationX.

I can provide the FMU, please let me know your preferred way to do so.

@t-sommer t-sommer added the bug label Dec 18, 2024
@t-sommer
Copy link
Contributor

Thanks for reporting this problem. Please attach the FMU to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants