This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The LinearInteraction component allows to model the interaction between two stocks A (portA) and B (portB) as linear equations:
Note: Capital letters were chosen to represent the stocks (state variables) connected at portA and portB in the formula above. Also dot notation is used for a stock's rate of flow—its first derivative with respect to time.
| Coefficient | Unit | Description |
|---|---|---|
a_0 |
base units for flow to A ( |
Rate of growth for stock A |
|
|
base units for flow to B ( |
Rate of growth for stock B |
|
|
1/s |
Fractional rate of growth for stock A |
|
|
1/s |
Fractional rate of growth for stock B |
|
|
base units for flow to A ( |
Rate of growth for stock A per stock B |
|
|
base units for flow to B ( |
Rate of growth for stock B per stock A |
The coefficients can be given as parameters or as variables via the expandable connector dataIn.
A linear harmonic oscillator can be modeled as a special case of linear interactions where the rates for the mutual influences (e.g., fractionalGrowthRate_B_per_A and fractionalGrowthRate_A_per_B) are negative. In that case, positive stock A will decrease stock B and vice versa.
The Linear Interaction can be used to model Strogatz' famous model for the dynamics of a love affair (conspicuously between "Romeo" and "Juliet") as shown in →LoveHateDynamics [16].
OutputType_A and OutputType_B will be used to conveniently set the types, e.g., units, of the parameters a_0,a_B and b_0, b_A.a_B might have rather convoluted units, e.g., base units of A/(base units of B.s). For convenient modeling, a_B will be divided by refB, which allows to use displayUnit should unit conversion be required. Since TypeB by default is set to Unspecified in most cases nothing needs to be done.b_A.NonlinearInteraction, ComplexInteraction
| Name | Description |
|---|---|
| Type selector for stock A (default = Unspecified) | |
| Type selector for stock B (default = Unspecified) | |
| Data bus for inputs |
Input_Connector defined as encapsulated expandable connector in v2.1.0.unspecified in v2.1.0.