init function
Requirements.Internal.SlidingWindow.init
ยท source
Initialize a sliding window buffer
Extends Modelica.Icons.Function
Returns an empty Buffer for a sliding time
window of length T that starts at t0: all times 0, all values false,
first = last = nElem = 0. The checks of
ChecksInSlidingWindow call it at initialization:
the duration checks (e.g. MinDuration) as
buffer = push(init(window, time), time, check), so that the first element is the value of the
checked signal at the start time; the counting checks (e.g.
MinRising) push the start time only if
the signal is true then.
Inputs
| Name | Type | Description |
|---|---|---|
T input | SI.Time | Length of window |
t0 input | SI.Time | Initial time instant |
Outputs
| Name | Type | Description |
|---|---|---|
buffer output | Buffer | Initialized buffer |