Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
A Parameter which returns the value from an annual harmonic series.
This Parameter comprises a series N cosine function with a period of 365 days. The calculation is performed using the Julien day of the year minus 1. This causes a small discontinuity in non-leap years. API Reference
mean
Mean value for the series (i.e. the position of zeroth harmonic)
Yes
amplitudes
The amplitudes for the N harmonic cosine functions. Must be the same length as phases
Yes
phases
The phase shift of the N harmonic cosine functions. Must be the same length as amplitudes
Yes
coming soon...
Parameter that integrates a piecewise function.
This parameter calculates the integral of a piecewise function. The piecewise function is given as two arrays (x and y) and is assumed to start from (0, 0). The values of x should be monotonically increasing and greater than zero. API Reference
parameter
The parameter the defines the right hand bounds of the integration
Yes
x
iterable of doubles
Yes
y
iterable of doubles
Yes
coming soon...
Parameter that returns the delayed flow for a node after a given number of timesteps or days. API Reference
model
pywr.model.Model
Yes
node
The node to delay for
Yes
timesteps
Number of timesteps to delay the flow
Yes
days
Number of days to delay the flow. Specifying a number of days (instead of a number of timesteps) is only valid if the number of days is exactly divisible by the model timestep length
Yes
initial_flow
Flow value to return for initial model timesteps prior to any delayed flow being available. This value is constant across all delayed timesteps and any model scenarios. Default is 0.0
Yes
coming soon...
Parameter that provides the flow from a node from the previous time-step. API Reference
Notes: This parameter keeps track of the previous time step’s flow on the given node. These values can be used in calculations for the current timestep as though this was any other parameter.
model
pywr.model.Model
Yes
node
The node that will have its flow tracked
Yes
initial_value
The value to return on the first time-step before the node has any past flow
Yes
coming soon...
Parameter that returns the current discount factor based on discount rate and a base year. API Reference
discount_rate
Discount rate (expressed as 0 - 1) used calculate discount factor for each year
Yes
base_year
Discounting base year (i.e. the year with a discount factor equal to 1.0)
Yes
coming soon...
Parameter track the deficit (max_flow - actual flow) of a Node. API Reference
Notes: This parameter is a little unusual in that it’s value is calculated during the after method, not calc_values. It is intended to be used in combination with a recorder (e.g. NumpyArrayNodeRecorder) to record the deficit ( defined as requested - actual flow) at a node. Note that this means recording this parameter does not give you the value that was used by the solver in this timestep. Alternatively, this parameter can be used in the model by other parameters and will evaluate to yesterdays deficit, where the deficit in the zeroth timestep is zero.
model
pywr.model.Model
Yes
node
The node that will have it’s deficit tracked
Yes
coming soon...
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. API Reference
scenario
The scenario instance which is used to select the parameters
Yes
parameters
The child parameters that are used in each of scenario’s ensembles. The number of parameters must equal the size of the given scenario
Yes
coming soon...