pywr.parameters.IndexedArrayParameter

class pywr.parameters.IndexedArrayParameter(model, index_parameter, params, **kwargs)

Parameter which uses an IndexParameter to index an array of Parameters

An example use of this parameter is to return a demand saving factor (as a float) based on the current demand saving level (calculated by an IndexParameter).

Parameters
index_parameterIndexParameter
paramsiterable of Parameters or floats

Notes

Float arguments params are converted to ConstantParameter

__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(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, ...)

Returns the value of the Parameter at the current index

Attributes

children

comment

comment: unicode

double_size

double_size: 'int'

index_parameter

index_parameter: pywr.parameters._parameters.IndexParameter

integer_size

integer_size: 'int'

is_constant

is_variable

is_variable: 'bool'

model

name

params

params: list

parents

size

tags

tags: dict