LogicalBlocks package
Requirements.LogicalBlocks
ยท source
Library of logical blocks (2-/4-valued logical operators with and without memory)
Extends Modelica.Icons.Package
This package contains input/output blocks that operate on Boolean and Property signals (4-valued logic: Violated, Undecided, Satisfied, Undefined). The blocks are used to build the condition and check signals of requirements graphically. The package contains:
- Conversion blocks between Boolean, Integer and Property: BooleanToProperty, IntegerToProperty, PropertyToBoolean, PropertyToInteger.
- Comparisons of a Real signal with thresholds: GreaterThreshold, GreaterEqualThreshold, LessThreshold, LessEqualThreshold, WithinBand.
- Boolean operators over a vector of inputs: AnyTrue (or), AllTrue (and).
- 4-valued Property operators: PropertyNot, PropertyOr, PropertyAnd (based on the functions in LogicalFunctions).
- Blocks with memory: DelayedRising and FallingEdgeTerminate.
The blocks are demonstrated in Examples.Elementary.LogicalBlocks.
Contents
| Name | Kind | Description | |
|---|---|---|---|
| BooleanToProperty | block | Convert Boolean (false,true) to Property (Violated, Satisfied) | |
| IntegerToProperty | block | Convert Integer (1,2,3,4) to Property (Violated, Undecided, Satisfied, Undefined) | |
| PropertyToBoolean | block | Convert Property (Violated, Undecided, Satisfied, Undefined) to Boolean (false, true) | |
| PropertyToInteger | block | Convert Property (Violated, Undecided, Satisfied, Undefined) to Integer (1,2,3,4) | |
| GreaterThreshold | block | Output y is true if input u is greater than threshold | |
| GreaterEqualThreshold | block | Output y is true if input u is greater or equal than threshold | |
| LessThreshold | block | Output y is true if input u is less than threshold | |
| LessEqualThreshold | block | Output y is true if input u is less or equal than threshold | |
| WithinBand | block | Output y is true if input u is within a lower and upper threshold | |
| DelayedRising | block | Output y is true after a duration of a rising input edge and false after a falling input edge | |
| AnyTrue | block | Output y is true if at least on input is true (\"or\" of all inputs) | |
| AllTrue | block | Output y is true if all inputs are true (\"and\" of all inputs) | |
| PropertyNot | block | 4-valued logic 'not' of Property input u: y = not4(u) | |
| PropertyOr | block | 4-valued logic 'or' of Property input u: y = or4All(u) = u[1] or u[2] or ... or u[nu] | |
| PropertyAnd | block | 4-valued logic 'and' of Property input u: y = and4All(u) = u[1] and u[2] and ... and u[nu] | |
| FallingEdgeTerminate | block | Terminate simulation when a falling edge of the input u occurs |