pywr.parameters.ScenarioWrapperParameter

class pywr.parameters.ScenarioWrapperParameter(model, scenario, parameters, **kwargs)

Parameter that utilises a different child parameter in each scenario ensemble.

This parameter is used to switch between different child parameters based on different ensembles in a given Scenario. It can be used to vary data in a non-scenario aware parameter type across multiple scenario ensembles. For example, many of control curve or interpolation parameters do not explicitly support scenarios. This parameter can be used to test multiple control curve definitions as part of a single simulation.

Parameters:
scenarioScenario

The scenario instance which is used to select the parameters.

parametersiterable of Parameter instances

The child parameters that are used in each of scenario’s ensembles. The number of parameters must equal the size of the given scenario.

__init__(model, scenario, parameters, **kwargs)

Methods

__init__(model, scenario, parameters, **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

double_size

double_size: 'int'

integer_size

integer_size: 'int'

is_constant

is_variable

is_variable: 'bool'

model

name

parents

size

tags

tags: dict