modelExponentialDelay
Extends from Interfaces.PartialCLD.Delay (Partial model of a delay for CLD+ modeling).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The →DelayN is used to model an exponential delay of order ORD. The aggregate nature of causal loop modeling requires to make a clear distinction between delaying an inflow to as opposed to an outflow from the stock connected to the flowPort: A delayed inflow will reach the stock with a delay, while a delayed outflow will leave the stock with a delay.
While modeling a delayed inflow is uncontroversial, modeling a delayed outflow imposes choices: Setting subtractDelayedOutflow = true will report the current amount in the stock less the amount that is in the process of being delayed at the stockPort. Accordingly, a process of exponential decay will not drain the stock below zero.
If this is not wanted, setting subtractDelayedOutflow = false will report the actual stock level, i.e., any material that has not yet left the stock will be considered a still active member of the stock in the process . Accordingly, a delayed process of exponential decay could drain the stock below zero.
Implementation
![]() |
Notes
- The deduction of material in the process of leaving the stock (delayed outflow) is only relevant for the flow that is connected to the
stockPort. Other flows connected to the stock, that is connected to thestockPortof the component will see the stock value without any "premature" deductions, i.e., material will only be deducted from the stock once it as truly left the stock. - Even though a delayed flow may potentially drain a stock below zero, constraints imposed by the stock will be observed, e.g., a →
MaterialStockcannot be drained below zero. inflowDelayandoutflowDelayare by default initialized with zero elements in the process of flowing into and out of the connected stock. This can be changed by changing the values for the parametersIDOandIDIin theInitializationtab.
See also
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Time | delayTime (from Delay) | 1 | Time of delay |
| Structural Parameters | |||
| Boolean | subtractDelayedOutflow (from Delay) | true | = true, if a delayed outflow is to be deducted before it actually leaves the stock |
| Boolean | hasFactor (from Delay) | false | = true, if coefficients are to be multiplied with input u |
| Boolean | hasStockInfoOutput (from Delay) | false | = true, if information from the internal 'in process' stock is to be made accessible |
| Integer | ORD | 3 | Order of the exponential delay |
| Initialization | |||
| MaterialType | IDI (from Delay) | 0 | Initial material in the process of flowing into the connected stock |
| MaterialType | IDO (from Delay) | 0 | Initial material in the process of flowing into the connected stock |
| Advanced | |||
| InitializationOptions | init | modelSettings.init | Provide InitializationOptions (Free, FixedValue, SteadyState) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.StockPort | portA (from Delay) | ||
| Connectors.FlowPort | portB (from Delay) | ||
| Connectors.RealInput | u (from Delay) | Factor input | |
| Connectors.StockInfoOutput | stockInfoOutput (from Delay) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ModelSettings | modelSettings |
Revisions
- Introduced in v2.0.0.
