nextLeaving function
Requirements.Internal.SlidingWindow.nextLeaving
ยท source
Return time instant when the oldest element is leaving the buffer
Extends Modelica.Icons.Function
Returns the instant at which the oldest element of the buffer leaves the sliding time window,
buffer.t[buffer.last] + T. If the buffer is empty, it returns t - 2*T, an instant in
the past, so that the condition time >= pre(t_next) of the caller does not become true again
until the next element is stored. The counting checks of
ChecksInSlidingWindow (e.g.
MinRising) store it as
t_next after every update and call
removeOldest at that instant.
Inputs
| Name | Type | Description |
|---|---|---|
buffer input | Buffer | Memory of sliding window |
t input | Real | Actual time instant |
Outputs
| Name | Type | Description |
|---|---|---|
t_next output | SI.Time | Next time instant where the oldest value (t,b) in the buffer is leaving the time window |