PropertyToBoolean function

Requirements.LogicalFunctions.PropertyToBoolean  ยท source

Icon of PropertyToBoolean

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

NameTypeDescription
u inputRequirements.Types.PropertyProperty to be mapped to Boolean
undecided inputBooleanBoolean value of Property.Undecided
undefined inputBooleanBoolean value of Property.Undefined (not applicable)

Outputs

NameTypeDescription
y outputBooleanBoolean as Property