modelPureDelay

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

Extends from Icons.DelayN (Icon for DelayN), Icons.DiscreteStockLabel (Mark stock element as discrete), Interfaces.Basics.GenericStock_Special (Generic Stock with internal dynamics).

Information

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

At any given time, the inflow to the PureDelay is delayed by an exact amount of time given either by the parameter delayTime or the continuous input u. Changes in the delay time will only affect the current or later inflow, i.e., whatever is already in the process of being delayed will not be affected.

Implementation

The PureDelay  will work at discrete time intervals:

when sample(modelSettings.modelStartTime + samplingPeriod, samplingPeriod) then
  // load new material into the stock, move loaded material, unload material
end when;

The values for the in- and outflows and the load will be kept constant between events.

Notes

  • All inflows have to go to the inflow port of the PureDelay.

  • Since the outflow will be controlled by the PureDelay, →OutflowDynamicStock or →SplitOutflowDynamicStock have to be connected to the outflow port.

  • Using more than one outflow (e.g., →SplitOutflowDynamicStock) can be used to model leaking.

    • The parameter init in the Advanced tab allows to select →InitializationOptions:
      • FixedValue (default) will initialize the stock according to value given by the parameter initialValue.

      • SteadyState will use Little's Law to determine the equilibrium start value as inflow.rate * delayTime

      • Free tells the solver that it is free in solving the initial value problem using initialValue as startValue.
  • Units that enter the stock later than other units can "overtake" these units and actually flow out earlier, should the time of delay decrease after those earlier entries. If that behavior is not wanted, then a Conveyor should be used, which will preserve order of entry (units can at best leave at the same time, but not earlier than units, that have already entered the stock).

See also

SimpleConveyor, Conveyor, DelayNDelayFixedDelayInformation

Parameters

TypeNameDefaultDescription
OutputTypeinitialValue0Initial load
TimedelayTime1Constant delay time (optional)
TimemaxDelayTime10Maximum delay time (to restrict memory usage)
Advanced
InitializationOptionsinit (from GenericStock_Special)InitializationOptions.FixedValueProvide InitializationOptions (Free, FixedValue, SteadyState)
TimesamplingPeriodmodelSettings.samplingPeriodSampling period for discrete behavior (should be smaller than dt/2)
Booleanstricttrue= true, if strict limits with noEvent(..) (clippedDelayTime.strict)
Structural Parameters
BooleanhasStockInfoOutput (from GenericStock_Special)false= true, if a StockInfoOutput should be added to the stock
BooleanhasConstantDelayTimetrue= true, if the delay time is to be given by a constant parameter
BooleanhasExogenousHistoryfalse=true, if the outflow-profile for the initial load is to be given by an external lookup function

Connectors

TypeNameDefaultDescription
StockPortinflow (from GenericStock_Special)Inflow port of the stock
StockPort_Specialoutflow (from GenericStock_Special)Special outflow port of the stock (stock sets rate)
StockInfoOutputy_stockInfo (from GenericStock_Special)Optional StockInfoOutput
Interfaces.Connectors.RealInputuDelay time input (optional)

Components

TypeNameDefaultDescription
RealOutputy (from ThreeSO)Level or rate information
RealOutputy1 (from ThreeSO)Level or rate information
RealOutputy2 (from ThreeSO)Level or rate information
ModelSettingsmodelSettings