removeOldest function
Requirements.Internal.SlidingWindow.removeOldest
ยท source
Remove all elements from the buffer that are about to leave the sliding time window
Extends Modelica.Icons.Function
Removes from the buffer all elements, starting with the oldest one, whose time is at or before
t - (1 - eps)*T (eps = 1000*Modelica.Constants.eps), i.e. that have left the sliding time window
at the instant t, and returns the updated buffer; an emptied buffer gets first = last = 0.
Unlike push it stores no new element. The
counting blocks of ChecksInSlidingWindow
(MinRising, MaxRising, BandRising,
MaxFrequency, MaxRisingFrequency) call it at the time event
nextLeaving announces, when the oldest
element leaves the window, and then count the remaining elements with
numberOfValues.
Inputs
| Name | Type | Description |
|---|---|---|
buffer input | Buffer | Memory of sliding window |
t input | Real | Actual time instant |
Outputs
| Name | Type | Description |
|---|---|---|
newBuffer output | Buffer | Updated memory of sliding window |