rewet


Namerewet JSON
Version 0.2.0b11 PyPI version JSON
download
home_pagehttps://github.com/snaeimi/WNTR
SummaryREstoration of Water after Event Tool (REWET)
upload_time2024-12-10 21:31:23
maintainerNone
docs_urlNone
authorSina Naeimi
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements numpy scipy networkx pandas matplotlib plotly folium utm openpyxl numpydocs nose
Travis-CI
coveralls test coverage No coveralls.
            [![Build Status](https://app.travis-ci.com/snaeimi/REWET.svg?token=91urGyEqZhmpDJMxDzye&branch=main)](https://app.travis-ci.com/snaeimi/REWET)

# REWET

REstoration of Water after Event Tool (REWET) is a tool for simulating the functionality of water distribution networks after natural hazard events. It is designed to support any network with state-of-the-art hydraulic simulation capabilities and damage modeling.

# Documentation

REWET's [documentation](https://snaeimi.github.io/REWET) is being devloped and is accessible. Meanwhile, please refer to the [PhD Dissertation](https://udspace.udel.edu/items/c0977c19-7138-4220-aa30-b4de91af084b).

## Installation

The current release of REWET (V0.2.0-Alpha.1) supports Windows, Linux, and MacOS(Excluding M1, M2 and M3 CPUS). The repository version also supports Linux AMD64.

### 1. Dependencies and Virtual Environment

To install the package, first install the dependencies. Using a virtual environment with [Python virtual environment](https://docs.python.org/3/library/venv.html) or [Anaconda](https://www.anaconda.com) is recommended.

> [!NOTE]
> We leave creating and activating a virtual environment to the users. The links provided above are sufficient for learning how to do so.

### 2. Install REWET

For installing REWET, please make sure you have Python installed on your machine. The latest version of the Pyhton that we tested REWET with is 3.9.13. However, you may be able to run REWET with higher version too. We just did not test it! Also, the oldest version of Python that REWET works with is 3.6. Based n your needs, you can choose one of the following methods.

#### 2.1 PyPi

After activating the virtual environment, you can easily install REWET using PyPi. To so so, open the comman prompt/terminal in your machine and type the following:

```bash
pip3 install rewet
```

#### 2.2 Download the Repository

 You can also use GIT to clone REWET's repository and change the current directory to the cloned repository:

```bash
git clone https://github.com/snaeimi/REWET.git
cd REWET
```
Alternatively, download the code and unzip the file from the project GitHub and change the current directory to the decompressed directory.

##### 2.2.1 Install as Users

Being in REWET's directory, type:

```bash
python -m pip install
```

##### 2.2.2 Install as Developers

Being in REWET's directory, type:

```bash
python -m pip install -e .
```

When you install REWET as developer (i.e., using "-e ."), the package is not coppied to where Python usually keeps its packages. This helps you to modify and use the code as you go.

## Usage

After installing REWET, you can use it in several ways. To run REWET, import and run it in any code:

```python
from rewet.initial import Starter
start = Starter()
start.run()
```

Running the code above will execute the example. However, you may want to run your own network and modify other inputs. To see a list of inputs, you can explore rewet/input/settings.py. Any variable in the process scenario settings classes can be an input to REWET. REWET accepts JSON formatted input with variables from the settings.py file. You need to overwrite the default variable values in settings.py with your own values using a JSON file and pass the JSON file path and name when you run REWET. For example, let's assume we want to change the simulation run to 1 day. We will make a JSON file called input.json and fill it with the following data:

```json
{
    "RUN_TIME": 86400,
}
```

After saving the file, we will pass the file path to the run function (the JSON file extension must be .json or REWET will not recognize it as a JSON file):

```python
from rewet.initial import Starter
start = Starter()
start.run("input.json")
```

## Contributtiom

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

For any potential collaboration, please contact the author.

## Citation

When you use REWET, please cite REWET as follows:

Sina Naeimi, Rachel A. Davidson. Forthcoming. "REWET: A Tool to Model System Function and Restoration of Damaged Water Supply Systems." [Forthcomming] *ASCE Journal of Infrastructure Systems*. 10.1061/JITSE4/ISENG-2427

## License
REWET is released under the MIT license. See [LICENSE](https://github.com/snaeimi/REWET/blob/main/LICENSE) for more details.

* **WNTR License:** is distributed under the MIT License. Please refer to the WNTR [license file](https://github.com/USEPA/WNTR/blob/main/LICENSE.md) for more information.
* **EPANET License:** EPANET is distributed under the Public Domain. Please refer to the EPANET [license file](https://raw.githubusercontent.com/USEPA/EPANET2.2/master/SRC_engines/LICENSE) for more information.

# News

REWET has been adapted in NHERI SimCenter's **R2DTool V4.2 [[1]](#1)**.

## ACKNOWLEDGMENTS

This project was funded by National Science Foundation Award No. CMMI-1735483. The developer also extends gratitude to the Los Angeles Department of Water and Power (LADWP) for providing the input and water network, which served as the testbed for the development of REWET. REWET was produced as part of a Doctoral Dissertation at the University of Delaware, supervised by Dr. Rachel Davidson, Department of Civil and Environmental Engineering, University of Delaware.

This project uses the following tools:
* **Water Network Tool for Resilience (WNTR) [[2]](#2)** developed by the U.S. Environmental Protection Agency. WNTR is a Python package designed for analyzing the resilience of water distribution networks. For more information about WNTR, visit the official WNTR [documentation](https://usepa.github.io/WNTR/).
* **EPANET [[3]](#3)** Developed by the U.S. Environmental Protection Agency, EPANET is a software application used throughout the world to model water distribution piping systems. For more information about EPANET, visit the official EPANET [documentation](https://www.epa.gov/water-research/epanet)

![image](doc/_static/UD_NSF_Logo.jpg)
## References
<a id="1">[1]</a>
Frank McKenna, Stevan Gavrilovic, Jinyan Zhao, Kuanshi Zhong, Adam Zsarnoczay, Barbaros Cetiner, Sang-ri Yi, Aakash Bangalore Satish, Sina Naeimi, & Pedro Arduino. (2024). NHERI-SimCenter/R2DTool: Version 4.2.0 (v4.2.0). Zenodo. https://doi.org/10.5281/zenodo.11175489

<a id="2">[2]</a>
Klise, K.A., Hart, D.B., Bynum, M., Hogge, J., Haxton, T., Murray, R., Burkhardt, J. (2020). Water Network Tool for Resilience (WNTR) User Manual: Version 0.2.3. U.S. EPA Office of Research and Development, Washington, DC, EPA/600/R-20/185, 82p.

<a id="3">[3]</a>
Rossman, L., H. Woo, M. Tryby, F. Shang, R. Janke, AND T. Haxton. EPANET 2.2 User Manual. U.S. Environmental Protection Agency, Washington, DC, EPA/600/R-20/133, 2020.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/snaeimi/WNTR",
    "name": "rewet",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "snaeimi@udel.edu",
    "keywords": null,
    "author": "Sina Naeimi",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a2/5f/9fabe61cbc5650ab8d4c509f2fc8fd266d4cc0714e355a5738376b7c5d7f/rewet-0.2.0b11.tar.gz",
    "platform": null,
    "description": "[![Build Status](https://app.travis-ci.com/snaeimi/REWET.svg?token=91urGyEqZhmpDJMxDzye&branch=main)](https://app.travis-ci.com/snaeimi/REWET)\r\n\r\n# REWET\r\n\r\nREstoration of Water after Event Tool (REWET) is a tool for simulating the functionality of water distribution networks after natural hazard events. It is designed to support any network with state-of-the-art hydraulic simulation capabilities and damage modeling.\r\n\r\n# Documentation\r\n\r\nREWET's [documentation](https://snaeimi.github.io/REWET) is being devloped and is accessible. Meanwhile, please refer to the [PhD Dissertation](https://udspace.udel.edu/items/c0977c19-7138-4220-aa30-b4de91af084b).\r\n\r\n## Installation\r\n\r\nThe current release of REWET (V0.2.0-Alpha.1) supports Windows, Linux, and MacOS(Excluding M1, M2 and M3 CPUS). The repository version also supports Linux AMD64.\r\n\r\n### 1. Dependencies and Virtual Environment\r\n\r\nTo install the package, first install the dependencies. Using a virtual environment with [Python virtual environment](https://docs.python.org/3/library/venv.html) or [Anaconda](https://www.anaconda.com) is recommended.\r\n\r\n> [!NOTE]\r\n> We leave creating and activating a virtual environment to the users. The links provided above are sufficient for learning how to do so.\r\n\r\n### 2. Install REWET\r\n\r\nFor installing REWET, please make sure you have Python installed on your machine. The latest version of the Pyhton that we tested REWET with is 3.9.13. However, you may be able to run REWET with higher version too. We just did not test it! Also, the oldest version of Python that REWET works with is 3.6. Based n your needs, you can choose one of the following methods.\r\n\r\n#### 2.1 PyPi\r\n\r\nAfter activating the virtual environment, you can easily install REWET using PyPi. To so so, open the comman prompt/terminal in your machine and type the following:\r\n\r\n```bash\r\npip3 install rewet\r\n```\r\n\r\n#### 2.2 Download the Repository\r\n\r\n You can also use GIT to clone REWET's repository and change the current directory to the cloned repository:\r\n\r\n```bash\r\ngit clone https://github.com/snaeimi/REWET.git\r\ncd REWET\r\n```\r\nAlternatively, download the code and unzip the file from the project GitHub and change the current directory to the decompressed directory.\r\n\r\n##### 2.2.1 Install as Users\r\n\r\nBeing in REWET's directory, type:\r\n\r\n```bash\r\npython -m pip install\r\n```\r\n\r\n##### 2.2.2 Install as Developers\r\n\r\nBeing in REWET's directory, type:\r\n\r\n```bash\r\npython -m pip install -e .\r\n```\r\n\r\nWhen you install REWET as developer (i.e., using \"-e .\"), the package is not coppied to where Python usually keeps its packages. This helps you to modify and use the code as you go.\r\n\r\n## Usage\r\n\r\nAfter installing REWET, you can use it in several ways. To run REWET, import and run it in any code:\r\n\r\n```python\r\nfrom rewet.initial import Starter\r\nstart = Starter()\r\nstart.run()\r\n```\r\n\r\nRunning the code above will execute the example. However, you may want to run your own network and modify other inputs. To see a list of inputs, you can explore rewet/input/settings.py. Any variable in the process scenario settings classes can be an input to REWET. REWET accepts JSON formatted input with variables from the settings.py file. You need to overwrite the default variable values in settings.py with your own values using a JSON file and pass the JSON file path and name when you run REWET. For example, let's assume we want to change the simulation run to 1 day. We will make a JSON file called input.json and fill it with the following data:\r\n\r\n```json\r\n{\r\n    \"RUN_TIME\": 86400,\r\n}\r\n```\r\n\r\nAfter saving the file, we will pass the file path to the run function (the JSON file extension must be .json or REWET will not recognize it as a JSON file):\r\n\r\n```python\r\nfrom rewet.initial import Starter\r\nstart = Starter()\r\nstart.run(\"input.json\")\r\n```\r\n\r\n## Contributtiom\r\n\r\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\r\n\r\nFor any potential collaboration, please contact the author.\r\n\r\n## Citation\r\n\r\nWhen you use REWET, please cite REWET as follows:\r\n\r\nSina Naeimi, Rachel A. Davidson. Forthcoming. \"REWET: A Tool to Model System Function and Restoration of Damaged Water Supply Systems.\" [Forthcomming] *ASCE Journal of Infrastructure Systems*. 10.1061/JITSE4/ISENG-2427\r\n\r\n## License\r\nREWET is released under the MIT license. See [LICENSE](https://github.com/snaeimi/REWET/blob/main/LICENSE) for more details.\r\n\r\n* **WNTR License:** is distributed under the MIT License. Please refer to the WNTR [license file](https://github.com/USEPA/WNTR/blob/main/LICENSE.md) for more information.\r\n* **EPANET License:** EPANET is distributed under the Public Domain. Please refer to the EPANET [license file](https://raw.githubusercontent.com/USEPA/EPANET2.2/master/SRC_engines/LICENSE) for more information.\r\n\r\n# News\r\n\r\nREWET has been adapted in NHERI SimCenter's **R2DTool V4.2 [[1]](#1)**.\r\n\r\n## ACKNOWLEDGMENTS\r\n\r\nThis project was funded by National Science Foundation Award No. CMMI-1735483. The developer also extends gratitude to the Los Angeles Department of Water and Power (LADWP) for providing the input and water network, which served as the testbed for the development of REWET. REWET was produced as part of a Doctoral Dissertation at the University of Delaware, supervised by Dr. Rachel Davidson, Department of Civil and Environmental Engineering, University of Delaware.\r\n\r\nThis project uses the following tools:\r\n* **Water Network Tool for Resilience (WNTR) [[2]](#2)** developed by the U.S. Environmental Protection Agency. WNTR is a Python package designed for analyzing the resilience of water distribution networks. For more information about WNTR, visit the official WNTR [documentation](https://usepa.github.io/WNTR/).\r\n* **EPANET [[3]](#3)** Developed by the U.S. Environmental Protection Agency, EPANET is a software application used throughout the world to model water distribution piping systems. For more information about EPANET, visit the official EPANET [documentation](https://www.epa.gov/water-research/epanet)\r\n\r\n![image](doc/_static/UD_NSF_Logo.jpg)\r\n## References\r\n<a id=\"1\">[1]</a>\r\nFrank McKenna, Stevan Gavrilovic, Jinyan Zhao, Kuanshi Zhong, Adam Zsarnoczay, Barbaros Cetiner, Sang-ri Yi, Aakash Bangalore Satish, Sina Naeimi, & Pedro Arduino. (2024). NHERI-SimCenter/R2DTool: Version 4.2.0 (v4.2.0). Zenodo. https://doi.org/10.5281/zenodo.11175489\r\n\r\n<a id=\"2\">[2]</a>\r\nKlise, K.A., Hart, D.B., Bynum, M., Hogge, J., Haxton, T., Murray, R., Burkhardt, J. (2020). Water Network Tool for Resilience (WNTR) User Manual: Version 0.2.3. U.S. EPA Office of Research and Development, Washington, DC, EPA/600/R-20/185, 82p.\r\n\r\n<a id=\"3\">[3]</a>\r\nRossman, L., H. Woo, M. Tryby, F. Shang, R. Janke, AND T. Haxton. EPANET 2.2 User Manual. U.S. Environmental Protection Agency, Washington, DC, EPA/600/R-20/133, 2020.\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "REstoration of Water after Event Tool (REWET)",
    "version": "0.2.0b11",
    "project_urls": {
        "Homepage": "https://github.com/snaeimi/WNTR"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed1a76afe3160585ea33a91ff2fb657de62e81b0d067a0c187ec6f878f127e12",
                "md5": "9cf2ca811e9b90b42449bf4b4b956a44",
                "sha256": "48dd5c1e659f97bdabbf51ce77d0ee176bc45394dd1753abcb55ed6638df866a"
            },
            "downloads": -1,
            "filename": "rewet-0.2.0b11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9cf2ca811e9b90b42449bf4b4b956a44",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 778233,
            "upload_time": "2024-12-10T21:31:21",
            "upload_time_iso_8601": "2024-12-10T21:31:21.220199Z",
            "url": "https://files.pythonhosted.org/packages/ed/1a/76afe3160585ea33a91ff2fb657de62e81b0d067a0c187ec6f878f127e12/rewet-0.2.0b11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a25f9fabe61cbc5650ab8d4c509f2fc8fd266d4cc0714e355a5738376b7c5d7f",
                "md5": "4cc4724f79b326b905570572bf08f5e6",
                "sha256": "5d4f3a4ad46e520edd06b84d31b0373bdadd6be85edcc7a219ae2ec843815ccb"
            },
            "downloads": -1,
            "filename": "rewet-0.2.0b11.tar.gz",
            "has_sig": false,
            "md5_digest": "4cc4724f79b326b905570572bf08f5e6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 742906,
            "upload_time": "2024-12-10T21:31:23",
            "upload_time_iso_8601": "2024-12-10T21:31:23.905505Z",
            "url": "https://files.pythonhosted.org/packages/a2/5f/9fabe61cbc5650ab8d4c509f2fc8fd266d4cc0714e355a5738376b7c5d7f/rewet-0.2.0b11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 21:31:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "snaeimi",
    "github_project": "WNTR",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "networkx",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "plotly",
            "specs": []
        },
        {
            "name": "folium",
            "specs": []
        },
        {
            "name": "utm",
            "specs": []
        },
        {
            "name": "openpyxl",
            "specs": []
        },
        {
            "name": "numpydocs",
            "specs": []
        },
        {
            "name": "nose",
            "specs": []
        }
    ],
    "lcname": "rewet"
}
        
Elapsed time: 0.68296s