ComplexInteractionInteraction with linear and nonlinear terms |
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
Using →ComplexInteraction
this component allows to logically connect two flows influencing two stocks A (connected to portA
) and B (connected to portB
). The formula for the resulting flows (using Newton's dot notation) has linear and nonlinear terms:
The coefficients are given by parameters, which are multiplied either with 1 (hasFactor = false
) or an exogenous factor u (hasFactor = true
). Upon setting hasRateOutput = true
the component will report the current rate of flows via output connectors (y_A, y_B
).
a_0 = -1, b_0 = 1
(other coefficients set to zero), and hasFactor = true
a bidirectional flow can be modeled, whose rate is given by the input u (positive inputs indicate a flow from A to B).a_0 = -1, b_0 = f
(other coefficients set to zero), and hasFactor = true
a broken transition can be modeled, with the proportionality factor f indicating units of B per unit of A.polA
and polB
allow to give visual cues with regard to polarity in the diagram.polA |
Value: "±" Type: String Description: Polarity portA |
---|---|
polB |
Value: "±" Type: String Description: Polarity portB |
hasFactor |
Value: false Type: Boolean Description: = true, if coefficients are to be multiplied with input u |
hasRateOutput |
Value: false Type: Boolean Description: = true, if the rate is reported via real output connectors |
a_0 |
Value: Type: Rate (1/s) Description: Growth rate for A (independent) |
a_A |
Value: Type: Rate (1/s) Description: Fractional rate of growth for A (self-coupling A) |
a_B |
Value: Type: Rate (1/s) Description: Rate of growth for A per unit of B (coupling of B to A) |
a_AB |
Value: Type: Rate (1/s) Description: Fractional rate of growth for A per unit of B (nonlinear coupling) |
b_0 |
Value: Type: Rate (1/s) Description: Growth rate for B (independent) |
b_B |
Value: Type: Rate (1/s) Description: Fractional growth rate for B (self-coupling) |
b_A |
Value: Type: Rate (1/s) Description: Rate of growth for B per unit of A (coupling of A to B) |
b_AB |
Value: Type: Rate (1/s) Description: Fractional growth rate for B per unit of A (nonlinear coupling) |
portA |
Type: FlowPort Description: Used to represent stock and flow connections |
|
---|---|---|
portB |
Type: FlowPort Description: Used to represent stock and flow connections |
|
u |
Type: RealInput Description: Factor input |
|
y_A |
Type: RealOutput Description: Output of current rate of flow for port A |
|
y_B |
Type: RealOutput Description: Output of current rate of flow for port B |
|
one |
Type: RealOutput Description: Default factor |
|
y_a0 |
Type: RealOutput Description: Output signal |
|
dataIn |
Type: InputConnector Description: Data bus for inputs |
|
y_aA |
Type: RealOutput Description: Output signal |
|
y_aB |
Type: RealOutput Description: Output signal |
|
y_aAB |
Type: RealOutput Description: Output signal |
|
y_b0 |
Type: RealOutput Description: Output signal |
|
y_bA |
Type: RealOutput Description: Output signal |
|
y_bB |
Type: RealOutput Description: Output signal |
|
y_bAB |
Type: RealOutput Description: Output signal |
complexInteraction |
Type: ComplexInteraction Description: Combined linear and nonlinear interaction |
|
---|---|---|
actualCoefficients |
Type: ScalarMultiplication Description: Multiplication of a vector with a scalar |
|
constantCoefficients |
Type: ConstantConverter Description: A list of constant values is turned into a constant vector of signals |