Opened 7 years ago
Closed 7 years ago
#4891 closed defect (duplicate)
Time event not correctly recognized and handled as state event
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | v1.13.0-dev-nightly |
Keywords: | Cc: |
Description
When solving the following simple model:
model test_stateevent Modelica.Blocks.Sources.BooleanTable boolTable(table = {0, 10, 15, 30, 35}) annotation( Placement(visible = true, transformation(origin = {-88, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Real x; equation if boolTable.y == true then x = 10; else x = 0; end if; annotation( uses(Modelica(version = "3.2.2")), experiment(StartTime = 0, StopTime = 50, Tolerance = 0.0001, Interval = 0.1), __OpenModelica_simulationFlags(jacobian = "coloredNumerical", lv = "LOG_STATS", s = "dassl")); end test_stateevent;
the solver should recognize that the boolean used in the comparison " if boolTable.y == true then" only changes at pre-defined time points. Thus, only time events should be generated.
However, OpenModelica, Version 1.13.0-dev-111-g4f0ba05c does generate state events.
Note:
See TracTickets
for help on using tickets.
One more test case for the very old ticket #2152. @hauke.hirsch, would you mind adding what you wrote here as a comment to that ticket?
Thanks!