blockNumberOfRequests
Outputs the number of signals that are above/below a certain threshold
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Information
Block that outputs the number of inputs that exceed a threshold.
The parameter kind is used to determine the kind of the
inequality. The table below shows the allowed settings.
Value of parameter kind |
Output signal incremented by 1 for each i ∈ {1, ..., nin} if |
|---|---|
| 0 | u[i] > threShold |
| 1 | u[i] ≥ threShold |
| 2 | u[i] ≤ threShold |
| 3 | u[i] < threShold |
This model may be used to check how many rooms exceed a temperature threshold.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nin | Number of inputs | |
| Real | threShold | 0 | Threshold |
| Integer | kind | Set to 0 for u>threShold, to 1 for >=, to 2 for <= or to 3 for < |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.IntegerOutput | y | Number of input signals that violate the threshold | |
| Modelica.Blocks.Interfaces.RealInput[nin] | u | Input signals |
Revisions
-
November 21, 2011, by Michael Wetter:
Improved documentation. -
November 25, 2008, by Michael Wetter:
First implementation.