modelCollector
A reservoir that aggregates multiple stock ports
Extends from Icons.SubsystemIncubator (General Icon for stocks), Interfaces.Basics.ThreeSO (Generic information output for stock and rate elements).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The Collector aggregates multiple →StockPort connectors and essentially treats them as if they were connected to one joint reservoir (i.e., a collecting tank). The stock may be filled or drained via any of multiple stock ports (stockMultiPort) or the single stock port (stockPort).
Implementation
The joint reservoir is internally represented by a stock called collectingReservoir. It is declared with the prefix replaceable and may be redeclared as any of the following stock classes:
Notes
- Each of the multiple stock ports will report the flow restrictions set by the internal
collectingReservoir. - The flow restrictions for
collectingReservoirwill be set as specified by the chosen stock class (e.g., no draining below zero for aMaterialStock) and with regard to the netflow of all flows connected to the stock ports.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| String | iconLabel (from SubsystemIncubator) | "" | |
| 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 | |||
| Integer | nin | 2 | Number of stock ports to be joined in the collector |
| Boolean | hasStockInfoOutput | false | = true, if a StockInfoOutput should be added to the stock (reservoir.hasStockInfoOutput) |
| 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.StockInfoOutput | y_stockInfo | Optional StockInfoOutput | |
| Interfaces.Connectors.StockMultiPort | stockMultiPort | ||
| Interfaces.Connectors.StockPort | stockPort | ||
| Interfaces.Connectors.RealMultiOutput | y_flows | Output of netflows with regard to the multiple stock ports |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealOutput | y (from ThreeSO) | Level or rate information | |
| RealOutput | y1 (from ThreeSO) | Level or rate information | |
| RealOutput | y2 (from ThreeSO) | Level or rate information | |
| Stocks.InformationLevel | collectingReservoir | ||
| ModelSettings | modelSettings |
Revisions
- Introduced in v2.0.0.
- Modifiers for
y_flowsgiven prefixeachin v2.2.