cardSatisfied function
Requirements.LogicalFunctions.cardSatisfied
· source
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
| Date | Description |
|---|---|
| Sept. 14, 2026 | Reduction 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
| Name | Type | Description |
|---|---|---|
p[…] input | Property | Property vector |
Outputs
| Name | Type | Description |
|---|---|---|
result output | Integer | Number of Property.Satisfied entries |
