PropertyToInteger block
Requirements.LogicalBlocks.PropertyToInteger
ยท source
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 = Violated 1 Undecided 2 Satisfied 3 Undefined 4
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
| Name | Type | Description |
|---|---|---|
u | Requirements.Interfaces.PropertyInput | Property input signal |
y | Modelica.Blocks.Interfaces.IntegerOutput | Integer output signal (values 1,2,3,4) |