PropertyToBoolean function
Requirements.LogicalFunctions.PropertyToBoolean
ยท source
Convert Property (Violated, Undecided, Satisfied, Undefined) to Boolean (false, true)
Extends Modelica.Icons.Function
Syntax
y = PropertyToBoolean(u);
y = PropertyToBoolean(u, undecided);
y = PropertyToBoolean(u, undecided, undefined);
Description
The function converts a value u of enumeration Property to a Boolean:
- Satisfied is mapped to true.
- Undecided is mapped to the value of input
undecided(default: false). - Undefined is mapped to the value of input
undefined(default: false). - Violated is mapped to false.
The reverse conversion is BooleanToProperty. The block version of this conversion, with the same two choices as parameters, is LogicalBlocks.PropertyToBoolean.
Revisions
2026-12-03, Model Based Innovation LLC: optional input undefined (default false, the previous
result), as parameter undefined of the block LogicalBlocks.PropertyToBoolean.
Inputs
| Name | Type | Description |
|---|---|---|
u input | Requirements.Types.Property | Property to be mapped to Boolean |
undecided input | Boolean | Boolean value of Property.Undecided |
undefined input | Boolean | Boolean value of Property.Undefined (not applicable) |
Outputs
| Name | Type | Description |
|---|---|---|
y output | Boolean | Boolean as Property |