IntegerToProperty block

Requirements.LogicalBlocks.IntegerToProperty  ยท source

Icon of IntegerToProperty

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

Extends Interfaces.PartialConversion

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

Integer u =Property y =
1Violated
2Undecided
3Satisfied
4Undefined

An assert is triggered if the input is not 1, 2, 3 or 4. The inverse conversion is PropertyToInteger; the function version is LogicalFunctions.IntegerToProperty.

This block is demonstrated with example Conversions.

Components and variables

NameTypeDescription
uModelica.Blocks.Interfaces.IntegerInputInteger input signal (with only values 1,2,3,4)
yRequirements.Interfaces.PropertyOutputProperty output signal