Opened 7 years ago
Last modified 3 years ago
#4641 new defect
FMU exported from OpenModelica 1.13.0 does not integrate correctly until end of integration interval (time event missing)
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | FMI | Version: | |
Keywords: | Cc: |
Description
A model has a time event defined at t=1, resulting in a step change of variable x1 from 0 to 1.
The FMU generated from OpenModelica is integrated from 0.99 to 1.00.
The output of x1 remains 0 also at the end of the integration interval, whereas a result of 1 is expected.
See attached modelica model and exported FMU (Linux64).
Attachments (1)
Change History (9)
comment:1 by , 7 years ago
by , 7 years ago
comment:2 by , 7 years ago
OpenModelica isn't treating that expression as a time event. I am also not sure if one can expect that x1 changes in the given case from 0 to 1.
comment:3 by , 7 years ago
I would agree with @lochel. If noEvent()
was used, the output should be 1; otherwise the value is both 0 and 1, and outputting 0 is fine. You can't really detect the zero-crossing if you only integrate until time 1.0.
Using the following could use time-events (but OM does not):
output Real x1(start=0.0, fixed=true); equation when time >= 1 then x1 = 1.0; elsewhen time >= 2 then x1 = 0.0; elsewhen time >= 5 then x1 = 1.0; end when;
In the case that time-events were supported, one could possibly expect that they were triggered (but still not necessarily).
comment:5 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:7 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
The modelica model causing the problem, see definition of variable x1.
within ;
model Part1
equation
end Part1;`