modelSplitFlow

Splitting a flow into n flows

Information

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

Using →SplitFlow this component allows to split a flow connected to the stock port portA into nout outflows (portB[nout]); nout is implicitly determined by the length of the vector of split factors splitFactors[:] (parameters). The vecotor of split factors is multiplied either with the scalar 1 (hasFactor = false) or an exogenous scalar u (hasFactor = true). Upon setting hasRateOutput = true the component will report the current rates of flow via a vector output connector (y[nout]).

Notes

  • If isSplit = true negative factors are set to zero and the vector of factors is normalized to add up to one.

Parameters

TypeNameDefaultDescription
RealsplitFactors{1, 1}Split factors
Initialization
Integernoutsize(splitFactors, 1)Number of outflows the inflow is split into
Structural Parameters
BooleanhasFactorfalse= true, if coefficients are to be multiplied with input u
BooleanhasRateOutputfalse= true, if the rate is reported via real output connectors
BooleanisSplittrue= true, if the input given is assumed to be weights (adding up to one) splitting the flow

Connectors

TypeNameDefaultDescription
Interfaces.Connectors.StockPortportA
Interfaces.Connectors.FlowMultiPortportB
Interfaces.Connectors.RealMultiOutputyOutput of current rate of flow
Interfaces.Connectors.RealInputuFactor input

Revisions

  • Introduced in v2.0.0.