cardSatisfied function

Requirements.LogicalFunctions.cardSatisfied  · source

Icon of cardSatisfied

Returns the number of elements of a Property vector that are Satisfied

Extends Requirements.Interfaces.PropertyFunction

Syntax

nSatisfied = cardSatisfied(p);

Description

This function returns the number of Satisfied-elements of Property vector p.

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

Example

This function is demonstrated with the following example calling the function as:

nSatisfied = cardSatisfied( p )
simulation result

Revisions

DateDescription
Sept. 14, 2026Reduction written over the indices 1:size(.,1) instead of over the elements; the same count, and it compiles in Modelon Impact, which fails to scalarize the element form (H. Tummescheit, Model Based Innovation LLC)

Inputs

NameTypeDescription
p[…] inputPropertyProperty vector

Outputs

NameTypeDescription
result outputIntegerNumber of Property.Satisfied entries