Opened 6 years ago

Closed 6 years ago

#4891 closed defect (duplicate)

Time event not correctly recognized and handled as state event

Reported by: hauke.hirsch@… Owned by: lochel
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.

Change History (1)

comment:1 Changed 6 years ago by casella

  • Resolution set to duplicate
  • Status changed from new to closed

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!

Note: See TracTickets for help on using tickets.