pywr.recorders.AggregatedRecorder — Pywr 0.5dev documentation

# pywr.recorders.AggregatedRecorder

class `pywr.recorders.` `AggregatedRecorder`

  This Recorder is used to aggregate across multiple other Recorder objects.

  The class provides a method to produce a complex aggregated recorder by taking the results of other records. The .values() method first collects unaggregated values from the provided recorders. These are then aggregated on a per scenario basis and returned by this classes .values() method. This method allows AggregatedRecorder to be used as a recorder for in other AggregatedRecorder instances.

  By default the same agg_func function is used for both steps, but an optional recorder_agg_func can undertake a different aggregation across scenarios. For example summing recorders per scenario, and then taking a mean of the sum totals.

  Parameters: | model : pywr.core.Model recorders: iterable of `Recorder` objects. The other Recorder instances to perform aggregation over. agg_func : str or callable, optional Scenario aggregation function to use when aggregated_value is called (default=”mean”). recorder_agg_func : str or callable, optional Recorder aggregation function to use when aggregated_value is called (default=`agg_func`).

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

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

  Methods

  `after` |
  `aggregated_value` |
  `before` |
  `finish` |
  `load` |
  `register` |
  `reset` |
  `setup` |
  `unregister` |
  `values` |

  Attributes

  `agg_func` |
  `children` |
  `comment` |
  `epsilon` |
  `ignore_nan` |
  `is_constraint` |
  `is_objective` |
  `model` |
  `name` |
  `parents` |
  `recorders` |