Reservoir

A single stock drained by an outflow at a given rate

Diagram

Information

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

The reservoir structure consists of a stock component that is typically filled via the accumulated net flow received at its stockPort. The stock is then drained at a rate set by the input u.

Implementation

The stock component used is declared as

replaceable Stocks.Informationlevel stock constrainedby Interfaces.PartialStocks.BasicStock

Accordingly the →InformationLevel can be redeclared either as a →MaterialStock or a →CapacityRestrictedStock.

See also

Account, Chain

Parameters (8)

initialValue

Value: 0

Type: OutputType

Description: Initial level of stock

maxValue

Value: inf

Type: OutputType

Description: Maximum admissable value (reservoir.maxValue)

minValue

Value: -inf

Type: OutputType

Description: Minimum admissable value (reservoir.minValue)

hasStockInfoOutput

Value: false

Type: Boolean

Description: = true, if a StockInfoOutput should be added to the stock (reservoir.hasStockInfoOutput)

hasFlowPort

Value: true

Type: Boolean

Description: = true, if the outflow from the stock will go to a flow port instead of a cloud

init

Value: modelSettings.init

Type: InitializationOptions

Description: Provide InitializationOptions (Free, FixedValue, SteadyState) (reservoir.init)

useAssert

Value: false

Type: Boolean

Description: = true, if leaving the admissable range is to cause an error or warning (reservoir.useAssert)

causeError

Value: true

Type: Boolean

Description: = true, if leaving the admissable range is to cause an error instead of simply a warning (reservoir.causeError)

Connectors (5)

stockPort

Type: StockPort

Description: Receiving side of the element

flowPort

Type: FlowPort

Description: Used to represent stock and flow connections

u

Type: RealInput

Description: Rate of outflow from the stock

y_stockInfo

Type: StockInfoOutput

Description: Optional StockInfoOutput

y

Type: RealOutput

Description: Amount in the stock

Components (4)

modelSettings

Type: ModelSettings

Description: Setting important global variables within a model

stock

Type: InformationLevel

Description: The reservoir that is filled or drained by the connected flows.

movingOn

Type: Transition

Description: Flow from stock A to stock B at a given rate

cloud

Type: Cloud

Description: System boundary

Used in Components (1)

Chain

BusinessSimulation.MoleculesOfStructure.Transceivers

A chain of serially connected reservoirs