modelNonlinearInteraction
Extends from Interfaces.Basics.GenericFlow (Flow Template with two FlowPorts), Interfaces.Basics.Interaction4SO (Output connectors for interaction elements reporting rates), Icons.Interaction (Icon for interactional flow classes).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The NonlinearInteraction can be used by itself or in combination with the →LinearInteraction flow to model more complex interactions. The netflows to the connected stocks A (portA) and B (portB) are given by the following 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_AB |
1 per second per base unit of B ( TypeB) |
Factor used to determine the net flow to A |
b_AB |
1 per second per base unit of A ( TypeA |
Factor used to determine the net flow to B |
The coefficients can be given as parameters or as variables via the expandable connector dataIn.
Examples
A nonlinear component is typically found in predator-prey models or models of infectious diseases, where the exponential growth rate for a population depends upon the size of another population (e.g., prey or susceptible population).
Notes
- When this component is used with stocks that have "simple" units, e.g.,
Amount [each]then it is rather straight forward to enter a fractional rate per unit of A or B for the parametersa_AB, b_ABand we can in fact leaveTypeA, TypeB, refA, refBat their default values. - In cases, where we want to specify a fractional rate per some
displayUnitfor one of the stocks, we can use the type selectorsTypeA, TypeBto select the appropriate units for the connected stocks and then set the references valuesrefA, refBusing whateverdisplayUnitwe want.
See also
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Rate | a_AB | unspecified | Constant fractional rate for the netflow to A per unit of B (nonlinear coupling factor) |
| TypeB | refB | 1 | Reference value for B, i.e., divisor for the fractional rate a_AB |
| Rate | b_AB | unspecified | Constant fractional rate for the netflow to B per unit of A (nonlinear coupling factor) |
| TypeA | refA | 1 | Reference value for A, i.e., divisor for the fractional rate b_AB |
| Structural Parameters | |||
| Boolean | hasConstantFactorA | false | = true, if the coupling factor for A is given by the constant parameter |
| Boolean | hasConstantFactorB | false | = true, if the coupling factor for B is given by the constant parameter |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.FlowPort | portA (from GenericFlow) | Flow from/to Stock A | |
| Connectors.FlowPort | portB (from GenericFlow) | Flow to/from Stock B | |
| RealOutput_B | y_B (from Interaction4SO) | Rate for flow to and from B (positive value indicates inflow) | |
| RealOutput_B | y1_B (from Interaction4SO) | Rate for flow to and from B (positive value indicates inflow) | |
| RealOutput_A | y1_A (from Interaction4SO) | Rate for flow to and from A (positive value indicates inflow) | |
| RealOutput_A | y_A (from Interaction4SO) | Rate for flow to and from A (positive value indicates inflow) | |
| InputConnector | dataIn |
Contents
| Name | Description |
|---|---|
| TypeA | Type selector for stock A |
| TypeB | Type selector for stock B |
| Data bus for inputs |
Revisions
InputConnectordefined asencapsulated expandable connectorin v2.1.0.- Values for optional parameters changed to
unspecifiedin v2.1.0. - Adapted types and added divisors for unit compliance and convenience in V2.2.