Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Resilience Metric - Modified Resilience Index #252

Closed
lar3763 opened this issue Feb 28, 2022 · 6 comments
Closed

Issue with Resilience Metric - Modified Resilience Index #252

lar3763 opened this issue Feb 28, 2022 · 6 comments

Comments

@lar3763
Copy link

lar3763 commented Feb 28, 2022

Howdy! I am trying to calculate the Todini Index and Modified Resilience Index for a specific water network. I have looked through the API and it seems that "wntr.metrics.hydraulic.modified_resilience_index" does not exist in the package. I have downloaded the latest version, but this seems weird to me. Can anyone offer any help to resolve this issue? Thanks in advance!

@ucchejbb
Copy link

ucchejbb commented Feb 28, 2022

https://github.com/USEPA/WNTR/blob/main/wntr/metrics/hydraulic.py
Todini - Line 182
Modified RI - Line 242

Of the main branch.

You will likely have to install the main branch version using the instructions for setup.py.

@lar3763
Copy link
Author

lar3763 commented Feb 28, 2022

Thank you for the quick response. Would I have to uninstall the version I have at the moment or could I just download setup.py and run it in Python? Any advice would be greatly appreciated.

@ucchejbb
Copy link

@lar3763 You will need to use the 'python setup.py develop' option that is in the readthedocs. You should be able to do this without uninstalling the old version, although you can uninstall it just to be safe if you'd like.

@lar3763
Copy link
Author

lar3763 commented Mar 1, 2022

I have followed the steps from readthedocs, and I am still unsuccessful in being able to calculate the Modified RI. Anything other help you could suggest? @ucchejbb

@kaklise
Copy link
Collaborator

kaklise commented Mar 1, 2022

I'm working on a new release for WNTR that will include the modified resilience index when WNTR is downloaded from pypi and conda. I hope to have that done in the next few days. The instructions above should work (installing WNTR from GitHub), but your python environment could still be pointing to the old version. After importing WNTR, you can check the version number using wntr.__version and the file location using wnrt.__file__

@kaklise
Copy link
Collaborator

kaklise commented Mar 7, 2022

This issue has been resolved with the release of v0.4.1. Note that if you're using a Windows machine, you'll need to install WNTR using PyPI (#255).

@kaklise kaklise closed this as completed Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants