---
url: /dyad/stable/stdlib/BlockComponents/types/Interfaces.PartialBooleanThresholdComparison.md
description: >-
  Dyad Interfaces.PartialBooleanThresholdComparison docs.  Partial block to
  compare the Real input u with a threshold and provide the result as 1 Boolean
  output signal.
---

# `Interfaces.PartialBooleanThresholdComparison` {#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 {#Usage}

`BlockComponents.Interfaces.PartialBooleanThresholdComparison(threshold=0)`

## Parameters: {#Parameters:}

|        Name |                          Description | Units | Default value |
| -----------:| ------------------------------------:| -----:| -------------:|
| `threshold` | Comparison with respect to threshold |     – |             0 |

## Connectors {#Connectors}

* `u` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `y` - This connector represents a boolean signal as an output from a component ([`BooleanOutput`](/stdlib/Dyad/connectors/BooleanOutput#BooleanOutput))

## Source {#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
```

```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 {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
