pywr.parameters.RollingMeanFlowNodeParameter

class pywr.parameters.RollingMeanFlowNodeParameter(model, node, timesteps=None, days=None, initial_flow=0.0, **kwargs)

Returns the mean flow of a Node for the previous N timesteps or days.

Parameters:
modelpywr.core.Model
nodepywr.core.Node

The node to record

timestepsint (optional)

The number of timesteps to calculate the mean flow for. If days is provided then timesteps is ignored.

daysint (optional)

The number of days to calculate the mean flow for. This is converted into a number of timesteps internally provided the timestep is a number of days.

namestr (optional)

The name of the parameter

initial_flowfloat

The initial value to use in the first timestep before any flows have been recorded.

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

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)

reset(self)

set_double_variables(self, double[)

set_integer_variables(self, int[)

setup(self)

unregister(cls)

value(self, Timestep ts, ...)

Attributes

children

comment

comment: unicode

days

days: 'int'

double_size

double_size: 'int'

initial_flow

initial_flow: 'double'

integer_size

integer_size: 'int'

is_constant

is_variable

is_variable: 'bool'

model

name

node

node: pywr._core.AbstractNode

parents

size

tags

tags: dict

timesteps

timesteps: 'int'