blockMaxDuration
In every sliding time window, the longest time duration where check was permanently 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
maxDurationLimited = MaxDuration(check=..., window=..., upperLimit=...).y;
Description
In any (sliding) time window of length window, the longest time duration where the Boolean input check was permanently true (= maxDuration) must be ≤ parameter upperLimit. Whenever this property is fulfilled, Boolean output y = true, otherwise y = false:
y = maxDuration ≤ upperLimit;
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 | upperLimit | In sliding time window, maxDuration(check=true) <= upperLimit required |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanOutput | y (from PartialCheckInSlidingWindowWithBooleanOutput) | = true if property satisfied, otherwise false | |
| Modelica.Blocks.Interfaces.RealOutput | maxDuration | Longest time duration in the sliding time window where check was permanently true |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | check (from PartialCheckInSlidingWindowWithBooleanOutput) | Boolean to check |
