modelProportionalSwitching

Rate of exchange is proportional to amount in stocks

Extends from Interfaces.PartialFlows.BidirectionalFlow (Generic bi-directional flow between two stocks).

Information

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

ProportionalSwitching models the exchange of "mass" (conserved matter or information) between two stocks as a bi-directional flow. The rate of flow will be proportional to the amount in the connected levels times the fractional rate of flow given by the input u:

input u direction of flow (for positive levels)

rate of flow

u ≥ 0 flow from A to B

stockA.y ⋅ u

u <= 0 flow from B to A

stockB.y ⋅ |u|

Notes

  • Depending on the structural parameter useAbsoluteLevels the direction of flow may be reversed by negative amounts in the connected stocks, which is possible, if the stocks are information levels (material stocks by definition cannot become negative).

  • If material stocks are connected to the ProportionalSwitching element, then useAbsoluteLevels may be set to false as the amount in the stocks cannot become negative.

  • If information levels are connected via the ProportionalSwitching component, then the intended behavior has to be carefully chosen.

See also

Switching

Parameters

TypeNameDefaultDescription
Structural Parameters
BooleanuseAbsoluteLevelstrue= true, if the stock levels are to be taken als absolute values otherweise a negative amount in a stock may reverse the direction of flow

Connectors

TypeNameDefaultDescription
Connectors.FlowPortportA (from GenericFlow)Flow from/to Stock A
Connectors.FlowPortportB (from GenericFlow)Flow to/from Stock B
Interfaces.Connectors.RealInputuFractional rate input

Components

TypeNameDefaultDescription
RealOutputy (from ThreeSO_rate)Rate information
RealOutputy1 (from ThreeSO_rate)Rate information
RealOutputy2 (from ThreeSO_rate)Rate information