blockMinAccumulatedDuration2
Extends from Interfaces.PartialCheckInSlidingWindowWithBooleanOutput (Interfaces and icon for check block that evaluates a property in a sliding time window and returns the result as Boolean).
Information
Syntax
property = MinAccumulatedDuration2(check=..., window=..., lowerLimit=...).y;
Description
In any (sliding) time window of length window, the accumulated time duration where the Boolean input check was true (= accumulatedDuration) must be ≥ parameter lowerLimit. Whenever this property is fulfilled, Boolean output y = true. If this property is not fulfilled at the end of a sliding time window, y = false (even at the first window):
y = if accumulatedDuration ≥ lowerLimit then Satisfied else
(if first then Undecided else Violated);
Violated, Undecided, and Satisfied are elements of enumeration Property.
Example
The property is demonstrated with the following example calling the block as:
results in
![]() |
|
| simulation result |
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | window (from PartialCheckInSlidingWindowWithBooleanOutput) | Length of sliding time window (> 0) | |
| Modelica.Units.SI.Time | lowerLimit | In sliding time window, accumulatedDuration(check=true) >= lowerLimit required |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanOutput | y (from PartialCheckInSlidingWindowWithBooleanOutput) | = true if property satisfied, otherwise false | |
| Modelica.Blocks.Interfaces.RealOutput | accumulatedDuration | Accumulated time duration in the sliding time window where check was true |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | check (from PartialCheckInSlidingWindowWithBooleanOutput) | Boolean to check |
