pywrdrb.parameters.PredictionEnsemble#

class pywrdrb.parameters.PredictionEnsemble(model, column, inflow_type, ensemble_indices, **kwargs)#

Loads and stored ensemble of prediction timeseries used to inform NYC releases during simulation.

When calculating NYC release, we need use forecast/predicted downstream flows to calculate the releases neede to maintain the Montague and Trenton flow targets in 1-4 days ahead. These predictions are generated prior to the simulation (e.g., pywrdrb.pre.PredictedInflowPreprocessor) and stored in an HDF5 file, with unique predictions for each realization member.

setup()#

Perform setup operations for the parameter. Automated pywr operation.

value(timestep, scenario_index)#

Return the current flow for the specified timestep and scenario index.

load(model, data)#

Load the parameter from the model dictionary.

ensemble_indices#

The realization indices of the inflow ensemble to be used for this simulation.

Type:

list

pred_column_indices#

The column indices of the inflow ensemble DataFrame corresponding to the realization indices.

Type:

list

pred_ensemble#

The DataFrame containing the inflow ensemble data, indexed by datetime.

Type:

DataFrame

__init__(model, column, inflow_type, ensemble_indices, **kwargs)#

Initialize the PredictionEnsemble parameter.

Parameters:
  • model (Model) – The pywrdrb.Model object.

  • column (str) – The name of the column in the HDF5 file to be used for the ensemble.

  • inflow_type (str) – The dataset label. Expects to find an HDF5 file with inflow ensemble data in the pn.flows.input_dir directory.

  • ensemble_indices (list) – The realization indices of the inflow ensemble to be used for this simulation.

  • **kwargs (dict) – Additional keyword arguments to be passed to the pywr.Parameter class. None used.

Return type:

None

Methods

__init__(model, column, inflow_type, ...)

Initialize the PredictionEnsemble parameter.

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

Load the parameter using the pywrdrb.Model dictionary.

register(cls)

reset(self)

set_double_variables(self, double[)

set_integer_variables(self, int[)

setup()

Perform setup operations for the parameter.

unregister(cls)

value(timestep, scenario_index)

Return the current flow across scenarios for the specified timestep and scenario index.

Attributes

children

comment

str

double_size

'int'

integer_size

'int'

is_constant

is_variable

'bool'

model

name

parents

size

tags

dict