pywr.parameters.AggregatedParameter
- class pywr.parameters.AggregatedParameter(model, parameters, agg_func=None, **kwargs)
A collection of IndexParameters
This class behaves like a set. Parameters can be added or removed from it. It’s value is the value of it’s child parameters aggregated using a aggregating function (e.g. sum).
- Parameters:
- parametersiterable of IndexParameter
The parameters to aggregate
- agg_funccallable or str
The aggregation function. Must be one of {“sum”, “min”, “max”, “mean”, “product”}, or a callable function which accepts a list of values.
- __init__(*args, **kwargs)
Methods
__init__
(*args, **kwargs)add
(self, Parameter parameter)after
(self)before
(self)finish
(self)get_all_values
(self)get_constant_value
(self)Return a constant value.
get_double_lower_bounds
(self)get_double_upper_bounds
(self)get_double_variables
(self)get_integer_lower_bounds
(self)get_integer_upper_bounds
(self)get_integer_variables
(self)get_value
(self, ScenarioIndex scenario_index)load
(cls, model, data)register
(cls)remove
(self, Parameter parameter)reset
(self)set_double_variables
(self, double[)set_integer_variables
(self, int[)setup
(self)unregister
(cls)value
(self, Timestep ts, ...)Attributes
agg_func
children
comment
comment: unicode
double_size
double_size: 'int'
integer_size
integer_size: 'int'
is_constant
is_variable
is_variable: 'bool'
model
name
parameters
parameters: list
parents
size
tags
tags: dict