Opened 5 years ago

Last modified 5 years ago

#5370 new discussion

Modelica compiler should issue warnings when clocked equations appear outside of the when equations

Reported by: anonymous Owned by: lochel
Priority: high Milestone: 2.0.0
Component: Backend Version:
Keywords: synchronous Cc:

Description (last modified by gossen)

While working with clocked equations I found that its to easy to turn continuous equations into clocked ones by mistake due to clock inference.

I think it would be much easier to debug such situations if Modelica compiler would print warning for synchronous equations appearing outside of the clocked when equations, except for connect equations and equations with synchronous sample operator.

model Example
  Real x, y, z;
equations
  x = sample(time, Clock(0.1)); //no warnings
  when Clock()
    y = x;
  end when;
  z = z; // print warning
end Example;

Change History (3)

comment:1 Changed 5 years ago by gossen

  • Description modified (diff)

comment:2 Changed 5 years ago by gossen

  • Component changed from Frontend to Backend
  • Owner changed from somebody to lochel

comment:3 Changed 5 years ago by casella

  • Milestone changed from Future to 2.0.0
Note: See TracTickets for help on using tickets.