modelReservoir

A single stock drained by an outflow at a given rate

Extends from Icons.SubsystemTransceiver (Icon for subsystems with mixed ports), Interfaces.Basics.OutputTypeChoice (Partial model to set output type).

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

TypeNameDefaultDescription
StringiconLabel (from SubsystemTransceiver)""
OutputTypeinitialValue0Initial level of stock
OutputTypemaxValueinfMaximum admissable value (reservoir.maxValue)
OutputTypeminValue-infMinimum admissable value (reservoir.minValue)
Structural Parameters
BooleanhasStockInfoOutputfalse= true, if a StockInfoOutput should be added to the stock (reservoir.hasStockInfoOutput)
BooleanhasFlowPorttrue= true, if the outflow from the stock will go to a flow port instead of a cloud
Advanced
InitializationOptionsinitmodelSettings.initProvide InitializationOptions (Free, FixedValue, SteadyState) (reservoir.init)
BooleanuseAssertfalse= true, if leaving the admissable range is to cause an error or warning (reservoir.useAssert)
BooleancauseErrortrue= true, if leaving the admissable range is to cause an error instead of simply a warning (reservoir.causeError)

Connectors

TypeNameDefaultDescription
Interfaces.Connectors.StockPortstockPortReceiving side of the element
Interfaces.Connectors.FlowPortflowPort
Interfaces.Connectors.RealInputuRate of outflow from the stock
Interfaces.Connectors.StockInfoOutputy_stockInfoOptional StockInfoOutput

Components

TypeNameDefaultDescription
RealOutputyAmount in the stock
ModelSettingsmodelSettings