PipelineDelay

Fixed or pure delay of input flow

Diagram

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The →PureDelay is used to model a pipeline delay. The aggregate nature of causal loop modeling requires to make a clear distinction between delaying an inflow as opposed to an outflow to 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

DiagramView
ModelDiagram.png

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 the stockPort of 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 →MaterialStock cannot be drained below zero.

  • inflowDelay and outflowDelay are 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 parameters IDO and IDI in the Initialization tab.

See also

ExponentialDelay

Parameters (10)

delayTime

Value: 1

Type: Time (s)

Description: Time of delay

subtractDelayedOutflow

Value: true

Type: Boolean

Description: = true, if a delayed outflow is to be deducted before it actually leaves the stock

hasFactor

Value: false

Type: Boolean

Description: = true, if coefficients are to be multiplied with input u

hasStockInfoOutput

Value: false

Type: Boolean

Description: = true, if information from the internal 'in process' stock is to be made accessible

IDI

Value: 0

Type: MaterialType

Description: Initial material in the process of flowing into the connected stock

IDO

Value: 0

Type: MaterialType

Description: Initial material in the process of flowing into the connected stock

maxDelayTime

Value: 10

Type: Time (s)

Description: Maximum delay time

init

Value: modelSettings.init

Type: InitializationOptions

Description: Provide InitializationOptions (Free, FixedValue, SteadyState)

samplingPeriod

Value: modelSettings.samplingPeriod

Type: Time (s)

Description: Sampling period for discrete behavior (should be smaller than dt/2)

strict

Value: true

Type: Boolean

Description: = true, if strict limits with noEvent(..)

Connectors (7)

portA

Type: StockPort

Description: Connector for stock components

portB

Type: FlowPort

Description: Used to represent stock and flow connections

u

Type: RealInput

Description: Factor input

stockInfoOutput

Type: StockInfoOutput

Description: Output of record with stock-related information

one

Type: RealOutput

Description: Default factor

growthRate

Type: RealOutput

Description: Indicated rate of growth

declineRate

Type: RealOutput

Description: Indicated rate of decline

Components (13)

stockB

Type: FlowPortSensor

Description: Level information for an outside FlowPort

adjustedDelayTime

Type: Product_2

Description: Inputs are multiplied

parDelayTime

Type: ConstantConverterTime

Description: A constant time value is turned into a constant signal

actualStockB

Type: Add

Description: Output the sum of the two inputs

modelSettings

Type: ModelSettings

Description: Setting important global variables within a model

delayedOutflow

Type: OutflowDynamicStock

Description: Outflow from a dynamic stock—the rate is set by the stock

outflowDelay

Type: PureDelay

Description: Delay the flow of material for a fixed (but variable) delay time

inflowDelay

Type: PureDelay

Description: Delay the flow of material for a fixed (but variable) delay time

growing

Type: Growth

Description: A stock is filled at a given rate

actuallyGrowing

Type: OutflowDynamicStock

Description: Outflow from a dynamic stock—the rate is set by the stock

shrinking

Type: Growth

Description: A stock is filled at a given rate

cloud1

Type: Cloud

Description: Reservoir (stock/level) with an infinite capacity

actuallyShrinking

Type: Decline

Description: A stock is drained at a given rate

Revisions

  • Introduced in v2.0.0.