epanet-plus 0.1.0__cp314-cp314t-musllinux_1_2_x86_64.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.

Files changed (106) hide show
  1. docs/conf.py +67 -0
  2. epanet-msx-src/dispersion.h +27 -0
  3. epanet-msx-src/hash.c +107 -0
  4. epanet-msx-src/hash.h +28 -0
  5. epanet-msx-src/include/epanetmsx.h +104 -0
  6. epanet-msx-src/include/epanetmsx_export.h +42 -0
  7. epanet-msx-src/mathexpr.c +937 -0
  8. epanet-msx-src/mathexpr.h +39 -0
  9. epanet-msx-src/mempool.c +204 -0
  10. epanet-msx-src/mempool.h +24 -0
  11. epanet-msx-src/msxchem.c +1285 -0
  12. epanet-msx-src/msxcompiler.c +368 -0
  13. epanet-msx-src/msxdict.h +42 -0
  14. epanet-msx-src/msxdispersion.c +586 -0
  15. epanet-msx-src/msxerr.c +116 -0
  16. epanet-msx-src/msxfile.c +260 -0
  17. epanet-msx-src/msxfuncs.c +175 -0
  18. epanet-msx-src/msxfuncs.h +35 -0
  19. epanet-msx-src/msxinp.c +1504 -0
  20. epanet-msx-src/msxout.c +398 -0
  21. epanet-msx-src/msxproj.c +791 -0
  22. epanet-msx-src/msxqual.c +2011 -0
  23. epanet-msx-src/msxrpt.c +400 -0
  24. epanet-msx-src/msxtank.c +422 -0
  25. epanet-msx-src/msxtoolkit.c +1164 -0
  26. epanet-msx-src/msxtypes.h +551 -0
  27. epanet-msx-src/msxutils.c +524 -0
  28. epanet-msx-src/msxutils.h +56 -0
  29. epanet-msx-src/newton.c +158 -0
  30. epanet-msx-src/newton.h +34 -0
  31. epanet-msx-src/rk5.c +287 -0
  32. epanet-msx-src/rk5.h +39 -0
  33. epanet-msx-src/ros2.c +293 -0
  34. epanet-msx-src/ros2.h +35 -0
  35. epanet-msx-src/smatrix.c +816 -0
  36. epanet-msx-src/smatrix.h +29 -0
  37. epanet-src/AUTHORS +60 -0
  38. epanet-src/LICENSE +21 -0
  39. epanet-src/enumstxt.h +151 -0
  40. epanet-src/epanet.c +5937 -0
  41. epanet-src/epanet2.c +961 -0
  42. epanet-src/epanet2.def +131 -0
  43. epanet-src/errors.dat +79 -0
  44. epanet-src/flowbalance.c +186 -0
  45. epanet-src/funcs.h +219 -0
  46. epanet-src/genmmd.c +1000 -0
  47. epanet-src/hash.c +177 -0
  48. epanet-src/hash.h +28 -0
  49. epanet-src/hydcoeffs.c +1303 -0
  50. epanet-src/hydraul.c +1164 -0
  51. epanet-src/hydsolver.c +781 -0
  52. epanet-src/hydstatus.c +442 -0
  53. epanet-src/include/epanet2.h +466 -0
  54. epanet-src/include/epanet2_2.h +1962 -0
  55. epanet-src/include/epanet2_enums.h +518 -0
  56. epanet-src/inpfile.c +884 -0
  57. epanet-src/input1.c +672 -0
  58. epanet-src/input2.c +970 -0
  59. epanet-src/input3.c +2265 -0
  60. epanet-src/leakage.c +527 -0
  61. epanet-src/mempool.c +146 -0
  62. epanet-src/mempool.h +24 -0
  63. epanet-src/output.c +853 -0
  64. epanet-src/project.c +1691 -0
  65. epanet-src/quality.c +695 -0
  66. epanet-src/qualreact.c +800 -0
  67. epanet-src/qualroute.c +696 -0
  68. epanet-src/report.c +1559 -0
  69. epanet-src/rules.c +1500 -0
  70. epanet-src/smatrix.c +871 -0
  71. epanet-src/text.h +508 -0
  72. epanet-src/types.h +928 -0
  73. epanet-src/util/cstr_helper.c +59 -0
  74. epanet-src/util/cstr_helper.h +38 -0
  75. epanet-src/util/errormanager.c +92 -0
  76. epanet-src/util/errormanager.h +39 -0
  77. epanet-src/util/filemanager.c +212 -0
  78. epanet-src/util/filemanager.h +81 -0
  79. epanet-src/validate.c +408 -0
  80. epanet.cpython-314t-x86_64-linux-musl.so +0 -0
  81. epanet_plus/VERSION +1 -0
  82. epanet_plus/__init__.py +8 -0
  83. epanet_plus/epanet_plus.c +118 -0
  84. epanet_plus/epanet_toolkit.py +2730 -0
  85. epanet_plus/epanet_wrapper.py +2429 -0
  86. epanet_plus/include/epanet_plus.h +9 -0
  87. epanet_plus-0.1.0.dist-info/METADATA +153 -0
  88. epanet_plus-0.1.0.dist-info/RECORD +106 -0
  89. epanet_plus-0.1.0.dist-info/WHEEL +5 -0
  90. epanet_plus-0.1.0.dist-info/licenses/LICENSE +21 -0
  91. epanet_plus-0.1.0.dist-info/top_level.txt +11 -0
  92. examples/basic_usage.py +35 -0
  93. examples/epanet_msx.py +35 -0
  94. python-extension/ext.c +344 -0
  95. python-extension/pyepanet.c +2150 -0
  96. python-extension/pyepanet.h +144 -0
  97. python-extension/pyepanet2.c +1835 -0
  98. python-extension/pyepanet2.h +142 -0
  99. python-extension/pyepanet_plus.c +37 -0
  100. python-extension/pyepanet_plus.h +4 -0
  101. python-extension/pyepanetmsx.c +388 -0
  102. python-extension/pyepanetmsx.h +35 -0
  103. tests/test_epanet.py +16 -0
  104. tests/test_epanetmsx.py +36 -0
  105. tests/test_epyt.py +114 -0
  106. 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,153 @@
