ArithmeticMean

(Weighted) arithmetic mean

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The scalar output y is obtained as a convex combination of the components of the input vector u:

y = sum_i u[i] w[i]

Notes

  • If useWeights = false then all weights are assumed to be one.

  • Weights will be normalized to add up to one; negative weights will be set to zero.

See also

arithmeticMean, GeometricMean

Parameters (4)

nin

Value: 2

Type: Integer

Description: Number of input signals

weights

Value: ones(nin)

Type: Real[nin]

Description: Weights to be used for inputs

useWeights

Value: false

Type: Boolean

Description: = true, if the output is to be a weighted arithmetic mean

hasConstantWeights

Value: true

Type: Boolean

Description: = true, if the weights are constant

Connectors (5)

y

Type: RealOutput

Description: Output signal

u

Type: RealMultiInput[nin]

Description: Input

u_weights

Type: RealMultiInput[nin]

Description: Input of weights

constWeights

Type: RealMultiInput[nin]

Description: Multiple input signals

w

Type: RealMultiOutput[nin]

Description: Multiple output signals

Used in Components (1)

AggregatePerformance

BusinessSimulation.MoleculesOfStructure.InformationProcessing

Aggregate the information received from a set of performance indicators