epyt-flow 0.1.0__tar.gz

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.
Files changed (140) hide show
  1. epyt_flow-0.1.0/CODE_OF_CONDUCT.md +128 -0
  2. epyt_flow-0.1.0/LICENSE +21 -0
  3. epyt_flow-0.1.0/MANIFEST.in +13 -0
  4. epyt_flow-0.1.0/PKG-INFO +139 -0
  5. epyt_flow-0.1.0/README.md +105 -0
  6. epyt_flow-0.1.0/REQUIREMENTS.txt +11 -0
  7. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +28 -0
  8. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +21 -0
  9. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +18 -0
  10. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +134 -0
  11. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +5578 -0
  12. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +865 -0
  13. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +131 -0
  14. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +73 -0
  15. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +193 -0
  16. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c +1000 -0
  17. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/hash.c +177 -0
  18. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/hash.h +28 -0
  19. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +1151 -0
  20. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +1117 -0
  21. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +720 -0
  22. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +476 -0
  23. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +431 -0
  24. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +1786 -0
  25. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +468 -0
  26. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +810 -0
  27. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/input1.c +707 -0
  28. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/input2.c +864 -0
  29. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/input3.c +2170 -0
  30. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/main.c +93 -0
  31. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +142 -0
  32. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +24 -0
  33. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/output.c +852 -0
  34. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/project.c +1359 -0
  35. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/quality.c +685 -0
  36. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +743 -0
  37. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +694 -0
  38. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/report.c +1489 -0
  39. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/rules.c +1362 -0
  40. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +871 -0
  41. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/text.h +497 -0
  42. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET/SRC_engines/types.h +874 -0
  43. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt +53 -0
  44. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h +27 -0
  45. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/hash.c +107 -0
  46. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/hash.h +28 -0
  47. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx.h +102 -0
  48. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx_export.h +42 -0
  49. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.c +937 -0
  50. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.h +39 -0
  51. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/mempool.c +204 -0
  52. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/mempool.h +24 -0
  53. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxchem.c +1285 -0
  54. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxcompiler.c +368 -0
  55. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxdict.h +42 -0
  56. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxdispersion.c +586 -0
  57. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxerr.c +116 -0
  58. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxfile.c +260 -0
  59. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.c +175 -0
  60. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.h +35 -0
  61. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxinp.c +1504 -0
  62. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxout.c +401 -0
  63. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxproj.c +791 -0
  64. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxqual.c +2010 -0
  65. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxrpt.c +400 -0
  66. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxtank.c +422 -0
  67. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxtoolkit.c +1164 -0
  68. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxtypes.h +551 -0
  69. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.c +524 -0
  70. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.h +56 -0
  71. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/newton.c +158 -0
  72. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/newton.h +34 -0
  73. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/rk5.c +287 -0
  74. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/rk5.h +39 -0
  75. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/ros2.c +293 -0
  76. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/ros2.h +35 -0
  77. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.c +816 -0
  78. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.h +29 -0
  79. epyt_flow-0.1.0/epyt_flow/EPANET/EPANET-MSX/readme.txt +14 -0
  80. epyt_flow-0.1.0/epyt_flow/EPANET/compile.sh +4 -0
  81. epyt_flow-0.1.0/epyt_flow/VERSION +1 -0
  82. epyt_flow-0.1.0/epyt_flow/__init__.py +24 -0
  83. epyt_flow-0.1.0/epyt_flow/data/__init__.py +0 -0
  84. epyt_flow-0.1.0/epyt_flow/data/benchmarks/__init__.py +11 -0
  85. epyt_flow-0.1.0/epyt_flow/data/benchmarks/batadal.py +257 -0
  86. epyt_flow-0.1.0/epyt_flow/data/benchmarks/batadal_data.py +28 -0
  87. epyt_flow-0.1.0/epyt_flow/data/benchmarks/battledim.py +473 -0
  88. epyt_flow-0.1.0/epyt_flow/data/benchmarks/battledim_data.py +51 -0
  89. epyt_flow-0.1.0/epyt_flow/data/benchmarks/gecco_water_quality.py +267 -0
  90. epyt_flow-0.1.0/epyt_flow/data/benchmarks/leakdb.py +592 -0
  91. epyt_flow-0.1.0/epyt_flow/data/benchmarks/leakdb_data.py +18923 -0
  92. epyt_flow-0.1.0/epyt_flow/data/benchmarks/water_usage.py +123 -0
  93. epyt_flow-0.1.0/epyt_flow/data/networks.py +650 -0
  94. epyt_flow-0.1.0/epyt_flow/gym/__init__.py +4 -0
  95. epyt_flow-0.1.0/epyt_flow/gym/control_gyms.py +47 -0
  96. epyt_flow-0.1.0/epyt_flow/gym/scenario_control_env.py +101 -0
  97. epyt_flow-0.1.0/epyt_flow/metrics.py +404 -0
  98. epyt_flow-0.1.0/epyt_flow/models/__init__.py +2 -0
  99. epyt_flow-0.1.0/epyt_flow/models/event_detector.py +31 -0
  100. epyt_flow-0.1.0/epyt_flow/models/sensor_interpolation_detector.py +118 -0
  101. epyt_flow-0.1.0/epyt_flow/rest_api/__init__.py +4 -0
  102. epyt_flow-0.1.0/epyt_flow/rest_api/base_handler.py +70 -0
  103. epyt_flow-0.1.0/epyt_flow/rest_api/res_manager.py +95 -0
  104. epyt_flow-0.1.0/epyt_flow/rest_api/scada_data_handler.py +476 -0
  105. epyt_flow-0.1.0/epyt_flow/rest_api/scenario_handler.py +352 -0
  106. epyt_flow-0.1.0/epyt_flow/rest_api/server.py +106 -0
  107. epyt_flow-0.1.0/epyt_flow/serialization.py +438 -0
  108. epyt_flow-0.1.0/epyt_flow/simulation/__init__.py +5 -0
  109. epyt_flow-0.1.0/epyt_flow/simulation/events/__init__.py +6 -0
  110. epyt_flow-0.1.0/epyt_flow/simulation/events/actuator_events.py +259 -0
  111. epyt_flow-0.1.0/epyt_flow/simulation/events/event.py +81 -0
  112. epyt_flow-0.1.0/epyt_flow/simulation/events/leakages.py +404 -0
  113. epyt_flow-0.1.0/epyt_flow/simulation/events/sensor_faults.py +267 -0
  114. epyt_flow-0.1.0/epyt_flow/simulation/events/sensor_reading_attack.py +185 -0
  115. epyt_flow-0.1.0/epyt_flow/simulation/events/sensor_reading_event.py +170 -0
  116. epyt_flow-0.1.0/epyt_flow/simulation/events/system_event.py +88 -0
  117. epyt_flow-0.1.0/epyt_flow/simulation/parallel_simulation.py +147 -0
  118. epyt_flow-0.1.0/epyt_flow/simulation/scada/__init__.py +3 -0
  119. epyt_flow-0.1.0/epyt_flow/simulation/scada/advanced_control.py +134 -0
  120. epyt_flow-0.1.0/epyt_flow/simulation/scada/scada_data.py +1589 -0
  121. epyt_flow-0.1.0/epyt_flow/simulation/scada/scada_data_export.py +255 -0
  122. epyt_flow-0.1.0/epyt_flow/simulation/scenario_config.py +608 -0
  123. epyt_flow-0.1.0/epyt_flow/simulation/scenario_simulator.py +1897 -0
  124. epyt_flow-0.1.0/epyt_flow/simulation/scenario_visualizer.py +61 -0
  125. epyt_flow-0.1.0/epyt_flow/simulation/sensor_config.py +1289 -0
  126. epyt_flow-0.1.0/epyt_flow/topology.py +290 -0
  127. epyt_flow-0.1.0/epyt_flow/uncertainty/__init__.py +3 -0
  128. epyt_flow-0.1.0/epyt_flow/uncertainty/model_uncertainty.py +302 -0
  129. epyt_flow-0.1.0/epyt_flow/uncertainty/sensor_noise.py +73 -0
  130. epyt_flow-0.1.0/epyt_flow/uncertainty/uncertainties.py +555 -0
  131. epyt_flow-0.1.0/epyt_flow/uncertainty/utils.py +206 -0
  132. epyt_flow-0.1.0/epyt_flow/utils.py +306 -0
  133. epyt_flow-0.1.0/epyt_flow.egg-info/PKG-INFO +139 -0
  134. epyt_flow-0.1.0/epyt_flow.egg-info/SOURCES.txt +138 -0
  135. epyt_flow-0.1.0/epyt_flow.egg-info/dependency_links.txt +1 -0
  136. epyt_flow-0.1.0/epyt_flow.egg-info/requires.txt +11 -0
  137. epyt_flow-0.1.0/epyt_flow.egg-info/top_level.txt +6 -0
  138. epyt_flow-0.1.0/pyproject.toml +40 -0
  139. epyt_flow-0.1.0/setup.cfg +4 -0
  140. epyt_flow-0.1.0/setup.py +3 -0
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ .
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 EPyT-Flow 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,13 @@
1
+ include epyt_flow/VERSION
2
+ recursive-include epyt_flow/EPANET *
3
+ exclude .*
4
+ exclude DEVELOPERS.md
5
+ exclude REQUIREMENTS-DEV.txt
6
+ exclude noxfile.py
7
+ exclude Makefile
8
+ exclude make.bat
9
+ recursive-exclude examples/ *
10
+ recursive-exclude paper/ *
11
+ recursive-exclude docs/ *
12
+ recursive-exclude tests/ *
13
+ recursive-exclude .github/ *
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.1
2
+ Name: epyt-flow
3
+ Version: 0.1.0
4
+ Summary: EPyT-Flow -- EPANET Python Toolkit - Flow
5
+ Author-email: André Artelt <aartelt@techfak.uni-bielefeld.de>, "Marios S. Kyriakou" <kiriakou.marios@ucy.ac.cy>, "Stelios G. Vrachimis" <vrachimis.stelios@ucy.ac.cy>
6
+ License: MIT License
7
+ Project-URL: Homepage, https://github.com/WaterFutures/EPyT-Flow
8
+ Project-URL: Documentation, https://epytflow.readthedocs.io/en/latest/
9
+ Project-URL: Repository, https://github.com/WaterFutures/EPyT-Flow.git
10
+ Project-URL: Issues, https://github.com/WaterFutures/EPyT-Flow/issues
11
+ Keywords: epanet,water,networks,hydraulics,quality,simulations
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: epyt>=1.1.3
24
+ Requires-Dist: requests>=2.31.0
25
+ Requires-Dist: scipy>=1.11.4
26
+ Requires-Dist: u-msgpack-python>=2.8.0
27
+ Requires-Dist: networkx>=3.2.1
28
+ Requires-Dist: scikit-learn>=1.4.0
29
+ Requires-Dist: tqdm>=4.66.2
30
+ Requires-Dist: openpyxl>=3.1.2
31
+ Requires-Dist: falcon>=3.1.3
32
+ Requires-Dist: multiprocess>=0.70.16
33
+ Requires-Dist: psutil
34
+
35
+ # EPyT-Flow -- EPANET Python Toolkit - Flow
36
+
37
+ EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
38
+ for providing easy access to water distribution network simulations.
39
+ It aims to provide a high-level interface for the easy generation of hydraulic and water quality scenario data.
40
+ However, it also provides access to low-level functions by [EPANET](https://github.com/USEPA/EPANET2.2)
41
+ and [EPANET-MSX](https://github.com/USEPA/EPANETMSX/).
42
+
43
+ EPyT-Flow provides easy access to popular benchmark data sets for event detection and localization.
44
+ Furthermore, it also provides an environment for developing and testing control algorithms.
45
+
46
+ ![](https://github.com/WaterFutures/EPyT-Flow/blob/main/docs/_static/net1_plot.png?raw=true)
47
+
48
+ ## Installation
49
+
50
+ EPyT-Flow supports Python 3.9 - 3.12
51
+
52
+ Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overrite the binaries
53
+ shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
54
+ a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
55
+
56
+ ### PyPI
57
+
58
+ ```
59
+ pip install epyt-flow
60
+ ```
61
+
62
+ ### Git
63
+ Download or clone the repository:
64
+ ```
65
+ git clone https://github.com/WaterFutures/EPyT-Flow.git
66
+ cd EPyT-Flow
67
+ ```
68
+
69
+ Install all requirements as listed in [REQUIREMENTS.txt](REQUIREMENTS.txt):
70
+ ```
71
+ pip install -r REQUIREMENTS.txt
72
+ ```
73
+
74
+ Install the toolbox:
75
+ ```
76
+ pip install .
77
+ ```
78
+
79
+ ## Quick Example
80
+
81
+ <a target="_blank" href="https://colab.research.google.com/github/WaterFutures/EPyT-Flow/blob/main/docs/examples/basic_usage.ipynb">
82
+ <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
83
+ </a>
84
+
85
+ ```python
86
+ from epyt_flow.data.benchmarks import load_leakdb_scenarios
87
+ from epyt_flow.simulation import ScenarioSimulator
88
+ from epyt_flow.utils import to_seconds
89
+
90
+
91
+ if __name__ == "__main__":
92
+ # Load first Hanoi scenario from LeakDB
93
+ network_config, = load_leakdb_scenarios(scenarios_id=["1"], use_net1=False)
94
+
95
+ # Create scenario
96
+ with ScenarioSimulator(scenario_config=network_config) as sim:
97
+ # Set simulation duration to two days
98
+ sim.set_general_parameters(simulation_duration=to_seconds(days=2))
99
+
100
+ # Place pressure sensors at nodes "13", "16", "22", and "30"
101
+ sim.set_pressure_sensors(sensor_locations=["13", "16", "22", "30"])
102
+
103
+ # Place a flow sensor at link/pipe "1"
104
+ sim.set_flow_sensors(sensor_locations=["1"])
105
+
106
+ # Run entire simulation
107
+ scada_data = sim.run_simulation()
108
+
109
+ # Show sensor readings over the entire simulation
110
+ print(f"Pressure readings: {scada_data.get_data_pressures()}")
111
+ print(f"Flow readings: {scada_data.get_data_flows()}")
112
+ ```
113
+
114
+ ## Documentation
115
+
116
+ Documentation is available on readthedocs: [https://epytflow.readthedocs.io/en/latest/](https://epytflow.readthedocs.io/en/latest/)
117
+
118
+ ## License
119
+
120
+ MIT license -- see [LICENSE](LICENSE)
121
+
122
+ ## How to Cite?
123
+
124
+ If you use this software, please cite it as follows:
125
+
126
+ ```
127
+ @misc{github:epytflow,
128
+ author = {André Artelt, Marios S. Kyriakou, Stelios G. Vrachimis, Demetrios G. Eliades, Barbara Hammer, Marios M. Polycarpou},
129
+ title = {EPyT-Flow -- EPANET Python Toolkit - Flow},
130
+ year = {2024},
131
+ publisher = {GitHub},
132
+ journal = {GitHub repository},
133
+ howpublished = {\url{https://github.com/WaterFutures/EPyT-Flow}}
134
+ }
135
+ ```
136
+
137
+ ## How to Contribute?
138
+
139
+ Contributions (e.g. creating issues, pull-requests, etc.) are welcome -- please make sure to read the [code of conduct](CODE_OF_CONDUCT.md) and follow the [developers' guidelines](DEVELOPERS.md).
@@ -0,0 +1,105 @@
1
+ # EPyT-Flow -- EPANET Python Toolkit - Flow
2
+
3
+ EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
4
+ for providing easy access to water distribution network simulations.
5
+ It aims to provide a high-level interface for the easy generation of hydraulic and water quality scenario data.
6
+ However, it also provides access to low-level functions by [EPANET](https://github.com/USEPA/EPANET2.2)
7
+ and [EPANET-MSX](https://github.com/USEPA/EPANETMSX/).
8
+
9
+ EPyT-Flow provides easy access to popular benchmark data sets for event detection and localization.
10
+ Furthermore, it also provides an environment for developing and testing control algorithms.
11
+
12
+ ![](https://github.com/WaterFutures/EPyT-Flow/blob/main/docs/_static/net1_plot.png?raw=true)
13
+
14
+ ## Installation
15
+
16
+ EPyT-Flow supports Python 3.9 - 3.12
17
+
18
+ Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overrite the binaries
19
+ shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
20
+ a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
21
+
22
+ ### PyPI
23
+
24
+ ```
25
+ pip install epyt-flow
26
+ ```
27
+
28
+ ### Git
29
+ Download or clone the repository:
30
+ ```
31
+ git clone https://github.com/WaterFutures/EPyT-Flow.git
32
+ cd EPyT-Flow
33
+ ```
34
+
35
+ Install all requirements as listed in [REQUIREMENTS.txt](REQUIREMENTS.txt):
36
+ ```
37
+ pip install -r REQUIREMENTS.txt
38
+ ```
39
+
40
+ Install the toolbox:
41
+ ```
42
+ pip install .
43
+ ```
44
+
45
+ ## Quick Example
46
+
47
+ <a target="_blank" href="https://colab.research.google.com/github/WaterFutures/EPyT-Flow/blob/main/docs/examples/basic_usage.ipynb">
48
+ <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
49
+ </a>
50
+
51
+ ```python
52
+ from epyt_flow.data.benchmarks import load_leakdb_scenarios
53
+ from epyt_flow.simulation import ScenarioSimulator
54
+ from epyt_flow.utils import to_seconds
55
+
56
+
57
+ if __name__ == "__main__":
58
+ # Load first Hanoi scenario from LeakDB
59
+ network_config, = load_leakdb_scenarios(scenarios_id=["1"], use_net1=False)
60
+
61
+ # Create scenario
62
+ with ScenarioSimulator(scenario_config=network_config) as sim:
63
+ # Set simulation duration to two days
64
+ sim.set_general_parameters(simulation_duration=to_seconds(days=2))
65
+
66
+ # Place pressure sensors at nodes "13", "16", "22", and "30"
67
+ sim.set_pressure_sensors(sensor_locations=["13", "16", "22", "30"])
68
+
69
+ # Place a flow sensor at link/pipe "1"
70
+ sim.set_flow_sensors(sensor_locations=["1"])
71
+
72
+ # Run entire simulation
73
+ scada_data = sim.run_simulation()
74
+
75
+ # Show sensor readings over the entire simulation
76
+ print(f"Pressure readings: {scada_data.get_data_pressures()}")
77
+ print(f"Flow readings: {scada_data.get_data_flows()}")
78
+ ```
79
+
80
+ ## Documentation
81
+
82
+ Documentation is available on readthedocs: [https://epytflow.readthedocs.io/en/latest/](https://epytflow.readthedocs.io/en/latest/)
83
+
84
+ ## License
85
+
86
+ MIT license -- see [LICENSE](LICENSE)
87
+
88
+ ## How to Cite?
89
+
90
+ If you use this software, please cite it as follows:
91
+
92
+ ```
93
+ @misc{github:epytflow,
94
+ author = {André Artelt, Marios S. Kyriakou, Stelios G. Vrachimis, Demetrios G. Eliades, Barbara Hammer, Marios M. Polycarpou},
95
+ title = {EPyT-Flow -- EPANET Python Toolkit - Flow},
96
+ year = {2024},
97
+ publisher = {GitHub},
98
+ journal = {GitHub repository},
99
+ howpublished = {\url{https://github.com/WaterFutures/EPyT-Flow}}
100
+ }
101
+ ```
102
+
103
+ ## How to Contribute?
104
+
105
+ Contributions (e.g. creating issues, pull-requests, etc.) are welcome -- please make sure to read the [code of conduct](CODE_OF_CONDUCT.md) and follow the [developers' guidelines](DEVELOPERS.md).
@@ -0,0 +1,11 @@
1
+ epyt>=1.1.3
2
+ requests>=2.31.0
3
+ scipy>=1.11.4
4
+ u-msgpack-python>=2.8.0
5
+ networkx>=3.2.1
6
+ scikit-learn>=1.4.0
7
+ tqdm>=4.66.2
8
+ openpyxl>=3.1.2
9
+ falcon>=3.1.3
10
+ multiprocess>=0.70.16
11
+ psutil
@@ -0,0 +1,28 @@
1
+ # Authors ordered alphabetically
2
+
3
+ Authors with Contributions in the Public Domain:
4
+
5
+ Lewis Rossman <LRossman@cinci.rr.com>
6
+ Michael Tryby <tryby.michael@epa.gov>
7
+
8
+ Authors with Contributions Subject to Copyright (see LICENSE):
9
+
10
+ Jinduan Chen <jinduan.uc@gmail.com>
11
+ Maurizio Cingi <mrzcng2@gmail.com>
12
+ Demetrios Eliades <eldemet@gmail.com>
13
+ Will Furnass <will@thearete.co.uk>
14
+ Milad Ghiami <milad-ghiami@users.noreply.github.com>
15
+ Sam Hatchett <samhatchett@gmail.com>
16
+ Abel Heinsbroek <mail@abelheinsbroek.nl>
17
+ Mike Kane <muke195@gmail.com>
18
+ Marios Kyriakou <mariosmsk@gmail.com>
19
+ Steffen Macke <sdteffen@sdteffen.de>
20
+ Angela Marchi <angela.marchi@adelaide.edu.au>
21
+ Bryant McDonnell <bemcdonnell@gmail.com>
22
+ Elad Salomons <selad@optiwater.com>
23
+ Feng Shang <fshang>
24
+ Yunier Soad <yunier.soad@gmail.com>
25
+ Markus Sunela <markus.sunela@fluidit.fi>
26
+ Tom Taxon <tntaxon@anl.gov>
27
+ James Uber <jim@citilogics.com>
28
+ Hyoungmin Woo <hyoungmin.woo@gmail.com>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 (see AUTHORS)
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,18 @@
1
+ This folder archives the EPA/OWA and community collaboration source code files for the EPANET hydraulic and water quality engines for v2.2.0.
2
+
3
+ It contains the source code for the EPANET 2.2 network hydraulic and water quality solver.
4
+ It is written in ANSI-compatible C and can be compiled into either a Windows Dynamic Link Library of functions
5
+ or into a command-line executable.
6
+
7
+ The DLL version of the solver (epanet2.dll) is used with
8
+ the EPANET 2 user interface executable (epanet2w.exe) to
9
+ form a complete Windows modeling package. It also serves
10
+ as the function library for the EPANET Programmer's Toolkit,
11
+ allowing developers to construct their own customized pipe
12
+ network analysis applications.
13
+
14
+ All the files except main.c are needed to build the DLL version of the solver.
15
+ The file main.c needs to be incudled for building a command-line executable.
16
+ Epanet2.def should be inculded as a module definition file
17
+ for building the DLL that can be used in EPANET user inferface (epanet2w.exe).
18
+
@@ -0,0 +1,134 @@
1
+ /*
2
+ *****************************************************************************
3
+ Project: OWA EPANET
4
+ Version: 2.2
5
+ Module: enumstxt.h
6
+ Description: text strings for enumerated data types
7
+ Authors: see AUTHORS
8
+ Copyright: see AUTHORS
9
+ License: see LICENSE
10
+ Last Updated: 06/20/2019
11
+ ******************************************************************************
12
+ */
13
+
14
+ #ifndef ENUMSTXT_H
15
+ #define ENUMSTXT_H
16
+ #include "text.h"
17
+
18
+ char *NodeTxt[] = {t_JUNCTION,
19
+ t_RESERVOIR,
20
+ t_TANK};
21
+
22
+ char *LinkTxt[] = {w_CV,
23
+ w_PIPE,
24
+ w_PUMP,
25
+ w_PRV,
26
+ w_PSV,
27
+ w_PBV,
28
+ w_FCV,
29
+ w_TCV,
30
+ w_GPV};
31
+
32
+ char *StatTxt[] = {t_XHEAD,
33
+ t_TEMPCLOSED,
34
+ t_CLOSED,
35
+ t_OPEN,
36
+ t_ACTIVE,
37
+ t_XFLOW,
38
+ t_XFCV,
39
+ t_XPRESSURE,
40
+ t_FILLING,
41
+ t_EMPTYING,
42
+ t_OVERFLOWING};
43
+
44
+ char *FormTxt[] = {w_HW,
45
+ w_DW,
46
+ w_CM};
47
+
48
+ char *RptFormTxt[] = {t_HW,
49
+ t_DW,
50
+ t_CM};
51
+
52
+ char *RptFlowUnitsTxt[] = {u_CFS,
53
+ u_GPM,
54
+ u_MGD,
55
+ u_IMGD,
56
+ u_AFD,
57
+ u_LPS,
58
+ u_LPM,
59
+ u_MLD,
60
+ u_CMH,
61
+ u_CMD};
62
+
63
+ char *FlowUnitsTxt[] = {w_CFS,
64
+ w_GPM,
65
+ w_MGD,
66
+ w_IMGD,
67
+ w_AFD,
68
+ w_LPS,
69
+ w_LPM,
70
+ w_MLD,
71
+ w_CMH,
72
+ w_CMD};
73
+
74
+ char *PressUnitsTxt[] = {w_PSI,
75
+ w_KPA,
76
+ w_METERS};
77
+
78
+ char *DemandModelTxt[] = { w_DDA,
79
+ w_PDA,
80
+ NULL };
81
+
82
+ char *QualTxt[] = {w_NONE,
83
+ w_CHEM,
84
+ w_AGE,
85
+ w_TRACE};
86
+
87
+
88
+ char *SourceTxt[] = {w_CONCEN,
89
+ w_MASS,
90
+ w_SETPOINT,
91
+ w_FLOWPACED};
92
+
93
+ char *ControlTxt[] = {w_BELOW,
94
+ w_ABOVE,
95
+ w_TIME,
96
+ w_CLOCKTIME};
97
+
98
+ char *TstatTxt[] = {w_NONE,
99
+ w_AVG,
100
+ w_MIN,
101
+ w_MAX,
102
+ w_RANGE};
103
+
104
+ char *MixTxt[] = {w_MIXED,
105
+ w_2COMP,
106
+ w_FIFO,
107
+ w_LIFO,
108
+ NULL};
109
+
110
+ char *RptFlagTxt[] = {w_NO,
111
+ w_YES,
112
+ w_FULL};
113
+
114
+ char *SectTxt[] = {s_TITLE, s_JUNCTIONS, s_RESERVOIRS,
115
+ s_TANKS, s_PIPES, s_PUMPS,
116
+ s_VALVES, s_CONTROLS, s_RULES,
117
+ s_DEMANDS, s_SOURCES, s_EMITTERS,
118
+ s_PATTERNS, s_CURVES, s_QUALITY,
119
+ s_STATUS, s_ROUGHNESS, s_ENERGY,
120
+ s_REACTIONS, s_MIXING, s_REPORT,
121
+ s_TIMES, s_OPTIONS, s_COORDS,
122
+ s_VERTICES, s_LABELS, s_BACKDROP,
123
+ s_TAGS, s_END,
124
+ NULL};
125
+
126
+ char *Fldname[] = {t_ELEV, t_DEMAND, t_HEAD,
127
+ t_PRESSURE, t_QUALITY, t_LENGTH,
128
+ t_DIAM, t_FLOW, t_VELOCITY,
129
+ t_HEADLOSS, t_LINKQUAL, t_LINKSTATUS,
130
+ t_SETTING, t_REACTRATE, t_FRICTION,
131
+ "", "", "", "", "", "", NULL};
132
+
133
+
134
+ #endif