.CRML.Requirements.CheckCountEqual

Information

Syntax

y = CheckCountEqual(u = condition, threshold=threshold, tl = time_period);

Description

Each instance of this block creates a requirement that evaluates whether the number of events on u is equal to the threshold at the end of 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 of y is undecided within the time period tl until the decision whether the condition is satisfied can be made. Then it is true or false.

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