Opened 6 years ago
Closed 6 years ago
#4897 closed defect (duplicate)
No time events in OpenModelica?
Reported by: | Andreas Nicolai <andreas.nicolai@…> | Owned by: | lochel |
---|---|---|---|
Priority: | high | Milestone: | 1.13.0 |
Component: | Backend | Version: | v1.13.0-dev-nightly |
Keywords: | Cc: |
Description
Hi there,
I've just tried an example from Michael Tiller's ebook:
http://book.xogeny.com/behavior/discrete/cooling/#cooling-revisited
with the following minimalistics example:
model TimeEventModellTest Real T_inf; equation if time<=0.5 then T_inf = 298.15 "Constant temperature when time<=0.5"; else T_inf = 298.15-20*(time-0.5) "Otherwise, decreasing"; end if; end TimeEventModellTest;
Solver statistics shows:
1 state events
0 time events
Clearly, this code should trigger a time event, since the condition only depends on time. Am I missing something here or is maybe the statistics output broken?
Change History (1)
comment:1 Changed 6 years ago by casella
- Milestone changed from Future to 1.13.0
- Resolution set to duplicate
- Status changed from new to closed
This is an old issue that still needs to be fixed, sse #2152. AFAIK, only in the case of sample() operators does the current runtime generate time events.