pywr.nodes.AggregatedStorage
- class pywr.nodes.AggregatedStorage(*args, **kwargs)
An aggregated sum of other Storage nodes
This object should behave like Storage by returning current flow, volume and current_pc. However this object can not be connected to others within the network.
- Parameters:
- model - `Model` instance
- name - str
- storage_nodes - list or iterable of `Storage` objects
The Storage objects which to return the sum total of
Notes
This node can not be connected to other nodes in the network.
- __init__(model, name, storage_nodes, **kwargs)
Methods
__init__(model, name, storage_nodes, **kwargs)after(self, Timestep ts)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
finalise_load()Finish loading a node by converting parameter name references to instance references.
finish(self)get_all_cost(self, double[)get_cost(self, ScenarioIndex scenario_index)get_current_pc(self, ...)Return the current proportion of full of the storage node.
pre_load(model, data)Create a node instance from data.
reset(self)setup(self, model)Called before the first run of the model
Attributes
allow_isolatedA property to flag whether this Node can be unconnected in a network.
commentcomment: str
component_attrscomponentsGenerator that returns all of the Components attached to the Node
current_pcCurrent proportion full.
domainflowTotal flow via this node in the current timestep
fully_qualified_nameinitial_volumemodelThe recorder for the node, e.g. a NumpyArrayRecorder.
nameName of the node.
parentThe 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.
storage_nodesvirtualvirtual: 'bool'
volume