.Modelica.Blocks.MathInteger.Sum

Information

This blocks computes the scalar Integer output "y" as sum of the elements of the Integer input signal vector u:

y = k[1]*u[1] + k[2]*u[2] + ... k[N]*u[N];

The input connector is a vector of Integer input signals. When a connection line is drawn, the dimension of the input vector is enlarged by one and the connection is automatically connected to this new free index (thanks to the connectorSizing annotation).

The usage is demonstrated, e.g., in example Modelica.Blocks.Examples.IntegerNetwork1.

If no connection to the input connector "u" is present, the output is set to zero: y=0.


Generated at 2024-04-26T18:16:04Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos