pywr.nodes.AnnualVirtualStorage¶
-
class
pywr.nodes.
AnnualVirtualStorage
(*args, **kwargs)¶ A virtual storage which resets annually, useful for licences
See documentation for pywr.core.VirtualStorage.
- Parameters
- reset_day: int
The day of the month (0-31) to reset the volume to the initial value.
- reset_month: int
The month of the year (0-12) to reset the volume to the initial value.
- reset_to_initial_volume: bool
Reset the volume to the initial volume instead of maximum volume each year (default is False).
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(*args, **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
active
active: ‘bool’
allow_isolated
A property to flag whether this Node can be unconnected in a network.
area
comment
comment: basestring
component_attrs
components
Generator that returns all of the Components attached to the Node
cost
The cost per unit increased in volume stored
current_pc
Current percentage full
domain
factors
flow
Total flow via this node in the current timestep
fully_qualified_name
initial_volume
initial_volume_pc
level
max_volume
min_volume
model
The recorder for the node, e.g.
name
Name of the node.
nodes
parent
The parent Node/Storage of this object.
prev_flow
Total flow via this node in the previous timestep
recorders
Returns a list of pywr.recorders.Recorder objects attached to this node.
virtual
virtual: ‘bool’
volume