bulum.stats.reliability_stats_class module

class Reliability(demand: Series | list | float | int, supply: Series, demand_timescale: Literal['daily', 'monthly', 'yearly'] = 'daily', demand_type: Literal['total', 'daily_constant'] = 'total', ignore_leap_years=False, quiet=False)

Bases: object

Reliability of water supply statistics generator.

This class provides methods to calculate reliability statistics comparing water supply against demand for different timescales (monthly, annual).

AnnualReliability(tol: float = 1, wy_month: int = 7, allow_part_years: bool = False) float

Calculate the annual reliability statistic for daily timeseries of demand and supply.

Parameters:
  • tol (float, optional) – Percentage of demand treated as full demand. Defaults to 1 (100%).

  • wy_month (int, optional) – Water year start month. Defaults to 7.

  • allow_part_years (bool, optional) – Allow part water years or only complete water years. Defaults to False.

Returns:

Annual reliability (%)

Return type:

float

MonthlyReliability(tol: float = 1, allow_part_months: bool = False, wy_month: int = 7) float

Calculate the monthly reliability statistic for daily timeseries of demand and supply.

Parameters:
  • tol (float, optional) – Percentage of demand treated as full demand. Defaults to 1 (100%).

  • allow_part_months (bool, optional) – Allow part months or only complete months. Defaults to False.

  • wy_month (int, optional) – Water year start month. Defaults to 7.

Returns:

Monthly reliability (%)

Return type:

float

ReliabilityTS(wy_month: int) Series

Return demand as a timeseries for input to reliability statistics.

Matches date range of supply timeseries input.

Parameters:

wy_month (int) – Water year start month

Returns:

Demand timeseries for input to reliability stats

Return type:

pandas.Series