pywr.parameters.MonthlyProfileParameter
- class pywr.parameters.MonthlyProfileParameter(model, values, lower_bounds=0.0, upper_bounds=np.inf, interp_day=None, **kwargs)
Parameter which provides a monthly profile.
The monthly profile returns a different value based on the month of the current time-step. By default this creates a piecewise profile with a step change at the beginning of each month. An optional interp_day keyword can instead create a linearly interpolated daily profile assuming the given values correspond to either the first or last day of the month.
- Parameters:
- valuesiterable, array
The 12 values that represent the monthly profile.
- lower_boundsfloat or array_like (default=0.0)
Defines the lower bounds when using optimisation. If a float given, same bound applied for every month. Otherwise an array like object of length 12 should be given for as separate value each month.
- upper_boundsfloat or array_like (default=np.inf)
Defines the upper bounds when using optimisation. If a float given, same bound applied for every month. Otherwise an array like object of length 12 should be given for as separate value each month.
- interp_daystr or None (default=None)
- If interp_day is None then no interpolation is undertaken, and the parameter
returns values representing a piecewise monthly profile. Otherwise interp_day must be a string of either “first” or “last” representing which day of the month each of the 12 values represents. The parameter then returns linearly interpolated values between the given day of the month.
- __init__(*args, **kwargs)
Methods
__init__
(*args, **kwargs)after
(self)before
(self)finish
(self)get_all_values
(self)get_constant_value
(self)Return a constant value.
get_daily_values
(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
(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'
interp_day
interp_day: object
is_constant
is_variable
is_variable: 'bool'
model
name
parents
size
tags
tags: dict