Collector

A reservoir that aggregates multiple stock ports

Diagram

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 collectingReservoir will be set as specified by the chosen stock class (e.g., no draining below zero for a MaterialStock) and with regard to the netflow of all flows connected to the stock ports.

Parameters (8)

nin

Value: 2

Type: Integer

Description: Number of stock ports to be joined in the collector

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)

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 (7)

y

Type: RealOutput

Description: Level or rate information

y1

Type: RealOutput

Description: Level or rate information

y2

Type: RealOutput

Description: Level or rate information

y_stockInfo

Type: StockInfoOutput

Description: Optional StockInfoOutput

stockMultiPort

Type: StockMultiPort[nin]

Description: Used to represent multiple stock connectors

stockPort

Type: StockPort

Description: Connector for stock components

y_flows

Type: RealMultiOutput[nin]

Description: Output of netflows with regard to the multiple stock ports

Components (3)

collectingReservoir

Type: InformationLevel

Description: The joint collecting reservoir

modelSettings

Type: ModelSettings

Description: Setting important global variables within a model

sensor

Type: StockPortSensor[nin]

Description: Rate of flow information from stock ports

Revisions

  • Introduced in v2.0.0.

  • Modifiers for y_flows given prefix each in v2.2.