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 = truenegative factors are set to zero and the vector of factors is normalized to add up to one.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | splitFactors | {1, 1} | Split factors |
| Initialization | |||
| Integer | nout | size(splitFactors, 1) | Number of outflows the inflow is split into |
| Structural Parameters | |||
| Boolean | hasFactor | false | = true, if coefficients are to be multiplied with input u |
| Boolean | hasRateOutput | false | = true, if the rate is reported via real output connectors |
| Boolean | isSplit | true | = true, if the input given is assumed to be weights (adding up to one) splitting the flow |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.Connectors.StockPort | portA | ||
| Interfaces.Connectors.FlowMultiPort | portB | ||
| Interfaces.Connectors.RealMultiOutput | y | Output of current rate of flow | |
| Interfaces.Connectors.RealInput | u | Factor input |
Revisions
- Introduced in v2.0.0.