forall(b);
The function returns true if all elements of the Boolean vector b are true. Otherwise, the function returns false.
The property is demonstrated with the following example calling the function as:
Boolean noCavitation = forall({p.p_a > p_cavitate for p in pumps})
results in
simulation result |
Note, the same result can be achieved with the min(..) built-in operator:
Boolean noCavitation2 = min(p.p_a > p_cavitate for p in pumps);
function forall extends Modelica.Icons.Function; input Boolean b[:] "Boolean vector"; output Boolean result "= true, if all elements of b are true"; end forall;