init function

Requirements.Internal.SlidingWindow.init  ยท source

Icon of init

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

NameTypeDescription
T inputSI.TimeLength of window
t0 inputSI.TimeInitial time instant

Outputs

NameTypeDescription
buffer outputBufferInitialized buffer