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

TypeNameDefaultDescription
IntegerninNumber of inputs
RealthreShold0Threshold
IntegerkindSet to 0 for u>threShold, to 1 for >=, to 2 for <= or to 3 for <

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.IntegerOutputyNumber of input signals that violate the threshold
Modelica.Blocks.Interfaces.RealInput[nin]uInput signals

Revisions

  • November 21, 2011, by Michael Wetter:
    Improved documentation.
  • November 25, 2008, by Michael Wetter:
    First implementation.