pywrdrb.parameters.FfmpNjRunningAvgParameter#
- class pywrdrb.parameters.FfmpNjRunningAvgParameter(model, node, max_avg_delivery, max_daily_delivery, drought_factor, **kwargs)#
Enforces the constraint on NJ deliveries from the FFMP, based on a running average.
- Parameters:
model (Model) – The Pywr model instance.
node (Node) – The node associated with the parameter.
- node#
The node associated with the parameter.
- Type:
Node
- max_avg_delivery#
The maximum average delivery value.
- Type:
float
- max_daily_delivery#
The maximum daily delivery value.
- Type:
float
- drought_factor#
The drought factor parameter.
- Type:
Parameter
- max_delivery#
An array to hold the parameter state.
- Type:
ndarray
- current_drought_factor#
An array to hold the current drought factor.
- Type:
ndarray
- previous_drought_factor#
An array to hold the previous drought factor.
- Type:
ndarray
- setup()#
Allocates arrays to hold the parameter state and drought factors.
- reset()#
Resets the amount remaining in all states to the initial value.
- value(timestep, scenario_index)#
Returns the current volume remaining for the scenario.
- after()#
Updates the parameter requirement based on running average and updates the date for tomorrow.
- Class Methods:
load(model, data): Loads the parameter from model and data dictionary.
- __init__(model, node, max_avg_delivery, max_daily_delivery, drought_factor, **kwargs)#
Methods
__init__
(model, node, max_avg_delivery, ...)after
()Updates the parameter requirement based on running average and updates the date for tomorrow.
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
()Resets the amount remaining in all states to the initial value.
set_double_variables
(self, double[)set_integer_variables
(self, int[)setup
()Allocate an array to hold the parameter state.
unregister
(cls)value
(timestep, scenario_index)Returns the current volume remaining for the scenario.
Attributes
children
comment
unicode
double_size
'int'
integer_size
'int'
is_constant
is_variable
'bool'
model
name
parents
size
tags
dict