Opened 9 years ago

Last modified 9 years ago

#3772 closed defect

unknown clock interval — at Initial Version

Reported by: Niklas Worschech Owned by: Lennart Ochel
Priority: blocker Milestone: Future
Component: Backend Version:
Keywords: Modelica_Synchronous, synchronous features, cpp runtime Cc: Rüdiger Franke, Bernhard Thiele, Volker Waurich

Description

For the following example the clock interval is unknown in SimCode.
The model is from the cpp runtime testfolder.

model EventClock "See Modelica 3.3 spec, section 16.3 Clock Constructors"

Integer nextInterval(start = 1);
Real nextTick(start = 0);

equation

when Clock(time > hold(nextTick) / 210) then

nextInterval = previous(nextInterval) + 1;
nextTick = previous(nextTick) + nextInterval;

end when;

end EventClock;
The generated cpp code equation for the interval calculation is:
_clockInterval[0] = 0.0 * 1.0 / 1.0;
But the interval values should be 0.00953,0.0238,0.042 ...

Change History (0)

Note: See TracTickets for help on using tickets.