WOLFRAM SYSTEM MODELER

Sum

Sum of Integers: y = k[1]*u[1] + k[2]*u[2] + ... + k[n]*u[n]

Wolfram Language

In[1]:=
SystemModel["Modelica.Blocks.MathInteger.Sum"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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.

Parameters (2)

nu

Value: 0

Type: Integer

Description: Number of input connections

k

Value: fill(1, nu)

Type: Integer[nu]

Description: Input gains

Connectors (2)

u

Type: IntegerVectorInput[nu]

Description: Vector of Integer input signals

y

Type: IntegerOutput

Description: Integer output signal

Used in Examples (5)

IntegerNetwork1

Modelica.Blocks.Examples

Demonstrates the usage of blocks from Modelica.Blocks.MathInteger

Sample2

Modelica.Clocked.Examples.Elementary.IntegerSignals

Example of a Sample block for Integer signals with direct feed-through in the continuous-time and the clocked partition

AssignClock

Modelica.Clocked.Examples.Elementary.IntegerSignals

Example of an AssignClock block for Integer signals

AssignClockVectorized

Modelica.Clocked.Examples.Elementary.IntegerSignals

Example of an AssignClockVectorized block for Integer signals

UpSample

Modelica.Clocked.Examples.Elementary.IntegerSignals

Example of an UpSample block for Integer signals