pywr.nodes.VirtualStorage¶
-
class
pywr.nodes.VirtualStorage(*args, **kwargs)¶ A virtual storage unit
- Parameters
- model: pywr.core.Model
- name: str
The name of the virtual node
- nodes: list of nodes
List of inflow/outflow nodes that affect the storage volume
- factors: list of floats
List of factors to multiply node flow by. Positive factors remove water from the storage, negative factors remove it.
- min_volume: float or parameter
The minimum volume the storage is allowed to reach.
- max_volume: float or parameter
The maximum volume of the storage.
- initial_volume: float
The initial storage volume.
- cost: float or parameter
The cost of flow into/outfrom the storage.
Notes
TODO: The cost property is not currently respected. See issue #242.
-
__init__(model, name, nodes, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(model, name, nodes, **kwargs)Initialize self.
after(self, Timestep ts, double[)before(self, Timestep ts)Called at the beginning of the timestep
check(self)commit(self, int scenario_index, double value)Called once for each route the node is a member of
commit_all(self, double[)Called once for each route the node is a member of
finish(self)get_area(self, ScenarioIndex scenario_index)get_cost(self, ScenarioIndex scenario_index)Get the cost per unit flow at a given timestep
get_initial_pc(self)Returns the initial volume as a proportion.
get_initial_volume(self)Returns the absolute initial volume.
get_level(self, ScenarioIndex scenario_index)get_max_volume(self, …)get_min_volume(self, …)load(data, model)reset(self)setup(self, model)Called before the first run of the model
Attributes
activeactive: ‘bool’
allow_isolatedA property to flag whether this Node can be unconnected in a network.
areacommentcomment: basestring
component_attrscomponentsGenerator that returns all of the Components attached to the Node
costThe cost per unit increased in volume stored
current_pcCurrent percentage full
domainfactorsflowTotal flow via this node in the current timestep
fully_qualified_nameinitial_volumeinitial_volume_pclevelmax_volumemin_volumemodelThe recorder for the node, e.g.
nameName of the node.
nodesparentThe parent Node/Storage of this object.
prev_flowTotal flow via this node in the previous timestep
recordersReturns a list of pywr.recorders.Recorder objects attached to this node.
virtualvirtual: ‘bool’
volume