pywr.parameters.AnnualHarmonicSeriesParameter

class pywr.parameters.AnnualHarmonicSeriesParameter(model, mean, amplitudes, phases, *args, **kwargs)

A Parameter which returns the value from an annual harmonic series

This Parameter comprises a series N cosine function with a period of 365

days. The calculation is performed using the Julien day of the year minus 1 This causes a small discontinuity in non-leap years.

\[f(t) = A + \sum_{n=1}^N A_n\cdot \cos((2\pi nt)/365+\phi_n)\]
Parameters
meanfloat

Mean value for the series (i.e. the position of zeroth harmonic)

amplitudesarray_like

The amplitudes for the N harmonic cosine functions. Must be the same length as phases.

phasesarray_like

The phase shift of the N harmonic cosine functions. Must be the same length as amplitudes.

__init__(*args, **kwargs)

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

Methods

__init__(*args, **kwargs)

Initialize self.

after(self)

before(self)

finish(self)

get_all_values(self)

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(type cls, model, data)

register(type cls)

reset(self)

set_double_variables(self, double[)

set_integer_variables(self, int[)

setup(self)

unregister(type cls)

value(self, Timestep timestep, …)

Attributes

amplitudes

children

comment

comment: unicode

double_size

double_size: ‘int’

integer_size

integer_size: ‘int’

is_variable

is_variable: ‘bool’

mean

mean: ‘double’

model

name

parents

phases

size