.CRML.Requirements.CheckAnytime

Information

Syntax

y = CheckAnytime(u = condition, tl = time_period);

Description

Each instance of this block creates a requirement that evaluates whether the condition u is satisfied (true) as soon as u becomes true within the time period tl (which can be a continuous or discrete time period). The condition is a Boolean4 that takes its values in the { true, false, undecided, undefined } set. The value y is true as long as the condition u is true within the time period tl. When u becomes false, then y becomes false, and stays always false whatever the subsequent values of u. Therefore if u is never undecided, y is never undecided.

To create continuous time locators, refer to the ContinuousTimeLocator block. To create discrete time locators, refer to the DiscreteTimeLocator block.

The value of a requirement is a Boolean4 that can be used as input of another Ensure block. It is therefore possible to express requirements on requirements.

Requirements can be combined using Boolean4 operators, refer to the Logical4 package.

The condition u can be generated by converting Boolean signals to Boolean4 signals with the block BooleanToBoolean4, or by using the output y of another requirement block.


Example

This block is demonstrated with the following example:


Generated at 2026-04-01T18:18:38Z by OpenModelicaOpenModelica 1.26.3 using GenerateDoc.mos