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
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| String | iconLabel (from SubsystemTransceiver) | "" | |
| OutputType | initialValue | 0 | Initial level of stock |
| OutputType | maxValue | inf | Maximum admissable value (reservoir.maxValue) |
| OutputType | minValue | -inf | Minimum admissable value (reservoir.minValue) |
| Structural Parameters | |||
| Boolean | hasStockInfoOutput | false | = true, if a StockInfoOutput should be added to the stock (reservoir.hasStockInfoOutput) |
| Boolean | hasFlowPort | true | = true, if the outflow from the stock will go to a flow port instead of a cloud |
| Advanced | |||
| InitializationOptions | init | modelSettings.init | Provide InitializationOptions (Free, FixedValue, SteadyState) (reservoir.init) |
| Boolean | useAssert | false | = true, if leaving the admissable range is to cause an error or warning (reservoir.useAssert) |
| Boolean | causeError | true | = true, if leaving the admissable range is to cause an error instead of simply a warning (reservoir.causeError) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.Connectors.StockPort | stockPort | Receiving side of the element | |
| Interfaces.Connectors.FlowPort | flowPort | ||
| Interfaces.Connectors.RealInput | u | Rate of outflow from the stock | |
| Interfaces.Connectors.StockInfoOutput | y_stockInfo | Optional StockInfoOutput |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealOutput | y | Amount in the stock | |
| ModelSettings | modelSettings |