SplitFlowSplitting an arbitrary flow into n subflows |
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The flow connected to the stock port (stockPort
) will be split or broken into n = nout
flows. This is a rather generic component, so that the input vector u of weights or factors may add up to 1 (the flow is split into n components that in sum will match the aggregate flow) or not.
When the factors do not add up to 1, the structure can be used to describe some kind of multiple-production from one main effort, e.g., the flow of work hours per period may be used to produce n products according to a productivity ratio ( products per work hour ).
stockPort
. If a negative rate at stockPort
splits an inflow to a stock, then several stocks connected to flowPort
will be drained.stopInflow
and stopOutflow
signals at its flowPort
, so that if any of these are true
, the corresponding signal will be set to true
at the stockPort side.weights |
Value: ones(nout) Type: Real[nout] Description: Constant weights for splitting (optional) |
---|---|
nout |
Value: 2 Type: Integer Description: Number of flows to split into |
hasConstantWeights |
Value: false Type: Boolean Description: = true, if the weights are constant parameters |
isSplit |
Value: true Type: Boolean Description: = true, if the input given is assumed to be weights (adding up to one) splitting the flow |
shiftInputs |
Value: false Type: Boolean Description: = true, if all values are to be shifted to prevent negative inputs, otherwise negative inputs are simply set to zero (proportionalSplitFactors.shiftInputs) |
y |
Type: RealMultiOutput[nout] Description: Rates of the split flows |
|
---|---|---|
stockPort |
Type: StockPort Description: Connected to incoming flow to be split or broken up |
|
flowPort |
Type: FlowMultiPort[nout] Description: n-dimensional array of outgoing flows |
|
u |
Type: RealMultiInput[nout] Description: Vector of weights for the splits or breaks |
proportionalSplitFactors |
Type: ProportionalSplitFactors Description: Split factors adding up to one |
|
---|---|---|
unchangedInput |
Type: PassThrough[nout] Description: Output is identical to input |
|
sensor_A |
Type: StockPortSensor_Control Description: Measuring the flow and seting the flags |
|
sensor_B |
Type: FlowPortSensor_Control[nout] Description: Measuring stock level and Boolean flags |
|
stopInflow |
Type: AnyTrue Description: Logical 'any true' |
|
stopOutflow |
Type: AnyTrue Description: Logical 'any true' |
|
parWeights |
Type: ConstantConverter Description: Constant weights for splitting (optional) |
|
splitFlows |
Type: Switching[nout] Description: The splitted outflow |
|
cloudOutflow |
Type: Cloud Description: Cloud connected to the aggregate outflow |
|
cloudBrokenFlow |
Type: Cloud[nout] Description: Clouds connected to the broken flows |
|
splitRates |
Type: ScalarMultiplication Description: The rates for the split flows |
BusinessSimulation.CausalLoop Splitting a flow into n flows |
|
BusinessSimulation.Flows.Unidirectional The outflow from a dynamic stock is split into n outflows proportional to the weights given |