.Modelica_Requirements.LogicalFunctions.forall

Information

Syntax

forall(b);

Description

The function returns true if all elements of the Boolean vector b are true. Otherwise, the function returns false.

Example

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);

Interface

function forall
  extends Modelica.Icons.Function;
  input Boolean b[:] "Boolean vector";
  output Boolean result "= true, if all elements of b are true";
end forall;

Generated at 2024-04-25T18:15:59Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos