Opened 12 years ago
Last modified 4 years ago
#2152 assigned enhancement
Handle time events efficiently — at Version 5
Reported by: | Martin Sjölund | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.0 |
Component: | Run-time | Version: | trunk |
Keywords: | Cc: | Andreas Heuermann |
Description (last modified by )
The relations
time >= <discrete_expr> time < <discrete_expr>
can be handled as time events without resorting to crossing functions, thus leading to more efficient simulation code (see Modelica Specification 3.2 rev1, sect. 8.5).
We can look for expressions containing only pre(discrete), constant, or parameter expressions. Then it is always possible to calculate the next exact time of this event indicator, by replacing >= (or <) with == and solving for time.
If time is <= current time, no more events occur, otherwise schedule next time event and deal with it as with sample()
Change History (5)
comment:1 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 12 years ago
Priority: | high → blocker |
---|
comment:4 by , 11 years ago
Owner: | changed from | to
---|
comment:5 by , 11 years ago
Description: | modified (diff) |
---|---|
Summary: | Find exact times of time events → Handle time events efficiently |
Changed description to reflect contents more accurately
Merged text with closed duplicate #2224
Would be good to fix this as soon as possible so we can the new tables implementation. I do believe it is working, but it needs better event detection to work properly.