PropertyToInteger block

Requirements.LogicalBlocks.PropertyToInteger  ยท source

Icon of PropertyToInteger

Convert Property (Violated, Undecided, Satisfied, Undefined) to Integer (1,2,3,4)

Extends Interfaces.PartialConversion

The Property input u is converted to an Integer output y according to the following table:

Property u =Integer y =
Violated1
Undecided2
Satisfied3
Undefined4

The output is the ordinal number Integer(u) of the enumeration value, which is, for example, convenient to plot a Property signal. The inverse conversion is IntegerToProperty; the function version is LogicalFunctions.PropertyToInteger.

This block is demonstrated with example Conversions.

Components and variables

NameTypeDescription
uRequirements.Interfaces.PropertyInputProperty input signal
yModelica.Blocks.Interfaces.IntegerOutputInteger output signal (values 1,2,3,4)