WNTR icon indicating copy to clipboard operation
WNTR copied to clipboard

Todini Index Calculation for the Net6 network - Values outside the range [0,1]

Open amsinhaubc opened this issue 1 year ago • 5 comments

Hi,

I am using the Net6.inp network, without any modifications, as available from the WNTR-Github site. I find that the Todini Index (TI) values exceed the anticipated range [0,1] many a times over the 96-hours. For example, at 25th hour, it even reaches the value of 30.

What could possibly explain this?

Thanks in advance.

Net6_TI_Screenshot

amsinhaubc avatar Apr 30 '24 12:04 amsinhaubc

I was able to reproduce this with the following snippet:

import wntr

inp_file = 'Net6.inp'
wn = wntr.network.WaterNetworkModel(inp_file)
wn.options.time.duration = 96*3600
sim = wntr.sim.WNTRSimulator(wn)
results = sim.run_sim()

head = results.node["head"]
pressure = results.node["pressure"]
demand = results.node["demand"]
flowrate = results.link["flowrate"] 
todini = wntr.metrics.hydraulic.todini_index(head, pressure, demand, flowrate, wn, 21.09)
todini.plot()

Not sure why we are seeing those unexpected values, though. Will continue to look into this.

kbonney avatar May 01 '24 00:05 kbonney

I was able to reproduce this with the following snippet:

import wntr

inp_file = 'Net6.inp'
wn = wntr.network.WaterNetworkModel(inp_file)
wn.options.time.duration = 96*3600
sim = wntr.sim.WNTRSimulator(wn)
results = sim.run_sim()

head = results.node["head"]
pressure = results.node["pressure"]
demand = results.node["demand"]
flowrate = results.link["flowrate"] 
todini = wntr.metrics.hydraulic.todini_index(head, pressure, demand, flowrate, wn, 21.09)
todini.plot()

Not sure why we are seeing those unexpected values, though. Will continue to look into this.

Thanks for looking into this.

amsinhaubc avatar May 01 '24 01:05 amsinhaubc

The Todini index generally results in values between 0 and 1, but values below 0 and above 1 are possible. The paper by Jayaram includes an explanation and suggests a modified resilience index (MRI), which is also included in WNTR.

WNTR function for MRI: https://usepa.github.io/WNTR/apidoc/wntr.metrics.hydraulic.modified_resilience_index.html#wntr.metrics.hydraulic.modified_resilience_index

Jayaram, N., & Srinivasan, K. (2008). Performance‐based optimal design and rehabilitation of water distribution networks using life cycle costing. Water resources research, 44(1).

kaklise avatar May 02 '24 16:05 kaklise

The Todini index generally results in values between 0 and 1, but values below 0 and above 1 are possible. The paper by Jayaram includes an explanation and suggests a modified resilience index (MRI), which is also included in WNTR.

WNTR function for MRI: https://usepa.github.io/WNTR/apidoc/wntr.metrics.hydraulic.modified_resilience_index.html#wntr.metrics.hydraulic.modified_resilience_index

Jayaram, N., & Srinivasan, K. (2008). Performance‐based optimal design and rehabilitation of water distribution networks using life cycle costing. Water resources research, 44(1).

Thanks @kaklise for your reply and the link to the paper. Please correct me if I am wrong, the highest Todini Index attainable is one, while MRI can theoretically range till infinity.

amsinhaubc avatar May 03 '24 18:05 amsinhaubc

Todini index generally results in values between 0 and 1, but values below 0 and above 1 are possible. MRI can be over 1, but cannot be below –1 if elevation and pressure are positive. I'm not sure if the theoretical upper limit is infinity, but both values can be > 1.

kaklise avatar May 17 '24 16:05 kaklise