pywr.recorders.NumpyArrayNodeRecorder

class pywr.recorders.NumpyArrayNodeRecorder

Recorder for timeseries information from a Node.

This class stores flow from a specific node for each time-step of a simulation. The data is saved internally using a memory view. The data can be accessed through the data attribute or to_dataframe() method.

Parameters:
model : pywr.core.Model
node : pywr.core.Node

Node instance to record.

temporal_agg_func : str or callable (default=”mean”)

Aggregation function used over time when computing a value per scenario. This can be used to return, for example, the median flow over a simulation. For aggregation over scenarios see the agg_func keyword argument.

__init__($self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

after
aggregated_value
before
finish
load
register
reset
setup
to_dataframe Return a pandas.DataFrame of the recorder data
unregister
values Compute a value for each scenario using temporal_agg_func.

Attributes

agg_func
children
comment
data
epsilon
ignore_nan
is_constraint
is_objective
model
name
node
parents
temporal_agg_func