epanet-plus 0.0.1__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of epanet-plus might be problematic. Click here for more details.
- docs/conf.py +67 -0
- epanet-msx-src/dispersion.h +27 -0
- epanet-msx-src/hash.c +107 -0
- epanet-msx-src/hash.h +28 -0
- epanet-msx-src/include/epanetmsx.h +104 -0
- epanet-msx-src/include/epanetmsx_export.h +42 -0
- epanet-msx-src/mathexpr.c +937 -0
- epanet-msx-src/mathexpr.h +39 -0
- epanet-msx-src/mempool.c +204 -0
- epanet-msx-src/mempool.h +24 -0
- epanet-msx-src/msxchem.c +1285 -0
- epanet-msx-src/msxcompiler.c +368 -0
- epanet-msx-src/msxdict.h +42 -0
- epanet-msx-src/msxdispersion.c +586 -0
- epanet-msx-src/msxerr.c +116 -0
- epanet-msx-src/msxfile.c +260 -0
- epanet-msx-src/msxfuncs.c +175 -0
- epanet-msx-src/msxfuncs.h +35 -0
- epanet-msx-src/msxinp.c +1504 -0
- epanet-msx-src/msxout.c +398 -0
- epanet-msx-src/msxproj.c +791 -0
- epanet-msx-src/msxqual.c +2011 -0
- epanet-msx-src/msxrpt.c +400 -0
- epanet-msx-src/msxtank.c +422 -0
- epanet-msx-src/msxtoolkit.c +1164 -0
- epanet-msx-src/msxtypes.h +551 -0
- epanet-msx-src/msxutils.c +524 -0
- epanet-msx-src/msxutils.h +56 -0
- epanet-msx-src/newton.c +158 -0
- epanet-msx-src/newton.h +34 -0
- epanet-msx-src/rk5.c +287 -0
- epanet-msx-src/rk5.h +39 -0
- epanet-msx-src/ros2.c +293 -0
- epanet-msx-src/ros2.h +35 -0
- epanet-msx-src/smatrix.c +816 -0
- epanet-msx-src/smatrix.h +29 -0
- epanet-src/AUTHORS +60 -0
- epanet-src/LICENSE +21 -0
- epanet-src/enumstxt.h +151 -0
- epanet-src/epanet.c +5937 -0
- epanet-src/epanet2.c +961 -0
- epanet-src/epanet2.def +131 -0
- epanet-src/errors.dat +79 -0
- epanet-src/flowbalance.c +186 -0
- epanet-src/funcs.h +219 -0
- epanet-src/genmmd.c +1000 -0
- epanet-src/hash.c +177 -0
- epanet-src/hash.h +28 -0
- epanet-src/hydcoeffs.c +1303 -0
- epanet-src/hydraul.c +1164 -0
- epanet-src/hydsolver.c +781 -0
- epanet-src/hydstatus.c +442 -0
- epanet-src/include/epanet2.h +466 -0
- epanet-src/include/epanet2_2.h +1962 -0
- epanet-src/include/epanet2_enums.h +518 -0
- epanet-src/inpfile.c +884 -0
- epanet-src/input1.c +672 -0
- epanet-src/input2.c +970 -0
- epanet-src/input3.c +2265 -0
- epanet-src/leakage.c +527 -0
- epanet-src/mempool.c +146 -0
- epanet-src/mempool.h +24 -0
- epanet-src/output.c +853 -0
- epanet-src/project.c +1691 -0
- epanet-src/quality.c +695 -0
- epanet-src/qualreact.c +800 -0
- epanet-src/qualroute.c +696 -0
- epanet-src/report.c +1559 -0
- epanet-src/rules.c +1500 -0
- epanet-src/smatrix.c +871 -0
- epanet-src/text.h +508 -0
- epanet-src/types.h +928 -0
- epanet-src/util/cstr_helper.c +59 -0
- epanet-src/util/cstr_helper.h +38 -0
- epanet-src/util/errormanager.c +92 -0
- epanet-src/util/errormanager.h +39 -0
- epanet-src/util/filemanager.c +212 -0
- epanet-src/util/filemanager.h +81 -0
- epanet-src/validate.c +408 -0
- epanet.cp312-win_amd64.pyd +0 -0
- epanet_plus/VERSION +1 -0
- epanet_plus/__init__.py +8 -0
- epanet_plus/epanet_plus.c +118 -0
- epanet_plus/epanet_toolkit.py +2730 -0
- epanet_plus/epanet_wrapper.py +2414 -0
- epanet_plus/include/epanet_plus.h +9 -0
- epanet_plus-0.0.1.dist-info/METADATA +152 -0
- epanet_plus-0.0.1.dist-info/RECORD +105 -0
- epanet_plus-0.0.1.dist-info/WHEEL +5 -0
- epanet_plus-0.0.1.dist-info/licenses/LICENSE +21 -0
- epanet_plus-0.0.1.dist-info/top_level.txt +11 -0
- examples/basic_usage.py +35 -0
- python-extension/ext.c +344 -0
- python-extension/pyepanet.c +2133 -0
- python-extension/pyepanet.h +143 -0
- python-extension/pyepanet2.c +1823 -0
- python-extension/pyepanet2.h +141 -0
- python-extension/pyepanet_plus.c +37 -0
- python-extension/pyepanet_plus.h +4 -0
- python-extension/pyepanetmsx.c +388 -0
- python-extension/pyepanetmsx.h +35 -0
- tests/test_epanet.py +16 -0
- tests/test_epanetmsx.py +36 -0
- tests/test_epyt.py +114 -0
- tests/test_load_inp_from_buffer.py +18 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#ifndef EPANETPLUS_H
|
|
2
|
+
#define EPANETPLUS_H
|
|
3
|
+
|
|
4
|
+
#include "epanet2_2.h"
|
|
5
|
+
|
|
6
|
+
int DLLEXPORT ENopenfrombuffer(const char *inpBuffer, const char *inpFile, const char *rptFile, const char *outFile);
|
|
7
|
+
int DLLEXPORT EN_openfrombuffer(EN_Project p, const char *inpBuffer, const char *inpFile, const char *rptFile, const char *outFile);
|
|
8
|
+
|
|
9
|
+
#endif //EPANETPLUS_H
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: epanet-plus
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Python interface for EPANET-PLUS (incl. EPANET and EPANET-MSX)
|
|
5
|
+
Author-email: André Artelt <aartelt@techfak.uni-bielefeld.de>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/WaterFutures/EPANET-PLUS
|
|
8
|
+
Project-URL: Documentation, https://epanet-plus.readthedocs.io/en/stable/
|
|
9
|
+
Project-URL: Repository, https://github.com/WaterFutures/EPANET-PLUS.git
|
|
10
|
+
Project-URL: Issues, https://github.com/WaterFutures/EPANET-PLUS/issues
|
|
11
|
+
Keywords: epanet,water,networks,hydraulics,quality,simulations
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
[](https://pypi.org/project/epanet-plus/)
|
|
26
|
+
[](https://opensource.org/licenses/MIT)
|
|
27
|
+

|
|
28
|
+
[](https://github.com/WaterFutures/EPANET-PLUS/actions/workflows/build.yml)
|
|
29
|
+
[](https://epanet-plus.readthedocs.io/en/stable/?badge=stable)
|
|
30
|
+
[](https://pepy.tech/project/epanet-plus)
|
|
31
|
+
[](https://pepy.tech/project/epanet-plus)
|
|
32
|
+
|
|
33
|
+
# EPANET-PLUS
|
|
34
|
+
|
|
35
|
+
EPANET-PLUS is a C library that merges [EPANET](https://github.com/OpenWaterAnalytics/EPANET)
|
|
36
|
+
and [EPANET-MSX](https://github.com/OpenWaterAnalytics/epanet-msx) into a single library.
|
|
37
|
+
Most importantly, it also provides a Python package with a high-performance interface
|
|
38
|
+
(i.e., C extension) to the C library, together with additional helper functions for an easier
|
|
39
|
+
use of EPANET and EPANET-MSX.
|
|
40
|
+
|
|
41
|
+
## Unique Features
|
|
42
|
+
|
|
43
|
+
Unique features of EPANET-PLUS that make it superior to other Python interfaces of EPANET are the following:
|
|
44
|
+
|
|
45
|
+
- High-performance (single) interface to the latest version of EPANET and EPANET-MSX
|
|
46
|
+
- Additional C-functions to extend EPANET and EPANET-MSX
|
|
47
|
+
- Python toolkit with handy functions for working with EPANET and EPANET-MSX
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
Note that EPANET-PLUS supports Python 3.9 - 3.13.
|
|
52
|
+
The Python package contains the the C library as a C extension and is
|
|
53
|
+
already pre-build for all major platforms.
|
|
54
|
+
|
|
55
|
+
### PyPI
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
pip install epanet-plus
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Git
|
|
63
|
+
|
|
64
|
+
Download or clone the repository:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
git clone https://github.com/WaterFutures/EPANET-PLUS.git
|
|
68
|
+
cd EPANET-PLUS
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Install all requirements as listed in [REQUIREMENTS.txt](https://raw.githubusercontent.com/WaterFutures/EPANET-PLUS/main/REQUIREMENTS.txt):
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
pip install -r REQUIREMENTS.txt
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Build and install the package:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
pip install .
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Quick Example
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from epanet_plus import EPyT, EpanetConstants
|
|
87
|
+
|
|
88
|
+
if __name__ == "__main__":
|
|
89
|
+
# Load an .inp file in EPANET using the toolkit class
|
|
90
|
+
epanet_api = EPyT("net2-cl2.inp")
|
|
91
|
+
|
|
92
|
+
# Print some general information
|
|
93
|
+
print(f"All nodes: {epanet_api.get_all_nodes_id()}")
|
|
94
|
+
print(f"All links: {epanet_api.get_all_links_id()}")
|
|
95
|
+
|
|
96
|
+
print(f"Simulation duration in seconds: {epanet_api.get_simulation_duration()}")
|
|
97
|
+
print(f"Hydraulic time step in seconds: {epanet_api.get_hydraulic_time_step()}")
|
|
98
|
+
print(f"Demand model: {epanet_api.get_demand_model()}")
|
|
99
|
+
|
|
100
|
+
# Run hydraulic simulation and output pressure at each node (at every simulation step)
|
|
101
|
+
epanet_api.openH()
|
|
102
|
+
epanet_api.initH(EpanetConstants.EN_NOSAVE)
|
|
103
|
+
|
|
104
|
+
tstep = 1
|
|
105
|
+
r = []
|
|
106
|
+
while tstep > 0:
|
|
107
|
+
t = epanet_api.runH()
|
|
108
|
+
|
|
109
|
+
print(epanet_api.getnodevalues(EpanetConstants.EN_PRESSURE))
|
|
110
|
+
|
|
111
|
+
tstep = epanet_api.nextH()
|
|
112
|
+
|
|
113
|
+
epanet_api.closeH()
|
|
114
|
+
|
|
115
|
+
# Close EPANET
|
|
116
|
+
epanet_api.close()
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
Documentation is available on readthedocs: [https://epanet-plus.readthedocs.io/en/latest/](https://epanet-plus.readthedocs.io/en/stable)
|
|
122
|
+
|
|
123
|
+
# License
|
|
124
|
+
|
|
125
|
+
MIT license -- see [LICENSE](LICENSE)
|
|
126
|
+
|
|
127
|
+
## How to Cite?
|
|
128
|
+
|
|
129
|
+
If you use this software, please cite it as follows:
|
|
130
|
+
|
|
131
|
+
```bibtex
|
|
132
|
+
@misc{github:epanetplus,
|
|
133
|
+
author = {André Artelt},
|
|
134
|
+
title = {{EPANET-PLUS}},
|
|
135
|
+
year = {2025},
|
|
136
|
+
publisher = {GitHub},
|
|
137
|
+
journal = {GitHub repository},
|
|
138
|
+
howpublished = {https://github.com/WaterFutures/EPANET-PLUS}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## How to get Support?
|
|
143
|
+
|
|
144
|
+
If you come across any bug or need assistance please feel free to open a new
|
|
145
|
+
[issue](https://github.com/WaterFutures/EPyT-Flow/issues/)
|
|
146
|
+
if non of the existing issues answers your questions.
|
|
147
|
+
|
|
148
|
+
## How to Contribute?
|
|
149
|
+
|
|
150
|
+
Contributions (e.g. creating issues, pull-requests, etc.) are welcome --
|
|
151
|
+
please make sure to read the [code of conduct](CODE_OF_CONDUCT.md) and
|
|
152
|
+
follow the [developers' guidelines](DEVELOPERS.md).
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
epanet.cp312-win_amd64.pyd,sha256=iKTQ5Rk_AGlBq3ZgmqnSjP6UfJOMIYSPnT1ZA9sj3Gc,494080
|
|
2
|
+
docs/conf.py,sha256=tsJLrKG1OZnnK8B0mzDX3fbG4CYe_rIRZvTH3JkvN7Y,2199
|
|
3
|
+
epanet-msx-src/dispersion.h,sha256=rarrxJdtslA_yuZXei5xFN9j7nqWn5L9F4aLMPsCIh4,967
|
|
4
|
+
epanet-msx-src/hash.c,sha256=IVzS2dWv8-GVJsQrWOP3ypcOizyfA16CnLpVhQ56ePQ,2955
|
|
5
|
+
epanet-msx-src/hash.h,sha256=gKnEBrs9hWfv8SKyaOvKaMkBrr44rNb-h6KZbIdANLk,439
|
|
6
|
+
epanet-msx-src/mathexpr.c,sha256=ivCaxJffFBd6p-YzNzoX57wZFZgPTh_rcdh5EjZ24dc,24126
|
|
7
|
+
epanet-msx-src/mathexpr.h,sha256=wJJTrTrmAWDRkzIgNHF7p_jxnXNd69uec7RqXrdVv_0,1380
|
|
8
|
+
epanet-msx-src/mempool.c,sha256=rfGP_agEY-i-SsVJKviD7-_vk_RdzyrP3DfZVuYNTXs,4487
|
|
9
|
+
epanet-msx-src/mempool.h,sha256=kgP5P_QD6mqXiEGIRITyJQvGVLYtnkq8gUNTb5AkM04,478
|
|
10
|
+
epanet-msx-src/msxchem.c,sha256=D39Qj_aaB0Ot8Cb5HVF_7LflJuSGFGRiO09GXBpjJsE,36331
|
|
11
|
+
epanet-msx-src/msxcompiler.c,sha256=CydiyoWXcdvPatH8Ff-ACAcgSHE6WfcYNcPe0CwsIxA,11185
|
|
12
|
+
epanet-msx-src/msxdict.h,sha256=rVLtMeI59afHk96LVwZEIjnvxqDh7smQhpQbF-brFqQ,2188
|
|
13
|
+
epanet-msx-src/msxdispersion.c,sha256=HdlIqDqjZQx-thrO5W4WK7UF19lzG-GHR-1-9rXARSU,14860
|
|
14
|
+
epanet-msx-src/msxerr.c,sha256=ioVGpCeOYj0tJTW7gfSJQ14ikCf5INZP7qtUI9nrz6g,3171
|
|
15
|
+
epanet-msx-src/msxfile.c,sha256=0VP4HZ3PZ8TKSycGf_lbqnqzpimtOfsEELIHbVxNYe8,7328
|
|
16
|
+
epanet-msx-src/msxfuncs.c,sha256=e_xiu1BHMzIyhUeJ9F9ooPWzfHoDNZCUtXu6RuWP3AQ,4539
|
|
17
|
+
epanet-msx-src/msxfuncs.h,sha256=BKzJabhH0mRqxbWS-Dvx1sSEWqCLdZ3d6scLAyP6Qig,1372
|
|
18
|
+
epanet-msx-src/msxinp.c,sha256=qUoY08W7LF1XsWZLgtTlADDk84DfykRJg7HtTsZaoHE,40489
|
|
19
|
+
epanet-msx-src/msxout.c,sha256=R7_IC99EiRm-fgTToqVWhLG9Gw2lSiOb4a2DIDhswOE,11644
|
|
20
|
+
epanet-msx-src/msxproj.c,sha256=1EMPk10OcrRea3GXEyB-7oLEQ2P0EljCT3Jd0WzD6r0,22608
|
|
21
|
+
epanet-msx-src/msxqual.c,sha256=FLXiejunlrPm3mTeABNHOwzz19D1CHjJWgEHw4Qvbpc,59816
|
|
22
|
+
epanet-msx-src/msxrpt.c,sha256=_4E3VqvdPyjYidlg7qYVKQ5gN5W5ohRcaQ2MvRx3U9E,11905
|
|
23
|
+
epanet-msx-src/msxtank.c,sha256=roMDzpbMmpjnNpdHmGFS7DvgaFup4f-0YYfae71MZuQ,12548
|
|
24
|
+
epanet-msx-src/msxtoolkit.c,sha256=hp2uhMFsuCaI8Y4yK-KpkpSSl5ojla9q7AF9nKtq9mU,35027
|
|
25
|
+
epanet-msx-src/msxtypes.h,sha256=P_Dlyk66zggHHwJ0IM7tdDX_mxRZUDf-lsoq06SUi14,24611
|
|
26
|
+
epanet-msx-src/msxutils.c,sha256=dRveaUajCMZwY2WgRuxb0PxMqzFXqIayW7mJRXgGqjA,12628
|
|
27
|
+
epanet-msx-src/msxutils.h,sha256=l5Lb5rYaMIqHmmF5gURoFeCrbTyRtvA-KY__IGxsTOY,1866
|
|
28
|
+
epanet-msx-src/newton.c,sha256=HJKUcpUk2-iYdY_mKpEBRPYEcZutE6la70U3f5K0Cj0,4545
|
|
29
|
+
epanet-msx-src/newton.h,sha256=2TxBrWm0Vc9FMRg6cxMb9s7TELbSJXn7zMjDrFRHlCg,1123
|
|
30
|
+
epanet-msx-src/rk5.c,sha256=ichUxza0xhWDb1MU_rLE96KFTG5JOsiFa9lg4YpXRI8,10065
|
|
31
|
+
epanet-msx-src/rk5.h,sha256=s9YK_xfMM2lu5nedejpOWl_c5cJDt5EoDUkW7jjBfms,1318
|
|
32
|
+
epanet-msx-src/ros2.c,sha256=dbSsCY6fBNd1qP-59rQ-3a4PC6NfPg2NvWWY620mHzU,8835
|
|
33
|
+
epanet-msx-src/ros2.h,sha256=2UPFaf9a5Nc0BcjsYInHHWaACR-MU5XPCWuR6z22fRU,1283
|
|
34
|
+
epanet-msx-src/smatrix.c,sha256=UVE0wC-U7xnyzIgkuXr4tk_GpWUe21zhvvLMs9mQC9o,29191
|
|
35
|
+
epanet-msx-src/smatrix.h,sha256=b8eXu452KqnrX3RnXvUzDxdjDt-rCdGa9YALw4_33Bo,1595
|
|
36
|
+
epanet-msx-src/include/epanetmsx.h,sha256=IlSbhXdWumc2_-TjwqubDi2QiV8OxLjsWBY5TIlmwx8,3560
|
|
37
|
+
epanet-msx-src/include/epanetmsx_export.h,sha256=Fj4ukyt0cBjWf42_RzExLKpGJYtUNC_xEPldLTahHi8,1096
|
|
38
|
+
epanet-src/AUTHORS,sha256=d86hyyUe9EHkuG-WerPEH5ZuC8sUFJ_a8iQHqnnVgAo,1975
|
|
39
|
+
epanet-src/LICENSE,sha256=b-DrAt6Koi0xuriXZlzI121f4IfRQi3PqEa4-Y0Qq-I,1111
|
|
40
|
+
epanet-src/enumstxt.h,sha256=zPo9fOIiZGSeeb-dsKsblI_DGFZm30_F9jbJ5rwHm8Q,5125
|
|
41
|
+
epanet-src/epanet.c,sha256=Up0cdn8y_anKRKuRwEHl2tkhYj0nNunyWOUxscwRezM,188293
|
|
42
|
+
epanet-src/epanet2.c,sha256=9XwFsLxXDKs9f9R0DjWf4ny_unTlQ3BdXQ0TVjg9JeE,28871
|
|
43
|
+
epanet-src/epanet2.def,sha256=tTd9iVkaxYVl8PsJA5GW3TVAo01on2NanZ61jmaf5r4,7913
|
|
44
|
+
epanet-src/errors.dat,sha256=oXBQsN__7PW701PzjydKuFy6OhVqhxRT9hA-0X5bA4s,3093
|
|
45
|
+
epanet-src/flowbalance.c,sha256=NaumLvjxNlLSu5C5wotQdqbSNLh4ST8PYMeiZWbzyjc,5847
|
|
46
|
+
epanet-src/funcs.h,sha256=oxPpJw0ZH_mjkEIIQDpeQA8CnPLOguiV0MyjRoxEJnY,7237
|
|
47
|
+
epanet-src/genmmd.c,sha256=XrdQW6KXASJpznA3LvpyMwoYLjqB1XkSN7NLQN__o3c,33936
|
|
48
|
+
epanet-src/hash.c,sha256=wY8Rzw-93oNrXUOFsfe4NVRn7NYXhlVHAciQm11goH0,4231
|
|
49
|
+
epanet-src/hash.h,sha256=xRyuJSJz6tQB9Jds6FZtE57kIWq3bgJUf-Bis--QcJI,896
|
|
50
|
+
epanet-src/hydcoeffs.c,sha256=HBbJXsVz9PUgk60UX8oTndbRGsR1UNzE4rCeOo-e7dI,39892
|
|
51
|
+
epanet-src/hydraul.c,sha256=yZksKlXgWm5-8dKlRK9cpt_anRhSxk57H1Ms2-Wny_Q,34850
|
|
52
|
+
epanet-src/hydsolver.c,sha256=GR97KFLlpWMewlepESN29SeVjwMTkJF46u2FTD5ou_g,26209
|
|
53
|
+
epanet-src/hydstatus.c,sha256=EdPMmjf8Crp5NmYspVSOp6MwzmkpJb9zwYe6a3iK7Ms,13638
|
|
54
|
+
epanet-src/inpfile.c,sha256=exWK1YALYNS-olSLFt2kuzBfM-ijmS9o2l5sQ03OQnk,29092
|
|
55
|
+
epanet-src/input1.c,sha256=pShfrWHZzmwRRHxEmcPKqQ4csn7K1PJ8QcXjwBIWxm4,23571
|
|
56
|
+
epanet-src/input2.c,sha256=YAwTw8HibQPwWTbh5kIdfXHwsAQZV-RkLzMfVdZq9gg,30512
|
|
57
|
+
epanet-src/input3.c,sha256=EMYmWolDUFTPUl-bDDi1tIWCZ2_YF65E9uMTdgbvJGg,71008
|
|
58
|
+
epanet-src/leakage.c,sha256=9TKoY_1Wpf0PC2I58cECBQYCs4CvU7I-bGmEWss_wRo,16997
|
|
59
|
+
epanet-src/mempool.c,sha256=DNUmOvCP7hPkPgDnjc7giP5k2TtHMjuZZgEAb9ijSQs,3792
|
|
60
|
+
epanet-src/mempool.h,sha256=JKSJX5vBHjhQ3_rme6MtAkXSy2KPbiKu-7-nMRcp5I8,677
|
|
61
|
+
epanet-src/output.c,sha256=gwGtNv0jbD-VTyNFNpf-8liYfh-cSfQqYBRCgIlV64A,27533
|
|
62
|
+
epanet-src/project.c,sha256=-sGx1hzfVwYgBGBO1tKb__3it8WR0sLvDuNkY16EIVc,53366
|
|
63
|
+
epanet-src/quality.c,sha256=1Il3IlE2HN6CjE-jXbT3gvxjBi2AQdSBhC7JJCzJEuA,20534
|
|
64
|
+
epanet-src/qualreact.c,sha256=pwHvluFvVoA_33XjSTvJkGra14RUB2OtXkIM-QKPssI,24531
|
|
65
|
+
epanet-src/qualroute.c,sha256=L_dDknae5NENwU6bS2SlBGHxw4Ls_ZH7AaKKrqg7PIc,22410
|
|
66
|
+
epanet-src/report.c,sha256=BY3A8f0esuU1027bEhl7xaiRCd2BmGryyxBIHfvL5GI,47592
|
|
67
|
+
epanet-src/rules.c,sha256=m4yI5T3hiqQzVBgKbeWCdNyZSzaxYYEifBrSc1xmofA,40991
|
|
68
|
+
epanet-src/smatrix.c,sha256=wDELfwvJOmZqcywydRx5s-Lx9Yh9dCMUADEuPDtgonU,26891
|
|
69
|
+
epanet-src/text.h,sha256=3LjaCSxVNdwIGI4BINFuQjW7EoG7o9mP4lPDTVC2Dj8,18239
|
|
70
|
+
epanet-src/types.h,sha256=oXXEeq_vccygAkuJnjOlCVALzFtKfQ6vcR1H954Hz00,34057
|
|
71
|
+
epanet-src/validate.c,sha256=AwBLo4ey47dL0wY5HbgzK1hCce7OlOLvmlz6aY5QCRM,12525
|
|
72
|
+
epanet-src/include/epanet2.h,sha256=xzyfIBXheVMft7Ef1WUN7ASE7dLMvomR2kpM-kvyF7A,15740
|
|
73
|
+
epanet-src/include/epanet2_2.h,sha256=XCCBQfjQFCtCvz4hKkG-rjg4OO45KDC-Y5UBGMTaE_w,79470
|
|
74
|
+
epanet-src/include/epanet2_enums.h,sha256=kvVVwmPiRTuSFeWISbh_Gb8NaQerb7ok5nybuUtb36Q,23201
|
|
75
|
+
epanet-src/util/cstr_helper.c,sha256=hQhJ2V3kh-2CJwI1GvLB453wY4mtyQ5k-NePYnk6bqY,1407
|
|
76
|
+
epanet-src/util/cstr_helper.h,sha256=6yud22Ef9upF4lGFnI8WefEVtyZrkPCry8QGjqgvhZQ,765
|
|
77
|
+
epanet-src/util/errormanager.c,sha256=ooXxWIppEVavff6TKKto8Q6NCgNvwyh9foT1j9ingfs,2150
|
|
78
|
+
epanet-src/util/errormanager.h,sha256=U31MIi-DL7xa-IhXJoAGBFRsoUl7YDtzj8OQDHpJDCs,1021
|
|
79
|
+
epanet-src/util/filemanager.c,sha256=fs8H97AN8ZFyJV2sbJYiBW2i3e--MELZfMOU52oZqUs,4878
|
|
80
|
+
epanet-src/util/filemanager.h,sha256=Ktdb0aGoxgiAmYuqrc4Mc3vQGQ3CYDfMBzc0U-3qGjY,1925
|
|
81
|
+
epanet_plus/VERSION,sha256=axN4nkPlSFY0Uz3hamXYup00xMl1hYi2ZYBUNfgOsRU,5
|
|
82
|
+
epanet_plus/__init__.py,sha256=6LIHTbuelmJeIKzQomyObM4lrlZJEKhDgrEFGd-gCj4,223
|
|
83
|
+
epanet_plus/epanet_plus.c,sha256=KnuP2GwTK56vmNN_742si856WDEa-PyuCifryzSCQB4,3301
|
|
84
|
+
epanet_plus/epanet_toolkit.py,sha256=71lhwvBubd8USwDTHjHVbAy4gKkHhpLikpL05sFaJ_w,83667
|
|
85
|
+
epanet_plus/epanet_wrapper.py,sha256=U7Xa9KKbazodWV768S0g0_7zQ5CF44qEfD7wrC0FHrw,75540
|
|
86
|
+
epanet_plus/include/epanet_plus.h,sha256=lSCjHsQRSl2fS2lLcC_lj_6N4g9KanUBBuWqmPvrThs,348
|
|
87
|
+
epanet_plus-0.0.1.dist-info/licenses/LICENSE,sha256=SkZQpJ9ap2kNSGgeKesdFgWc73oFIgLP1UmSStMM8ms,1095
|
|
88
|
+
examples/basic_usage.py,sha256=yHAg16dAjGa-ktyVjT5MeL8Rh5dYpWsUrh81N2zywtw,1122
|
|
89
|
+
python-extension/ext.c,sha256=HRAB553RjcNlgoBYnuNbt5IYFZymmUGZ65PSqYfe-dw,38527
|
|
90
|
+
python-extension/pyepanet.c,sha256=iLpv-rBz5i_KuUG4Hwc9qRk7mfGVD8001kZ5KeHqFA8,57772
|
|
91
|
+
python-extension/pyepanet.h,sha256=l9PdEJrMeyfrxfBQqLOiPn6AZ4etHaC7JWW-HATszlE,9236
|
|
92
|
+
python-extension/pyepanet2.c,sha256=M2DZazB_tM0SmlkqqSnYHHaNJhoBOToC8qXqz-o0K84,46389
|
|
93
|
+
python-extension/pyepanet2.h,sha256=-JdfrKuEsanNnQQQrP_s46W0_OvBXPOgoy4I43sjyqA,9204
|
|
94
|
+
python-extension/pyepanet_plus.c,sha256=yq0MGLq6EyTDYTSM9jM-h1rrYWvqo1tQjg1sAwfqtco,975
|
|
95
|
+
python-extension/pyepanet_plus.h,sha256=CN4Dyfdi4B-EkYuzsoPbxOq7hT2DSHbnxMSD-2085p0,160
|
|
96
|
+
python-extension/pyepanetmsx.c,sha256=NQOCcP8roqBPwFZUIKZbnGf0dVfin_LzsS6Nzu2Oreg,9670
|
|
97
|
+
python-extension/pyepanetmsx.h,sha256=d9wP7VtjD-VMDczVoBp9mJ5f7MpZCgdsQeGrfbqSvBU,2123
|
|
98
|
+
tests/test_epanet.py,sha256=0umog3hTNUFyN2vrlS6U423w422WfZvLAq3N1CinPWU,479
|
|
99
|
+
tests/test_epanetmsx.py,sha256=2zp2pb_5slxlfv2O1ti7igdpb10hQ9q4q0Y0jenzFlk,1032
|
|
100
|
+
tests/test_epyt.py,sha256=kUuF8p4nUNr-2MGVzSGp3eHamF--UsnhNPNsvgRjxsM,3647
|
|
101
|
+
tests/test_load_inp_from_buffer.py,sha256=7MLhiEk8qGKmUR4mJid8VEO5ZF8djfzmtL_hVAVezzA,561
|
|
102
|
+
epanet_plus-0.0.1.dist-info/METADATA,sha256=StwQ9sWl6yr44C-28khd6PcHJ290s73pMxkgUj4Nq0g,5359
|
|
103
|
+
epanet_plus-0.0.1.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
|
104
|
+
epanet_plus-0.0.1.dist-info/top_level.txt,sha256=igwRsFnggi2fSCG7AHkP3LfOLlgsT2aUu0oa8DpvHDo,103
|
|
105
|
+
epanet_plus-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) EPANET-PLUS Developers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
examples/basic_usage.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Basic example showing how to load an .inp file and run a hydraulic simulation.
|
|
3
|
+
"""
|
|
4
|
+
from epanet_plus import EPyT, EpanetConstants
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
if __name__ == "__main__":
|
|
8
|
+
# Load an .inp file in EPANET using the toolkit class
|
|
9
|
+
epanet_api = EPyT("net2-cl2.inp")
|
|
10
|
+
|
|
11
|
+
# Print some general information
|
|
12
|
+
print(f"All nodes: {epanet_api.get_all_nodes_id()}")
|
|
13
|
+
print(f"All links: {epanet_api.get_all_links_id()}")
|
|
14
|
+
|
|
15
|
+
print(f"Simulation duration in seconds: {epanet_api.get_simulation_duration()}")
|
|
16
|
+
print(f"Hydraulic time step in seconds: {epanet_api.get_hydraulic_time_step()}")
|
|
17
|
+
print(f"Demand model: {epanet_api.get_demand_model()}")
|
|
18
|
+
|
|
19
|
+
# Run hydraulic simulation and output pressure at each node (at every simulation step)
|
|
20
|
+
epanet_api.openH()
|
|
21
|
+
epanet_api.initH(EpanetConstants.EN_NOSAVE)
|
|
22
|
+
|
|
23
|
+
tstep = 1
|
|
24
|
+
r = []
|
|
25
|
+
while tstep > 0:
|
|
26
|
+
t = epanet_api.runH()
|
|
27
|
+
|
|
28
|
+
print(f"Current pressure per node: {epanet_api.getnodevalues(EpanetConstants.EN_PRESSURE)}")
|
|
29
|
+
|
|
30
|
+
tstep = epanet_api.nextH()
|
|
31
|
+
|
|
32
|
+
epanet_api.closeH()
|
|
33
|
+
|
|
34
|
+
# Close EPANET
|
|
35
|
+
epanet_api.close()
|