Skip to content
LIBRARY
Interfaces.PartialBooleanThresholdComparison.md

Interfaces.PartialBooleanThresholdComparison

Partial block to compare the Real input u with a threshold and provide the result as 1 Boolean output signal.

Block has one Real input and one Boolean output signal as well as a 3D icon (e.g., used in Blocks.Logical library).

Usage

BlockComponents.Interfaces.PartialBooleanThresholdComparison(threshold=0)

Parameters:

NameDescriptionUnitsDefault value
thresholdComparison with respect to threshold0

Connectors

  • u - This connector represents a real signal as an input to a component (RealInput)

  • y - This connector represents a boolean signal as an output from a component (BooleanOutput)

Source

dyad
"""
Partial block to compare the Real input u with a threshold and provide the result as 1 Boolean output signal.

Block has one Real input and one Boolean output signal
as well as a 3D icon (e.g., used in Blocks.Logical library).
"""
partial component PartialBooleanThresholdComparison
  "Connector of Real input signal"
  u = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -110, "y1": 450, "x2": -10, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Connector of Boolean output signal"
  y = BooleanOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Comparison with respect to threshold"
  parameter threshold::Real = 0
relations
metadata {"Dyad": {"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}]}}
end
Flattened Source
dyad
"""
Partial block to compare the Real input u with a threshold and provide the result as 1 Boolean output signal.

Block has one Real input and one Boolean output signal
as well as a 3D icon (e.g., used in Blocks.Logical library).
"""
partial component PartialBooleanThresholdComparison
  "Connector of Real input signal"
  u = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -110, "y1": 450, "x2": -10, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Connector of Boolean output signal"
  y = BooleanOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Comparison with respect to threshold"
  parameter threshold::Real = 0
relations
metadata {"Dyad": {"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}]}}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses