pywr.parameters.control_curves.ControlCurvePiecewiseInterpolatedParameter

class pywr.parameters.control_curves.ControlCurvePiecewiseInterpolatedParameter(model, storage_node, control_curves, values, minimum=0.0, maximum=1.0, **kwargs)

A control curve Parameter that interpolates between two or more pairs of values.

Return values are linearly interpolated between a pair of values depending on the current storage. The first pair is used between maximum and the first control curve, the next pair between the first control curve and second control curve, and so on until the last pair is used between the last control curve and the minimum value. The first value in each pair is the value at the upper position, and the second the value at the lower position.

Parameters:
storage_nodeStorage

The storage node to compare the control curve(s) to.

control_curveslist of Parameter or floats

A list of parameters representing the control curve(s). These are often MonthlyProfileParameters or DailyProfileParameters, but may be any Parameter that returns values between 0.0 and 1.0. If floats are passed they are converted to ConstantParameter.

values2D array or list of lists

A list of value pairs to interpolate between. The length of the list should be 1 + len(control_curves).

minimumfloat

The storage considered the bottom of the lower curve, 0-1 (default=0).

maximumfloat

The storage considered the top of the upper curve, 0-1 (default=1).

__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

control_curves

double_size

double_size: 'int'

integer_size

integer_size: 'int'

is_constant

is_variable

is_variable: 'bool'

maximum

maximum: 'double'

minimum

minimum: 'double'

model

name

parameters

parameters: list

parents

size

storage_node

tags

tags: dict

values