MaxAccumulatedDuration model
Requirements.Examples.Elementary.ChecksInSlidingWindow.MaxAccumulatedDuration
ยท source
Example for MaxAccumulatedDuration (in every sliding time window, the accumulated time duration where check was true must be below an upper limit)
Extends Modelica.Icons.Example
Using sliding time window check block AccumulatedMaxDuration as
results in
![]() | |
| simulation result |
The signal check is true on [1, 3.3), [5.2, 5.4), [5.6, 5.8), [6, 8), [8.2, 8.4), [8.6, 9.1),
[10.5, 11.5) s and from 12 s on. maxAccDuration uses a sliding time window of window = 2 s
and requires that, within every window, check was true for at most upperLimit = 1 s in total. In contrast
to MaxDuration, several
short true phases in one window are added up and can together exceed the limit.
Components and variables
| Name | Type | Description |
|---|---|---|
check | Modelica.Blocks.Sources.BooleanTable | Signal whose true phases are monitored |
maxAccDuration | Requirements.ChecksInSlidingWindow.MaxAccumulatedDuration | In every 2 s window, check may be true for at most 1 s in total |