1
+ Metadata-Version: 2.4
2
+ Name: epanet-plus
3
+ Version: 0.1.0
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
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Dynamic: license-file
25
+
26
+ [![pypi](https://img.shields.io/pypi/v/epanet-plus.svg)](https://pypi.org/project/epanet-plus/)
27
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
28
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/epanet-plus)
29
+ [![Build + Test](https://github.com/WaterFutures/EPANET-PLUS/actions/workflows/build_test.yml/badge.svg)](https://github.com/WaterFutures/EPANET-PLUS/actions/workflows/build_test.yml)
30
+ [![Documentation Status](https://readthedocs.org/projects/epanet-plus/badge/?version=stable)](https://epanet-plus.readthedocs.io/en/stable/?badge=stable)
31
+ [![Downloads](https://static.pepy.tech/badge/epanet-plus)](https://pepy.tech/project/epanet-plus)
32
+ [![Downloads](https://static.pepy.tech/badge/epanet-plus/month)](https://pepy.tech/project/epanet-plus)
33
+
34
+ # EPANET-PLUS
35
+
36
+ EPANET-PLUS is a C library that merges [EPANET](https://github.com/OpenWaterAnalytics/EPANET)
37
+ and [EPANET-MSX](https://github.com/OpenWaterAnalytics/epanet-msx) into a single library.
38
+ Most importantly, it also provides a Python package with a high-performance interface
39
+ (i.e., C extension) to the C library, together with additional helper functions for an easier
40
+ use of EPANET and EPANET-MSX.
41
+
42
+ ## Unique Features
43
+
44
+ Unique features of EPANET-PLUS that make it superior to other Python interfaces of EPANET are the following:
45
+
46
+ - High-performance (single) interface to the latest version of EPANET and EPANET-MSX
47
+ - Additional C-functions to extend EPANET and EPANET-MSX
48
+ - Python toolkit with handy functions for working with EPANET and EPANET-MSX
49
+
50
+ ## Installation
51
+
52
+ Note that EPANET-PLUS supports Python 3.9 - 3.14.
53
+ The Python package contains the the C library as a C extension and is
54
+ already pre-build for all major platforms.
55
+
56
+ ### PyPI
57
+
58
+ ```
59
+ pip install epanet-plus
60
+ ```
61
+
62
+
63
+ ### Git
64
+
65
+ Download or clone the repository:
66
+
67
+ ```
68
+ git clone https://github.com/WaterFutures/EPANET-PLUS.git
69
+ cd EPANET-PLUS
70
+ ```
71
+
72
+ Install all requirements as listed in [REQUIREMENTS.txt](https://raw.githubusercontent.com/WaterFutures/EPANET-PLUS/main/REQUIREMENTS.txt):
73
+
74
+ ```
75
+ pip install -r REQUIREMENTS.txt
76
+ ```
77
+
78
+ Build and install the package:
79
+
80
+ ```
81
+ pip install .
82
+ ```
83
+
84
+ ## Quick Example
85
+
86
+ ```python
87
+ from epanet_plus import EPyT, EpanetConstants
88
+
89
+ if __name__ == "__main__":
90
+ # Load an .inp file in EPANET using the toolkit class
91
+ epanet_api = EPyT("net2-cl2.inp")
92
+
93
+ # Print some general information
94
+ print(f"All nodes: {epanet_api.get_all_nodes_id()}")
95
+ print(f"All links: {epanet_api.get_all_links_id()}")
96
+
97
+ print(f"Simulation duration in seconds: {epanet_api.get_simulation_duration()}")
98
+ print(f"Hydraulic time step in seconds: {epanet_api.get_hydraulic_time_step()}")
99
+ print(f"Demand model: {epanet_api.get_demand_model()}")
100
+
101
+ # Run hydraulic simulation and output pressure at each node (at every simulation step)
102
+ epanet_api.openH()
103
+ epanet_api.initH(EpanetConstants.EN_NOSAVE)
104
+
105
+ tstep = 1
106
+ r = []
107
+ while tstep > 0:
108
+ t = epanet_api.runH()
109
+
110
+ print(epanet_api.getnodevalues(EpanetConstants.EN_PRESSURE))
111
+
112
+ tstep = epanet_api.nextH()
113
+
114
+ epanet_api.closeH()
115
+
116
+ # Close EPANET
117
+ epanet_api.close()
118
+ ```
119
+
120
+ ## Documentation
121
+
122
+ Documentation is available on readthedocs: [https://epanet-plus.readthedocs.io/en/latest/](https://epanet-plus.readthedocs.io/en/stable)
123
+
124
+ # License
125
+
126
+ MIT license -- see [LICENSE](LICENSE)
127
+
128
+ ## How to Cite?
129
+
130
+ If you use this software, please cite it as follows:
131
+
132
+ ```bibtex
133
+ @misc{github:epanetplus,
134
+ author = {André Artelt},
135
+ title = {{EPANET-PLUS}},
136
+ year = {2025},
137
+ publisher = {GitHub},
138
+ journal = {GitHub repository},
139
+ howpublished = {https://github.com/WaterFutures/EPANET-PLUS}
140
+ }
141
+ ```
142
+
143
+ ## How to get Support?
144
+
145
+ If you come across any bug or need assistance please feel free to open a new
146
+ [issue](https://github.com/WaterFutures/EPyT-Flow/issues/)
147
+ if non of the existing issues answers your questions.
148
+
149
+ ## How to Contribute?
150
+
151
+ Contributions (e.g. creating issues, pull-requests, etc.) are welcome --
152
+ please make sure to read the [code of conduct](CODE_OF_CONDUCT.md) and
153
+ follow the [developers' guidelines](DEVELOPERS.md).
@@ -0,0 +1,106 @@
1
+ epanet.cpython-314t-x86_64-linux-musl.so,sha256=8mpaf7sy-UuQvAQz-8PcsQOSqSIHCTDoS3W8eGxDdw4,1976000
2
+ docs/conf.py,sha256=xd41cfAn4qscUNt--XoojOmgC9kWUI7ZNfpLjbRPpuU,2132
3
+ epanet-msx-src/dispersion.h,sha256=qYeHTzI4N2Y2ja0qGkKUBG6aGaD_erNgvHuhGgy0iLM,941
4
+ epanet-msx-src/hash.c,sha256=bxilMFOs3t-UuI2ZxJQZrjbUi6sUNMrp6MO0Q5snMmo,2848
5
+ epanet-msx-src/hash.h,sha256=2C4ebltth9ekERJvJy8QI2s-4zpIudpqW5bdy2IIeSA,412
6
+ epanet-msx-src/mathexpr.c,sha256=ZddmJu3NvnmOZwqF58vXcy4x8fijB86DzSi_sr-g8b0,23189
7
+ epanet-msx-src/mathexpr.h,sha256=1nbte9BLbqk8l9Ai2HhY1rqSmEUw0Ex03goUWBaN3QQ,1342
8
+ epanet-msx-src/mempool.c,sha256=WR_2IU5YdYD74f-s4gr2ia9AlgNXMMoLCdXxdVbseQM,4283
9
+ epanet-msx-src/mempool.h,sha256=zErH6G07mEDdrBRe-VoaEzjyuxD8RICxAAv9ROpnkGQ,455
10
+ epanet-msx-src/msxchem.c,sha256=CzJoJyAepVAylmKH78uucUKYz3Ng4CkCy2RI2Mv4h-E,35046
11
+ epanet-msx-src/msxcompiler.c,sha256=mYzjdspLZSZM7L2ECgzmHOk_VoqB_cf0mcbL-oMrG1s,10817
12
+ epanet-msx-src/msxdict.h,sha256=1nAa1vhcJUY8QFgigPXRaZcbNxJwyQ1awpeuD5nmbrQ,2147
13
+ epanet-msx-src/msxdispersion.c,sha256=qsFYBGV1OUkGTnSa6u6gy-qebiV7NqyISZo_MoHBbi0,14274
14
+ epanet-msx-src/msxerr.c,sha256=kFqe96sn-kFjj6PwwLKyJ3fAQ0dslVc8PE-e2AM6fKU,3055
15
+ epanet-msx-src/msxfile.c,sha256=rVG-dKgvfrhaNP-Sy1_4EmTWi8GCwlAqYa0Vbnnk8aY,7068
16
+ epanet-msx-src/msxfuncs.c,sha256=uXdp0LUQapVIgE9Yj0V9qG99SSrvqzIt7olysuRKbJQ,4364
17
+ epanet-msx-src/msxfuncs.h,sha256=P7BfVu7xrFp7DUfNcO-TuBIITcPEJYmqkKRVdj_k5Qs,1337
18
+ epanet-msx-src/msxinp.c,sha256=QNrZt2yLo7sXiK4QXgMskDNXYXXmS5iyCZIxkC4WWT0,38985
19
+ epanet-msx-src/msxout.c,sha256=x_gLPmsFfh1Bqb3J9GrPcVKdCpyVB2vNyf2HBf3sBZg,11246
20
+ epanet-msx-src/msxproj.c,sha256=Of2YTh98MXMUv2ZiwNyUcKf7gh2QsYVEMV_yJiQ7bBs,21817
21
+ epanet-msx-src/msxqual.c,sha256=6Aj6Lu9ehnmjp-9AL3kN34aG4NaD8a9I6MQX93IjEpE,57805
22
+ epanet-msx-src/msxrpt.c,sha256=RW-sD7Q1LaxKLNSBXrxSkEKerGNCMMdA9BkSkJm3Pis,11505
23
+ epanet-msx-src/msxtank.c,sha256=UNeZg9pcBjx8kHiVgDWWAPrfOrUDr3gpEwDO66_bh20,12126
24
+ epanet-msx-src/msxtoolkit.c,sha256=0KgIpPP28-sOCCExBaq1Hh8ib2J-W65kNf0-fR5D5OE,33863
25
+ epanet-msx-src/msxtypes.h,sha256=0LSgX4yiCxWBuFm0Dt1lD0lryRob5T8x38ukXWg9rSc,24060
26
+ epanet-msx-src/msxutils.c,sha256=HLPavITgmlX9-s6mOUkQPt3noQUiv0I1gT_59Q33dfs,12104
27
+ epanet-msx-src/msxutils.h,sha256=R1qNWqw74TcaAErzzeBjXnH6cwDX2NYvQYX-pc4mfMA,1811
28
+ epanet-msx-src/newton.c,sha256=tgbGLLn_cwbD7zKu5DA1xZfx2h8mKsSIO09vhYiMI-Y,4387
29
+ epanet-msx-src/newton.h,sha256=mkSbH7deDiL83DstIt1xLoC933G0gc16ofc7QL04r5s,1090
30
+ epanet-msx-src/rk5.c,sha256=3rCy4ivgbwZXS0DfCckrdO_bpFqhsaFTtFDCA7sC3UA,9778
31
+ epanet-msx-src/rk5.h,sha256=HzbHtGY4vMc16-CtBoM1epjQgt53NJ44asBnIW_3L3c,1280
32
+ epanet-msx-src/ros2.c,sha256=ycMgrsopw2yD_nKRfjUaGY-fWibrR124PPugkwcFikg,8542
33
+ epanet-msx-src/ros2.h,sha256=Ll-IInq4X1pVGchQH8PRGiPPLhoson7Vt0w3c0_Xx1o,1249
34
+ epanet-msx-src/smatrix.c,sha256=l4VVV_44Jm7xAqQ4EEk66JZCyZ0MWOFwm99VAqgq5l4,28375
35
+ epanet-msx-src/smatrix.h,sha256=heHTNgQNNDTs_Jx0YBts7_B7dPg8VUF1jgBBmU-qbfc,1567
36
+ epanet-msx-src/include/epanetmsx.h,sha256=P4baHSK7NQzuwYhrWLE0VmieTlXW2XOQF52UgyhZDuk,3456
37
+ epanet-msx-src/include/epanetmsx_export.h,sha256=h5UMaf6pH_0asRJOmhWUGAZhyA180ui2Cz8_y5h1FKw,1054
38
+ epanet-src/AUTHORS,sha256=8nnSXx3x4js8FtPZrcluaIbwm5vUxxCZlGhAAx2XALc,1916
39
+ epanet-src/LICENSE,sha256=XrPEC-tu4Ha8AGxwh4uSTgaENMyXGrsTdVOzsFBk8A0,1090
40
+ epanet-src/enumstxt.h,sha256=aJYz_VOnGF4oJ3spdtbHlJq7k3rJSjc0koszg32Y9FI,4974
41
+ epanet-src/epanet.c,sha256=3r7smEFzN4Ndt4d8V_YBFaTRqQGg9k2k1B6B2gK5lw4,182356
42
+ epanet-src/epanet2.c,sha256=AgRfutfQraTcjrE-IlEbejg_BxuzS_Ly98i6OIW3a80,27910
43
+ epanet-src/epanet2.def,sha256=5265uHv5EV-GSO5XbdXvod469pencib1LZThMyJ7siM,7782
44
+ epanet-src/errors.dat,sha256=5p-lbCKco6-iNNLVUKohi4eLa3sE1l4_F3BuALmW3WE,3014
45
+ epanet-src/flowbalance.c,sha256=zEFAgmMRtKR9KJkEKb7j3JXui01jsnj1zLJiGI3Y_ik,5661
46
+ epanet-src/funcs.h,sha256=bpm0sKJnH9Mydl-HCeLrAZ9kcFn8jZu1a0OMcPYosxQ,7018
47
+ epanet-src/genmmd.c,sha256=qM0JX1LbiGTawbANyXs93XK-khVPMyWhiGQRNQ8SSKE,32936
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=CP0p6F-8000e_9153T9qruJPPjICL1J6Wd2uxNhi7kc,38589
51
+ epanet-src/hydraul.c,sha256=VlAsh6sfSqn-HGwI0LrO0khDP823Rdayc-KUNEl8OfQ,33686
52
+ epanet-src/hydsolver.c,sha256=tO6zfzyzhoDXGjReE0CRn2_EtEYIM9cxO4kp4-VA3_M,25428
53
+ epanet-src/hydstatus.c,sha256=C7X660ow5T1AmSqIB-EHc7xD5NoF_dGqS9NrufERGi8,13196
54
+ epanet-src/inpfile.c,sha256=obYLcr4DikW89h_uBc-LvLViU2m9gJozZa1CsXy19nY,28208
55
+ epanet-src/input1.c,sha256=W8DJFAaaOwyfiBWei8pVZNAvXyIqlkbxncdliHTLepc,22899
56
+ epanet-src/input2.c,sha256=qJUHBY-tcmXLriah3VOTNTNnbUvWNtrh_L7gy0ftysA,29542
57
+ epanet-src/input3.c,sha256=SZpAWtSus00dd78MrFo5JQW1qXE9P0RD_mRXuoHUqwI,68743
58
+ epanet-src/leakage.c,sha256=ygnmgJCAZhpzERdM2hQATlOmbNexH2RclXlH3r8x6Zs,16470
59
+ epanet-src/mempool.c,sha256=3idwF-IfhG4fWZPeESnmG2nWeRpdATaPpiNkPC6wGus,3646
60
+ epanet-src/mempool.h,sha256=JKSJX5vBHjhQ3_rme6MtAkXSy2KPbiKu-7-nMRcp5I8,677
61
+ epanet-src/output.c,sha256=SuOVWz0ZT3hqxqXKOc2DAt7sg3XKKPhKqel89FR0LKU,26680
62
+ epanet-src/project.c,sha256=Z1K01Of1ga4wB6paXkhklM6Z_ny94IZ6pYINFpHVzHM,51675
63
+ epanet-src/quality.c,sha256=dbm7zLxaFu-UaUVRf3ZVMg_aYGKOL7gGKMTFxaR28fE,19839
64
+ epanet-src/qualreact.c,sha256=W2nxecPc3E44EkRUWU_bSFmA_SNYUKMkpIDsVxXSa5E,23731
65
+ epanet-src/qualroute.c,sha256=nq0DtBsWYukvZxn0yYYdYjiGm7kyiAvhqJXEc0FL8sw,21714
66
+ epanet-src/report.c,sha256=AbKWhEj4itrGgSVWgSr2Z6fZcIpBN1qvOA2cV5C0-HM,46033
67
+ epanet-src/rules.c,sha256=OaJIr1WCZ0keJp8mxJs2-S_mE8QB1TVKEeprAfhof5Y,39491
68
+ epanet-src/smatrix.c,sha256=NNZIRSKTyzfi_fdWyqwcUsqJXRjFC2pnmRZhTrLX3oA,26020
69
+ epanet-src/text.h,sha256=sFv5LZQ-7pKRz9xe6NVMT2PeJZzdeuP4jE6CIYXqu9M,17731
70
+ epanet-src/types.h,sha256=3y8YCn5xCQgzDB-_2UUH_BRPmLm16-zyUyEaBb6EGG0,33129
71
+ epanet-src/validate.c,sha256=nT6Xyd2E0ZXVZEZj2Zuo-K_TOBznIGrODUXqXmpMcCI,12117
72
+ epanet-src/include/epanet2.h,sha256=qggFwluyLeh0ZudO3aCowpq3Bq5da9exd5qhoXDCcEw,15274
73
+ epanet-src/include/epanet2_2.h,sha256=JAs1spcJixip6zdSd0G-cWG19PGKBR6CKQM5UDGJiJg,77508
74
+ epanet-src/include/epanet2_enums.h,sha256=vP4c3AhIB6Md2HLS8YaKVXADUqXiuJSu1NmNDl9vhEY,22683
75
+ epanet-src/util/cstr_helper.c,sha256=qFvFKXV0YLtk_Q79T0ERuXlgvsgznPMQKbpzz40xbkI,1348
76
+ epanet-src/util/cstr_helper.h,sha256=2ivKuiOY097jBCFb0hWWoSgZqrxUyo6BVVbdmqkTYlc,727
77
+ epanet-src/util/errormanager.c,sha256=yvdysNOo6yeoSWWYYGsBn6ywtpTmuV5Qpq4Vy_QIdLs,2058
78
+ epanet-src/util/errormanager.h,sha256=ghebj0NO_1lvmFncgUt35t9Z9D4zrWwTSnpxzyfahig,982
79
+ epanet-src/util/filemanager.c,sha256=ul4LdINZ8Lb273KPCRWo1KjCLC6dIzhWE62sXJwX5kc,4666
80
+ epanet-src/util/filemanager.h,sha256=QM0J6ED52S-LjJIOJ3zYw0KRSGnQ9KCogJtf77kqsb0,1844
81
+ epanet_plus/VERSION,sha256=atlhOkVXmNbZLl9fOQq0uqcFlryGntaxf1zdKyhjXwY,5
82
+ epanet_plus/__init__.py,sha256=XorLU8AO-crTDUwlM-EVyrOYynh3FrGkhQuSsWwI9Ls,215
83
+ epanet_plus/epanet_plus.c,sha256=zWfYlLgYdQCQtIkVHNpgEBOBqJefeJX7H3cHZThkxnw,3183
84
+ epanet_plus/epanet_toolkit.py,sha256=VNAV_oqIWvuvuK7EvfV8DAc-3v94GIAeJvx1oUIVgEM,80937
85
+ epanet_plus/epanet_wrapper.py,sha256=e0DkZhO3wwi8Sp2d7ft1tE2OLNkn0twGGHaq_ltz-eY,73572
86
+ epanet_plus/include/epanet_plus.h,sha256=z2PEExuz6szxUp1k5vwsMQy2uSRz_X-W9B7xSP2f33s,340
87
+ examples/basic_usage.py,sha256=c2PlqGFLPxpoe2f37neEN4T479deTqummNfojumzLUo,1087
88
+ examples/epanet_msx.py,sha256=_aPu9DaXH4H1tC6MEg8s2_8__W7QEhDGRGdprXaYbDY,1220
89
+ python-extension/ext.c,sha256=sjDx2HWTY9Ov35rxDH0E6szI249YDCK5DT2EKLFSfVg,38183
90
+ python-extension/pyepanet.c,sha256=uc3gVN7uoMLLC3shTRnfAz5RMsK4D9Bt88kAnR0Hmrc,56051
91
+ python-extension/pyepanet.h,sha256=RUQ79GAv58Wo_FqFXcUgz4MpPA_t6tWze0P4wjFniJE,9153
92
+ python-extension/pyepanet2.c,sha256=KfoGO2AJQ4ttoKNpPYo3Z57HmJaR5vVsnlcF7bSi9TY,44875
93
+ python-extension/pyepanet2.h,sha256=tmaekND6Zb00Tl99TAa5M53nQnsoPZ-L0LfM1JKgBsA,9122
94
+ python-extension/pyepanet_plus.c,sha256=A_6eN31QeNBw3nfACpblDsvndzvKB1N9Bq4qT6f6UUs,938
95
+ python-extension/pyepanet_plus.h,sha256=2Pz6cVxJas_nlcYVeYU3xnqXMTcsCJ18P-vnnZa_YAs,156
96
+ python-extension/pyepanetmsx.c,sha256=3uZcfLpyVFhOxzyqk-1iuLV8XRAcprOsKUCkj57JmL4,9282
97
+ python-extension/pyepanetmsx.h,sha256=BXI0jBTl2RzAaogfIeALgv7n1-pizSVtYqUtupEVTkQ,2088
98
+ tests/test_epanet.py,sha256=jgiqFiHZ3UB7on6WzbWKS6D0aXxIUTBCexDGoSmLitQ,463
99
+ tests/test_epanetmsx.py,sha256=mAKTEscKVcZG_RKZg7fco7G6CQmLNK0XKnPJpT0EeFs,996
100
+ tests/test_epyt.py,sha256=ZTIi5f4gfTPFCjIvpnGopcf5s8tAEDsAcha7QJUIxtc,3533
101
+ tests/test_load_inp_from_buffer.py,sha256=-EqeKqI_-FNcARpe1SPrBs7lSNtMvfw6oUKyDPhIabo,543
102
+ epanet_plus-0.1.0.dist-info/METADATA,sha256=N_Go9IvqsySan_q-JBbGvUXX44ACz-3_Fl0-ssm0Evk,5275
103
+ epanet_plus-0.1.0.dist-info/WHEEL,sha256=zXoM281zyz8wppofreMuq3eZjd9HP4BgZS1rfYnrpIs,113
104
+ epanet_plus-0.1.0.dist-info/top_level.txt,sha256=igwRsFnggi2fSCG7AHkP3LfOLlgsT2aUu0oa8DpvHDo,103
105
+ epanet_plus-0.1.0.dist-info/RECORD,,
106
+ epanet_plus-0.1.0.dist-info/licenses/LICENSE,sha256=q5jqVgUtLMJstE7DSa26FnVk3N2yAuQPCW6wCtQm6Eo,1074
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314t-musllinux_1_2_x86_64
5
+
@@ -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.
@@ -0,0 +1,11 @@
1
+ build
2
+ docs
3
+ epanet
4
+ epanet-msx-src
5
+ epanet-src
6
+ epanet_plus
7
+ examples
8
+ python-extension
9
+ src
10
+ tests
11
+ wheelhouse
@@ -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()
examples/epanet_msx.py ADDED
@@ -0,0 +1,35 @@
1
+ """
2
+ Basic example demonstrating how to run an EPANET-MSX simulation.
3
+ """
4
+ from epanet_plus import EPyT, EpanetConstants
5
+
6
+
7
+ if __name__ == "__main__":
8
+ # Load an .inp and .msx file -- recall that for using EPANET-MSX,
9
+ # we have to fall back to EPANET < 2.2 (i.e., use_project=False)
10
+ epanet_api = EPyT("net2-cl2.inp", use_project=False)
11
+ epanet_api.load_msx_file("net2-cl2.msx")
12
+
13
+ print(f"Simulation duration: {epanet_api.gettimeparam(EpanetConstants.EN_DURATION)}")
14
+
15
+ # Solve hydraulics by calling MSXsolveH -- alternatively, the hydraulics can be solved
16
+ # in EPANET once and exported as a .hyd file, which can then be loaded into EPANET-MSX
17
+ epanet_api.MSXsolveH()
18
+
19
+ #epanet_api.solveH() # Only do this once -- you can then just load the .hyd file
20
+ #epanet_api.savehydfile("mySimNet2.hyd")
21
+ #epanet_api.MSXusehydfile("mySimNet2.hyd")
22
+
23
+ # Run EPANET-MSX simulation
24
+ epanet_api.MSXinit(0)
25
+ print(f"Species ID: {epanet_api.MSXgetindex(EpanetConstants.MSX_SPECIES, 'CL2')}")
26
+
27
+ while True:
28
+ t, tleft = epanet_api.MSXstep()
29
+
30
+ print(f"{epanet_api.MSXgetqual(EpanetConstants.MSX_NODE, 2, 1)} mg/L")
31
+
32
+ if tleft == 0:
33
+ break
34
+
35
+ epanet_api.close()