Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This Recorder is used to aggregate across multiple other Recorder objects.
The class provides a method to produce a complex aggregated recorder by taking the results of other records. The .values() method first collects unaggregated values from the provided recorders. These are then aggregated on a per scenario basis and returned by this classes .values() method. This method allows AggregatedRecorder to be used as a recorder for in other AggregatedRecorder instances.
By default the same agg_func function is used for both steps, but an optional recorder_agg_func can undertake a different aggregation across scenarios. For example summing recorders per scenario, and then taking a mean of the sum totals. API Reference
model
pywr.core.Model
Optional
recorders
The other Recorder instances to perform aggregation over
Optional
agg_func
Scenario aggregation function to use when aggregated_value is called (default=”mean”)
Optional
recorder_agg_func
Recorder aggregation function to use when aggregated_value is called (default=`agg_func`)
Optional
coming soon...
Record the mean value of a Parameter during a simulation.
This recorder can be used to track the mean of the values returned by a Parameter during a models simulation. An optional factor can be provided to apply a linear scaling of the values. API Reference
model
pywr.core.Model
Optional
name
The name of the recorder
Optional
param
The parameter to record
Required
factor
Scaling factor for the values of param
Optional
coming soon...
Records the mean flow of a Node for the previous N timesteps. API Reference
model
pywr.core.Model
Optional
node
The node to record
Required
name
The name of the recorder
Optional
timesteps
The number of timesteps to calculate the mean flow for
Optional
coming soon...
Recorder to total the flow for a Node.
A factor can be provided to scale the total flow (e.g. for calculating operational costs). API Reference
model
name
The name of the recorder
Optional
nodes
List of pywr.core.Node instances to record
Optional
factors
List of factors to apply to each node
Optional
coming soon...
Record the total value of a Parameter during a simulation.
This recorder can be used to track the sum total of the values returned by a Parameter during a models simulation. An optional factor can be provided to apply a linear scaling of the values. If the parameter represents a flux the integrate keyword argument can be used to multiply the values by the time-step length in days. API Reference
model
pywr.core.Model
Optional
param
The parameter to record
Required
name
The name of the recorder
Optional
factor
Scaling factor for the values of param
Optional
integrate
Whether to multiply by the time-step length in days during summation
Optional
coming soon...
For each scenario, record the total flow in each year across a list of nodes. Output from data property has shape: (years, scenario combinations).
A list of factors can be provided to scale the total flow (e.g. for calculating operational costs). API Reference
model
name
The name of the recorder
Optional
nodes
List of pywr.core.Node instances to record
Optional
factors
List of factors to apply to each node
Optional
coming soon...
For each scenario, count the number of times a list of parameters exceeds a threshold in each year. If multiple parameters exceed in one timestep then it is only counted once.
Output from data property has shape: (years, scenario combinations).
coming soon...
model
pywr.core.Model
Optional
parameter
The parameter to record
Required
threshold
The threshold to compare the parameter to
Optional
model
pywr.core.Model
Optional
parameters
List of pywr.core.IndexParameter to record against
Required
name
The name of the recorder
Optional
threshold
Threshold to compare parameters against
Optional
exclude_months
Optional list of month numbers to exclude from the count
Optional
model
pywr.core.Model
Optional
node
The node to record
Required
name
The name of the recorder
Optional
Record the mean flow for a Node.
A factor can be provided to scale the total flow (e.g. for calculating operational costs). API Reference
model
name
The name of the recorder
Optional
nodes
List of pywr.core.Node instances to record
Optional
factors
List of factors to apply to each node
Optional
coming soon...
Records the mean value of a Parameter for the last N timesteps. API Reference
model
pywr.core.Model
Optional
parameter
The parameter to record
Required
name
The name of the recorder
Optional
temporal_agg_func
Optional
window
Optional
coming soon...
Record whether a Storage node falls below a particular volume threshold during a simulation.
This recorder will return a value of 1.0 for scenarios where the volume Storage is less than or equal to the threshold at any time-step during the simulation. Otherwise it will return zero. API Reference
model
pywr.core.Model
Optional
node
The node to record
Required
name
The name of the recorder
Optional
threshold
The threshold to compare the parameter to
Optional
coming soon...