PropertyToInteger function

Requirements.LogicalFunctions.PropertyToInteger  ยท source

Icon of PropertyToInteger

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

Extends Modelica.Icons.Function

Syntax

y = PropertyToInteger(u);

Description

The function converts a value u of enumeration Property to its ordinal number Integer(u):

  • Violated = 1,
  • Undecided = 2,
  • Satisfied = 3,
  • Undefined = 4.

This is, for example, useful to plot a Property or to store it in an Integer signal. The reverse conversion is IntegerToProperty; the block version is LogicalBlocks.PropertyToInteger.

Inputs

NameTypeDescription
u inputRequirements.Types.PropertyProperty to be mapped to Integer

Outputs

NameTypeDescription
y outputIntegerInteger as Property