todini_index#

module wntr.metrics.hydraulic

todini_index(head, pressure, demand, flowrate, wn, Pstar)[source]#

Compute Todini index, equations from [25].

The Todini index is related to the capability of a system to overcome failures while still meeting demands and pressures at the nodes. The Todini index defines resilience at a specific time as a measure of surplus power at each node and measures relative energy redundancy.

Parameters:
  • head (pandas DataFrame) – A pandas DataFrame containing node head (index = times, columns = node names).

  • pressure (pandas DataFrame) – A pandas DataFrame containing node pressure (index = times, columns = node names).

  • demand (pandas DataFrame) – A pandas DataFrame containing node demand (index = times, columns = node names).

  • flowrate (pandas DataFrame) – A pandas DataFrame containing pump flowrates (index = times, columns = pump names).

  • wn (wntr WaterNetworkModel) – Water network model. The water network model is needed to find the start and end node to each pump.

  • Pstar (float) – Pressure threshold.

Return type:

A pandas Series that contains a time-series of Todini indexes