This module contains all Container like resources.
Containers model the production and consumption of a homogeneous, undifferentiated bulk. It may either be continuous (like water) or discrete (like apples).
For example, a gasoline station stores gas (petrol) in large tanks. Tankers increase, and refuelled cars decrease, the amount of gas in the station’s storage tanks.
Models the production and consumption of a homogeneous, undifferentiated bulk. It may either be continuous (like water) or discrete (like apples).
The env parameter is the Environment instance the container is bound to.
The capacity defines the size of the container and must be a positive number (> 0). By default, a container is of unlimited size. You can specify the initial level of the container via init. It must be >= 0 and is 0 by default.
Raise a ValueError if capacity <= 0, init < 0 or init > capacity.
The maximum capacity of the container.
The current level of the container (a number between 0 and capacity).
An event that puts amount into the container. The event is triggered as soon as there’s enough space in the container.
Raise a ValueError if amount <= 0.
The amount to be put into the container.