GithubHelp home page GithubHelp logo

Comments (5)

kbonney avatar kbonney commented on June 21, 2024

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.

from wntr.

amsinhaubc avatar amsinhaubc commented on June 21, 2024

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.

from wntr.

kaklise avatar kaklise commented on June 21, 2024

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).

from wntr.

amsinhaubc avatar amsinhaubc commented on June 21, 2024

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.

from wntr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.