Store an element on the sliding window buffer and remove elements that are older as the window length
function push import Modelica.Utilities.Streams.print; input Buffer buffer "Memory of sliding window"; input Real t "Time instant of v to be stored in buffer"; input Boolean b = false "Value b at time instant t to be stored in buffer"; output Buffer newBuffer "Updated memory of sliding window"; end push;