FirstOrderStockAdjustment

Maintain a stock at a desired level

Diagram

Information

This information is part of the Business Simulation Library (BSL).

The output y indicates the rate of inflow required to keep a stock at a desired level. The (perceived) outflow from the stock will be replaced immediately to keep the stock at its current level, while the gap between the current level and the desired level will be closed using a →CloseGap component.

Limitations

  • The output y can become negative to adjust the stock to a lower level; one needs to be careful in that case with using this value as we cannot always drain a stock in a production process in the same way that we fill it.

Notes

  • While often modelers simply adjust the outflow from a stock that is controlled by this component to u_outflow one should be aware of the fact, that in reality there will likely be a perception lag which may be modeled by a →Smooth or a more elaborate structure.

  • Filling the stock under control may not be possible without delay, so the modeler may with to explicitly model a supply chain with explicit delays instead of connecting the output to an immediate inflow.

  • See [6, pp. 38-39] or Jim Hines' Molecules of Structure website (→First Order Stock Adjustment) for more details on the use of this structure in System Dynamics.

See also

CloseGap, SmoothSmoothN

 

Parameters (6)

adjTime

Value: 1

Type: Time (s)

Description: Time constant for the adjustment to the desired level (optional)

maxRate

Value: inf

Type: Rate (¹/s)

Description: Maximum rate feasible (clippedRate.maxValue)

hasConstantAdjTime

Value: true

Type: Boolean

Description: = true, if adjustment time is to be given by a constant parameter

clipOutput

Value: false

Type: Boolean

Description: = true, if the indicated rate is to clipped to not exceed limitations

strict

Value: true

Type: Boolean

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

homotopyType

Value: LimiterHomotopy.Linear

Type: LimiterHomotopy

Description: Simplified model for homotopy-based initialization (constantLimiter.homotopyType) (clip1.homotopyType)

Connectors (5)

y

Type: BusinessSimulation.Interfaces.PartialConverters.Policy_SO.RealOutput

Description: Policy output signal

u_reference

Type: RealInput

Description: Desired or reference amount in the stock under control

u_current

Type: RealInput

Description: Current amount in the stock under control

u_outflow

Type: RealInput

Description: Current outflow from the stock under control

u_adjTime

Type: RealInput

Description: Variable time for adjustment (optional)

Components (6)

modelSettings

Type: ModelSettings

clippedRate

Type: Clip

Description: Limit rate to feasible values

unchanged

Type: PassThrough

Description: Leave the indicated rate unchanged

adjustment

Type: CloseGap

Description: Inflow needed to reach desired level of stock

totalAdjustment

Type: Add_2

Description: Closing gap and compensate for outflow from stock

parAdjTime

Type: ConstantConverterTime

Description: Constant time of adjustment (optional)

Used in Examples (3)

SimpleProductionChainII

BusinessSimulation.Examples

Extending the first example to include replacement purchases

SimpleProductionChainIII

BusinessSimulation.Examples

Further extending the first example to explain new product diffusion

ManagingEmployment

BusinessSimulation.Examples

Human resource planning