blockMaxAccumulatedDuration

In every sliding time window, the accumulated time duration where check was true must be below an upper limit

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

accumulatedDurationLimited = MaxAccumulatedDuration(check=..., window=..., upperLimit=...).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 upperLimit. Whenever this property is fulfilled, Boolean output y = true, otherwise y = false:

y =  accumulatedDuration ≤ upperLimit;

Example

The property is demonstrated with the following example calling the block as:

results in

simulation result

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.Timewindow (from PartialCheckInSlidingWindowWithBooleanOutput)Length of sliding time window (> 0)
Modelica.Units.SI.TimeupperLimitIn sliding time window, accumulatedDuration(check=true) <= upperLimit required

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanOutputy (from PartialCheckInSlidingWindowWithBooleanOutput)= true if property satisfied, otherwise false
Modelica.Blocks.Interfaces.RealOutputaccumulatedDurationAccumulated time duration in the sliding time window where check was true

Components

TypeNameDefaultDescription
Booleancheck (from PartialCheckInSlidingWindowWithBooleanOutput)Boolean to check