pywr.domains.river.Reservoir
- class pywr.domains.river.Reservoir(*args, **kwargs)
A reservoir node with control curve.
The Reservoir is a subclass of Storage with additional functionality to provide a simple control curve. The Reservoir has above_curve_cost when it is above its curve and the user defined cost when it is below. Typically the costs are negative to represent a benefit of filling the reservoir when it is below its curve.
- __init__(model, *args, **kwargs)
- Keywords:
- control_curve - A Parameter object that can return the control curve position,
as a percentage of fill, for the given timestep.
Methods
__init__(model, *args, **kwargs)Keywords:
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
connect(node[, from_slot, to_slot])Create an edge from this Node to another Node
disconnect([node, slot_name, all_slots])Remove a connection from this Node to another Node
finalise_load()Finish loading a node by converting parameter name references to instance references.
finish(self)get_all_cost(self, double[)get_all_max_volume(self, double[)get_all_min_volume(self, double[)get_area(self, ScenarioIndex scenario_index)get_cost(self, ScenarioIndex scenario_index)Get the cost per unit flow at a given timestep
get_current_pc(self, ...)Return the current proportion of full of the storage node.
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, ...)iter_slots([slot_name, is_connector, all_slots])Returns the object(s) wich should be connected to given slot_name
pre_load(model, data)Create a node instance from data.
reset(self)Called at the beginning of a run
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.
areacommentcomment: str
component_attrscomponentsGenerator that returns all of the Components attached to the Node
costThe cost per unit increased in volume stored
current_pcCurrent proportion full.
domainflowTotal flow via this node in the current timestep
fully_qualified_namehas_fixed_costReturns true if cost is not a Parameter.
initial_volumeinitial_volume_pclevelmax_volumemin_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.
virtualvirtual: 'bool'
volume