.BusinessSimulation.Flows.Interaction.LinearInteraction

Information

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:

Formula.svg

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 (OutputType_A)

Rate of growth for stock A

b_0

base units for flow to B (OutputType_B)

Rate of growth for stock B

a_A

1/s

Fractional rate of growth for stock A
(e.g., the self-coupling coefficient for A)

b_B

1/s

Fractional rate of growth for stock B
(e.g., the self-coupling coefficient for B)

a_B

base units for flow to A (OutputType_A)
per base units of B (TypeB)

Rate of growth for stock A per stock B
(e.g., the coupling-cofficient for B towards A)

b_A

base units for flow to B (OutputType_B)
per base units of A (TypeA)

Rate of growth for stock B per stock A
(e.g., the coupling-coefficient for A towards B)

The coefficients can be given as parameters or as variables via the expandable connector dataIn.


Examples

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].

Notes

See also

NonlinearInteractionComplexInteraction

Contents

NameDescription
 TypeAType selector for stock A (default = Unspecified)
 TypeBType selector for stock B (default = Unspecified)
 Input_ConnectorData bus for inputs

Revisions


Generated at 2024-11-26T19:26:15Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos