pywr.parameters.BinaryStepParameter

class pywr.parameters.BinaryStepParameter(model, value=0.0, lower_bounds=-1.0, upper_bounds=1.0, output=1.0, **kwargs)

An activation function that returns a constant value if its internal variable is positive.

Parameters
valuefloat

The current value of the internal variable (default = 0.0)

lower_bounds, upper_boundsfloat

The valid ranges of the internal variable for optimisation (default = [-1.0, 1.0]).

outputfloat

The value to return when the internal variable is positive (default = 1.0).

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

after(self)

before(self)

finish(self)

get_all_values(self)

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

Attributes

children

comment

comment: unicode

double_size

double_size: 'int'

integer_size

integer_size: 'int'

is_constant

is_variable

is_variable: 'bool'

model

name

output

output: 'double'

parents

size

tags

tags: dict