Skip to content
LIBRARY
Logical.GreaterThreshold.md

Logical.GreaterThreshold

Output y is true, if input u is greater than threshold.

The output is true if the Real input is greater than parameter threshold, otherwise the output is false.

This component extends from BlockComponents.Interfaces.PartialBooleanThresholdComparison

Usage

BlockComponents.Logical.GreaterThreshold(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)

Behavior

Source

dyad
"""
Output y is true, if input u is greater than threshold.

The output is **true** if the Real input is greater than parameter **threshold**, otherwise
the output is **false**.
"""
component GreaterThreshold
  extends BlockComponents.Interfaces.PartialBooleanThresholdComparison
relations
  y = u > threshold
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {
        "label": ">",
        "x": 500,
        "y": 500,
        "rot": 0,
        "attrs": {
          "font-size": "300",
          "font-weight": "bold",
          "font-family": "sans-serif",
          "fill": "#939598"
        }
      },
      {
        "label": "$(threshold)",
        "x": 500,
        "y": 820,
        "rot": 0,
        "attrs": {"font-size": "140", "fill": "#939598"}
      }
    ],
    "icons": {"default": "dyad://BlockComponents/BooleanComparison.svg"}
  }
}
end
Flattened Source
dyad
"""
Output y is true, if input u is greater than threshold.

The output is **true** if the Real input is greater than parameter **threshold**, otherwise
the output is **false**.
"""
component GreaterThreshold
  "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
  y = u > threshold
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {
        "label": ">",
        "x": 500,
        "y": 500,
        "rot": 0,
        "attrs": {
          "font-size": "300",
          "font-weight": "bold",
          "font-family": "sans-serif",
          "fill": "#939598"
        }
      },
      {
        "label": "$(threshold)",
        "x": 500,
        "y": 820,
        "rot": 0,
        "attrs": {"font-size": "140", "fill": "#939598"}
      }
    ],
    "icons": {"default": "dyad://BlockComponents/BooleanComparison.svg"}
  }
}
end


Test Cases

No test cases defined.