pywr.recorders.NumpyArrayIndexParameterRecorder

class pywr.recorders.NumpyArrayIndexParameterRecorder

Recorder for timeseries information from an IndexParameter.

This class stores the value from a specific IndexParameter 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
param : pywr.parameters.IndexParameter

Parameter 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 This DataFrame contains a MultiIndex for the columns with the recorder name as the first level and scenario combination names as the second level.
unregister
values

Attributes

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