pywrdrb.parameters.LowerBasinMaxMRFContribution

pywrdrb.parameters.LowerBasinMaxMRFContribution#

class pywrdrb.parameters.LowerBasinMaxMRFContribution(model, reservoir, step, nodes, parameters, **kwargs)#

Used to track the max of allowable release from a lower basin reservoir based on policy and current conditions.

If predicted Trenton flow > flow target, then max allowable release is 0.0 (no contribution needed). If predicted Trenton flow < flow target, then max allowable release is determined by: - the current storage of the reservoir - the priority level of the reservoir, as described in WaterCode.

This is provided to VolBalanceLowerBasinMRFAggregate to determine the aggregate MRF contribution from the lower basin reservoirs.

__init__(model, reservoir, step, nodes, parameters, **kwargs)#

Initialize the LowerBasinMaxMRFContribution parameter.

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

  • reservoir (str) – The name of the reservoir, e.g. “blueMarsh”, “beltzvilleCombined”, “nockamixon”.

  • step (int) – The step of the Trenton flow calculation (1-4). See pywrdrb.parameters.ffmp for more.

  • nodes (dict) – Dictionary of pywrdrb.nodes.Reservoir instances for each lower basin reservoir. Format {“reservoir_name”: pywr.Node}.

  • parameters (dict) – Dictionary of pywrdrb.parameters.Parameter instances for each lower basin reservoir. Format {“parameter_name”: pywr.Parameter}.

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

Return type:

None

Methods

__init__(model, reservoir, step, nodes, ...)

Initialize the LowerBasinMaxMRFContribution parameter.

after(self)

before(self)

finish(self)

get_all_values(self)

get_constant_value(self)

Return a constant value.

get_current_usable_reservoirs(scenario_index)

Get lower basin reservoirs that are allowed to be used for Trenton flow target currently.

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 LowerBasinMaxMRFContribution parameter.

register(cls)

reset(self)

set_double_variables(self, double[)

set_integer_variables(self, int[)

setup(self)

unregister(cls)

value(timestep, scenario_index)

Get total allowable contributions from lower basin reservoirs.

Attributes

children

comment

str

double_size

'int'

integer_size

'int'

is_constant

is_variable

'bool'

model

name

parents

size

tags

dict