Todini Index Calculation for the Net6 network - Values outside the range [0,1]
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.
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.
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.
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).
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.
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.