During block

Requirements.ChecksInFixedWindow.During  ยท source

Icon of During

In every true condition phase, check must be true

Extends Requirements.Interfaces.PartialCheck, Requirements.Interfaces.PartialUncertaintyBand

Syntax

property = During(condition=..., check=...).y;

Description

In every duration where the Boolean input condition is true, the Boolean input check must be true. During a true condition phase, property output y = Satisfied if check = true, and Violated if check = false. During a false condition phase, property output y = Undefined (the check is not applicable).

Violated, Undecided, and Satisfied are elements of enumeration Property.

Uncertainty band

With useUncertainty = true (version 0.19.0), inputs rhoLow and rhoHigh are rho at the pessimistic and the optimistic end of the checked value's uncertainty interval, and output inBand is true while the condition is true and rhoLow < 0 ≤ rhoHigh: the verdict could flip inside the interval. y and margin are unchanged. See PartialUncertaintyBand and the examples in Examples.Uncertainty.

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, the input rho (the caller writes it from the check's expression, u − limit for check = u > limit; the default ±1 carries the sign only), 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.

Inputs

NameTypeDescription
rho inputRealSigned distance of check to its limit in the quantity's unit, >= 0 exactly when check is true (u - limit for check = u > limit); the default +-1 is uninformative