BandDuration block
Requirements.ChecksInFixedWindow.BandDuration
ยท source
In every true condition phase, check must be true for at least a minimum duration and at most a maximum duration
Extends Requirements.Interfaces.PartialCheck
Syntax
property = BandDuration(condition=..., check=..., durationMin=..., durationMax=...).y;
Description
In every duration where the Boolean input condition is true, the Boolean input check must be true at least for the time span defined by parameter durationMin and for at most the time span defined by parameter durationMax. Whenever this property is fulfilled, property output y = Satisfied. If this property is not fulfilled during a true condition phase, property output y = Violated. If condition=true and durationMin=0 during initialization, property output y = Satisfied, if condition=true and durationMin>0 then y = Undecided, and if condition=false then y = Undefined (not applicable). Output y keeps its value, until one of the above conditions occur.
Violated, Undecided, and Satisfied are elements of enumeration Property.
Example
This block is demonstrated with the following example:
results in
![]() | |
| simulation result |
Margin
Output margin (present if computeMargin = true, the default) is the signed distance of the check
to its limit, min(duration - durationMin, durationMax - duration) with output duration the running accumulated duration of the phase, divided by parameter scale: margin ≥ 0 exactly when the check holds,
margin = 1 is one scale of headroom, margin < 0 a violation by that many. Set scale to the
requirement's tolerance so that margins of different requirements compare; with the default scale = 1 the margin
is the raw robustness in the quantity's unit. The block computes the instantaneous value only; the worst value
over a run and the instant it occurs are taken from the stored trajectory.
During a phase in which the property is still Undecided the margin is provisional (the duration is still accumulating); a consumer takes the worst value over the decided points only.
Parameters
| Name | Type | Description |
|---|---|---|
durationMin parameter | SI.Time | Minimum duration |
durationMax parameter | SI.Time | Maximum duration |
Components and variables
| Name | Type | Description |
|---|---|---|
duration | Modelica.Blocks.Interfaces.RealOutput | Accumulated time in the current (or last) true condition phase in which check was true |

