MinAccumulatedDuration model
Requirements.Examples.Elementary.ChecksInSlidingWindow.MinAccumulatedDuration
ยท source
Example for MinAccumulatedDuration (in every sliding time window, the accumulated time duration where check was true must be above a lower limit)
Extends Modelica.Icons.Example
Using sliding time window check block MinAccumulatedDuration as
results in
![]() | |
| simulation result |
The signal check is true on [1, 3.3), [5.2, 5.4), [5.6, 5.8), [6, 8), [9.1, 10.5) and [11.5, 12) s.
minAccDuration uses a sliding time window of window = 2 s and requires that, within every
window, check was true for at least lowerLimit = 1 s in total. In contrast to
MinDuration, the short
true phases are added up, so a window may fulfil the requirement without containing one long true phase.
Components and variables
| Name | Type | Description |
|---|---|---|
check | Modelica.Blocks.Sources.BooleanTable | Signal whose true phases are monitored |
minAccDuration | Requirements.ChecksInSlidingWindow.MinAccumulatedDuration | In every 2 s window, check must be true for at least 1 s in total |

