AllTrue model
Requirements.Examples.Elementary.LogicalBlocks.AllTrue
ยท source
Example for AllTrue (output is true if all inputs are true)
Extends Modelica.Icons.Example
Using logical block AllTrue as
results in
![]() | |
| simulation result |
The three inputs of allTrue1 are a constant true, a Boolean step to true at 2 s and a Boolean pulse of
period 1.5 s that starts at 1.5 s. The output is the logical and of the inputs: it is false before 2 s, because the
step input is still false, and follows the pulse from 2 s on. The number of inputs is set by nu = 3.
Components and variables
| Name | Type | Description |
|---|---|---|
booleanStep | Modelica.Blocks.Sources.BooleanStep | Boolean step to true at 2 s |
booleanPulse | Modelica.Blocks.Sources.BooleanPulse | Boolean pulse with period 1.5 s, starting at 1.5 s |
const1 | Requirements.Sources.BooleanConstant | Constant true input |
allTrue1 | Requirements.LogicalBlocks.AllTrue | True if all three inputs are true |

