epyt-flow 0.1.0__tar.gz → 0.1.1__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 (142) hide show
  1. {epyt_flow-0.1.0/epyt_flow.egg-info → epyt_flow-0.1.1}/PKG-INFO +12 -5
  2. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/README.md +9 -2
  3. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/REQUIREMENTS.txt +1 -1
  4. epyt_flow-0.1.1/epyt_flow/VERSION +1 -0
  5. epyt_flow-0.1.1/epyt_flow/__init__.py +30 -0
  6. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/scenario_simulator.py +61 -41
  7. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/sensor_config.py +1 -1
  8. {epyt_flow-0.1.0 → epyt_flow-0.1.1/epyt_flow.egg-info}/PKG-INFO +12 -5
  9. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow.egg-info/requires.txt +1 -1
  10. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/pyproject.toml +1 -1
  11. epyt_flow-0.1.0/epyt_flow/VERSION +0 -1
  12. epyt_flow-0.1.0/epyt_flow/__init__.py +0 -24
  13. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/CODE_OF_CONDUCT.md +0 -0
  14. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/LICENSE +0 -0
  15. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/MANIFEST.in +0 -0
  16. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +0 -0
  17. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +0 -0
  18. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +0 -0
  19. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +0 -0
  20. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +0 -0
  21. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +0 -0
  22. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +0 -0
  23. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +0 -0
  24. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +0 -0
  25. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c +0 -0
  26. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/hash.c +0 -0
  27. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/hash.h +0 -0
  28. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +0 -0
  29. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +0 -0
  30. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +0 -0
  31. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +0 -0
  32. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +0 -0
  33. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +0 -0
  34. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +0 -0
  35. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +0 -0
  36. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/input1.c +0 -0
  37. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/input2.c +0 -0
  38. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/input3.c +0 -0
  39. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/main.c +0 -0
  40. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +0 -0
  41. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +0 -0
  42. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/output.c +0 -0
  43. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/project.c +0 -0
  44. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/quality.c +0 -0
  45. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +0 -0
  46. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +0 -0
  47. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/report.c +0 -0
  48. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/rules.c +0 -0
  49. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +0 -0
  50. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/text.h +0 -0
  51. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET/SRC_engines/types.h +0 -0
  52. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt +0 -0
  53. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h +0 -0
  54. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/hash.c +0 -0
  55. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/hash.h +0 -0
  56. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx.h +0 -0
  57. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx_export.h +0 -0
  58. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.c +0 -0
  59. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.h +0 -0
  60. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/mempool.c +0 -0
  61. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/mempool.h +0 -0
  62. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxchem.c +0 -0
  63. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxcompiler.c +0 -0
  64. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxdict.h +0 -0
  65. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxdispersion.c +0 -0
  66. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxerr.c +0 -0
  67. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxfile.c +0 -0
  68. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.c +0 -0
  69. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.h +0 -0
  70. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxinp.c +0 -0
  71. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxout.c +0 -0
  72. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxproj.c +0 -0
  73. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxqual.c +0 -0
  74. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxrpt.c +0 -0
  75. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxtank.c +0 -0
  76. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxtoolkit.c +0 -0
  77. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxtypes.h +0 -0
  78. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.c +0 -0
  79. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.h +0 -0
  80. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/newton.c +0 -0
  81. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/newton.h +0 -0
  82. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/rk5.c +0 -0
  83. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/rk5.h +0 -0
  84. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/ros2.c +0 -0
  85. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/ros2.h +0 -0
  86. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.c +0 -0
  87. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.h +0 -0
  88. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/EPANET-MSX/readme.txt +0 -0
  89. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/EPANET/compile.sh +0 -0
  90. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/__init__.py +0 -0
  91. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/__init__.py +0 -0
  92. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/batadal.py +0 -0
  93. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/batadal_data.py +0 -0
  94. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/battledim.py +0 -0
  95. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/battledim_data.py +0 -0
  96. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/gecco_water_quality.py +0 -0
  97. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/leakdb.py +0 -0
  98. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/leakdb_data.py +0 -0
  99. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/benchmarks/water_usage.py +0 -0
  100. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/data/networks.py +0 -0
  101. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/gym/__init__.py +0 -0
  102. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/gym/control_gyms.py +0 -0
  103. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/gym/scenario_control_env.py +0 -0
  104. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/metrics.py +0 -0
  105. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/models/__init__.py +0 -0
  106. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/models/event_detector.py +0 -0
  107. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/models/sensor_interpolation_detector.py +0 -0
  108. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/rest_api/__init__.py +0 -0
  109. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/rest_api/base_handler.py +0 -0
  110. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/rest_api/res_manager.py +0 -0
  111. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/rest_api/scada_data_handler.py +0 -0
  112. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/rest_api/scenario_handler.py +0 -0
  113. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/rest_api/server.py +0 -0
  114. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/serialization.py +0 -0
  115. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/__init__.py +0 -0
  116. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/__init__.py +0 -0
  117. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/actuator_events.py +0 -0
  118. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/event.py +0 -0
  119. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/leakages.py +0 -0
  120. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/sensor_faults.py +0 -0
  121. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/sensor_reading_attack.py +0 -0
  122. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/sensor_reading_event.py +0 -0
  123. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/events/system_event.py +0 -0
  124. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/parallel_simulation.py +0 -0
  125. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/scada/__init__.py +0 -0
  126. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/scada/advanced_control.py +0 -0
  127. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/scada/scada_data.py +0 -0
  128. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/scada/scada_data_export.py +0 -0
  129. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/scenario_config.py +0 -0
  130. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/simulation/scenario_visualizer.py +0 -0
  131. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/topology.py +0 -0
  132. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/uncertainty/__init__.py +0 -0
  133. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/uncertainty/model_uncertainty.py +0 -0
  134. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/uncertainty/sensor_noise.py +0 -0
  135. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/uncertainty/uncertainties.py +0 -0
  136. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/uncertainty/utils.py +0 -0
  137. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow/utils.py +0 -0
  138. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow.egg-info/SOURCES.txt +0 -0
  139. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow.egg-info/dependency_links.txt +0 -0
  140. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/epyt_flow.egg-info/top_level.txt +0 -0
  141. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/setup.cfg +0 -0
  142. {epyt_flow-0.1.0 → epyt_flow-0.1.1}/setup.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: epyt-flow
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: EPyT-Flow -- EPANET Python Toolkit - Flow
5
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
6
  License: MIT License
7
7
  Project-URL: Homepage, https://github.com/WaterFutures/EPyT-Flow
8
- Project-URL: Documentation, https://epytflow.readthedocs.io/en/latest/
8
+ Project-URL: Documentation, https://epyt-flow.readthedocs.io/en/latest/
9
9
  Project-URL: Repository, https://github.com/WaterFutures/EPyT-Flow.git
10
10
  Project-URL: Issues, https://github.com/WaterFutures/EPyT-Flow/issues
11
11
  Keywords: epanet,water,networks,hydraulics,quality,simulations
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Requires-Python: >=3.9
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: epyt>=1.1.3
23
+ Requires-Dist: epyt>=1.1.6
24
24
  Requires-Dist: requests>=2.31.0
25
25
  Requires-Dist: scipy>=1.11.4
26
26
  Requires-Dist: u-msgpack-python>=2.8.0
@@ -32,6 +32,13 @@ Requires-Dist: falcon>=3.1.3
32
32
  Requires-Dist: multiprocess>=0.70.16
33
33
  Requires-Dist: psutil
34
34
 
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
+ [![pypi](https://img.shields.io/pypi/v/epyt-flow.svg)](https://pypi.org/project/epyt-flow/)
37
+ [![build](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml/badge.svg)](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml)
38
+ [![Documentation Status](https://readthedocs.org/projects/epyt-flow/badge/?version=stable)](https://epyt-flow.readthedocs.io/en/stable/?badge=stable)
39
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow)](https://pepy.tech/project/epyt-flow)
40
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow/month)](https://pepy.tech/project/epyt-flow)
41
+
35
42
  # EPyT-Flow -- EPANET Python Toolkit - Flow
36
43
 
37
44
  EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
@@ -49,7 +56,7 @@ Furthermore, it also provides an environment for developing and testing control
49
56
 
50
57
  EPyT-Flow supports Python 3.9 - 3.12
51
58
 
52
- Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overrite the binaries
59
+ Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overwrite the binaries
53
60
  shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
54
61
  a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
55
62
 
@@ -113,7 +120,7 @@ if __name__ == "__main__":
113
120
 
114
121
  ## Documentation
115
122
 
116
- Documentation is available on readthedocs: [https://epytflow.readthedocs.io/en/latest/](https://epytflow.readthedocs.io/en/latest/)
123
+ Documentation is available on readthedocs:[https://epyt-flow.readthedocs.io/en/latest/](https://epyt-flow.readthedocs.io/en/stable)
117
124
 
118
125
  ## License
119
126
 
@@ -1,3 +1,10 @@
1
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
2
+ [![pypi](https://img.shields.io/pypi/v/epyt-flow.svg)](https://pypi.org/project/epyt-flow/)
3
+ [![build](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml/badge.svg)](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml)
4
+ [![Documentation Status](https://readthedocs.org/projects/epyt-flow/badge/?version=stable)](https://epyt-flow.readthedocs.io/en/stable/?badge=stable)
5
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow)](https://pepy.tech/project/epyt-flow)
6
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow/month)](https://pepy.tech/project/epyt-flow)
7
+
1
8
  # EPyT-Flow -- EPANET Python Toolkit - Flow
2
9
 
3
10
  EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
@@ -15,7 +22,7 @@ Furthermore, it also provides an environment for developing and testing control
15
22
 
16
23
  EPyT-Flow supports Python 3.9 - 3.12
17
24
 
18
- Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overrite the binaries
25
+ Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overwrite the binaries
19
26
  shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
20
27
  a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
21
28
 
@@ -79,7 +86,7 @@ if __name__ == "__main__":
79
86
 
80
87
  ## Documentation
81
88
 
82
- Documentation is available on readthedocs: [https://epytflow.readthedocs.io/en/latest/](https://epytflow.readthedocs.io/en/latest/)
89
+ Documentation is available on readthedocs:[https://epyt-flow.readthedocs.io/en/latest/](https://epyt-flow.readthedocs.io/en/stable)
83
90
 
84
91
  ## License
85
92
 
@@ -1,4 +1,4 @@
1
- epyt>=1.1.3
1
+ epyt>=1.1.6
2
2
  requests>=2.31.0
3
3
  scipy>=1.11.4
4
4
  u-msgpack-python>=2.8.0
@@ -0,0 +1 @@
1
+ 0.1.1
@@ -0,0 +1,30 @@
1
+ import subprocess
2
+ import warnings
3
+ import shutil
4
+ import sys
5
+ import os
6
+
7
+ with open(os.path.join(os.path.dirname(__file__), 'VERSION'), encoding="utf-8") as f:
8
+ VERSION = f.read().strip()
9
+
10
+ if sys.platform.startswith("linux"):
11
+ def compile_libraries():
12
+ """Compile EPANET and EPANET-MSX libraries if needed."""
13
+ path_to_custom_libs = os.path.join(os.path.dirname(__file__), "customlibs")
14
+ path_to_lib_epanet = os.path.join(path_to_custom_libs, "libepanet2_2.so")
15
+ path_to_epanet = os.path.join(os.path.dirname(__file__), "EPANET")
16
+
17
+ update = False
18
+ if os.path.isfile(path_to_lib_epanet):
19
+ if os.path.getmtime(__file__) > os.path.getmtime(path_to_lib_epanet):
20
+ update = True
21
+
22
+ if not os.path.isfile(path_to_lib_epanet) or update:
23
+ if shutil.which("gcc") is not None:
24
+ print("Compiling EPANET and EPANET-MSX...")
25
+ subprocess.check_call(f"cd \"{path_to_epanet}\"; bash compile.sh", shell=True)
26
+ else:
27
+ warnings.warn("GCC is not available to compile the required libraries.\n" +
28
+ "Falling back to pre-compiled library shipped by EPyT.")
29
+
30
+ compile_libraries()
@@ -329,15 +329,15 @@ class ScenarioSimulator():
329
329
  node_id_to_idx = {node_id: self.epanet_api.getNodeIndex(node_id) - 1 for node_id in nodes}
330
330
  link_id_to_idx = {link_id: self.epanet_api.getLinkIndex(link_id) - 1 for link_id in links}
331
331
  valve_id_to_idx = None # {valve_id: self.epanet_api.getLinkValveIndex(valve_id) for valve_id in valves}
332
- pump_id_to_idx = None # {pump_id: self.epanet_api.getLinkPumpIndex(pump_id) - 1 for pump_id in pumps}
333
- tank_id_to_idx = None #{tank_id: self.epanet_api.getNodeTankIndex(tank_id) - 1 for tank_id in tanks}
332
+ pump_id_to_idx = None # {pump_id: self.epanet_api.getLinkPumpIndex(pump_id) - 1 for pump_id in pumps}
333
+ tank_id_to_idx = None # {tank_id: self.epanet_api.getNodeTankIndex(tank_id) - 1 for tank_id in tanks}
334
334
  bulkspecies_id_to_idx = None
335
335
  surfacespecies_id_to_idx = None
336
336
 
337
337
  if nodes != self.__sensor_config.nodes or links != self.__sensor_config.links or \
338
- valves != self.__sensor_config.valves or pumps != self.__sensor_config.pumps or \
339
- tanks != self.__sensor_config.tanks or \
340
- bulk_species != self.__sensor_config.bulk_species or \
338
+ valves != self.__sensor_config.valves or pumps != self.__sensor_config.pumps or \
339
+ tanks != self.__sensor_config.tanks or \
340
+ bulk_species != self.__sensor_config.bulk_species or \
341
341
  surface_species != self.__sensor_config.surface_species:
342
342
  # Adapt sensor configuration if anything in the network topology changed
343
343
  new_sensor_config = SensorConfig(nodes=nodes, links=links, valves=valves, pumps=pumps,
@@ -516,8 +516,8 @@ class ScenarioSimulator():
516
516
  n_time_steps = int(self.epanet_api.getTimeSimulationDuration() /
517
517
  self.epanet_api.getTimeReportingStep())
518
518
  n_quantities = self.epanet_api.getNodeCount() * 3 + self.epanet_api.getNodeTankCount() + \
519
- self.epanet_api.getLinkValveCount() + self.epanet_api.getLinkPumpCount() + \
520
- self.epanet_api.getLinkCount() * 2
519
+ self.epanet_api.getLinkValveCount() + self.epanet_api.getLinkPumpCount() + \
520
+ self.epanet_api.getLinkCount() * 2
521
521
  n_bytes_per_quantity = 64
522
522
 
523
523
  return n_time_steps * n_quantities * n_bytes_per_quantity * .000001
@@ -979,25 +979,40 @@ class ScenarioSimulator():
979
979
  gen = self.run_advanced_quality_simulation_as_generator
980
980
  for scada_data in gen(hyd_file_in=hyd_file_in,
981
981
  verbose=verbose,
982
+ return_as_dict=True,
982
983
  frozen_sensor_config=frozen_sensor_config):
983
984
  if result is None:
984
- result = scada_data
985
+ result = {}
986
+ for data_type, data in scada_data.items():
987
+ result[data_type] = [data]
985
988
  else:
986
- result.concatenate(scada_data)
989
+ for data_type, data in scada_data.items():
990
+ result[data_type].append(data)
987
991
 
988
- return result
992
+ # Build ScadaData instance
993
+ for data_type in result:
994
+ if not any(d is None for d in result[data_type]):
995
+ result[data_type] = np.concatenate(result[data_type], axis=0)
996
+ else:
997
+ result[data_type] = None
998
+
999
+ return ScadaData(**result,
1000
+ sensor_config=self.__sensor_config,
1001
+ sensor_reading_events=self.__sensor_reading_events,
1002
+ sensor_noise=self.__sensor_noise,
1003
+ frozen_sensor_config=frozen_sensor_config)
989
1004
 
990
1005
  def run_advanced_quality_simulation_as_generator(self, hyd_file_in: str, verbose: bool = False,
991
1006
  support_abort: bool = False,
992
1007
  return_as_dict: bool = False,
993
1008
  frozen_sensor_config: bool = False
994
- ) -> Generator[Union[ScadaData, dict],
995
- bool, None]:
1009
+ ) -> Generator[Union[ScadaData, dict], bool, None]:
996
1010
  """
997
1011
  Runs an advanced quality analysis using EPANET-MSX.
998
1012
 
999
1013
  Parameters
1000
1014
  ----------
1015
+ support_abort : `bool`, optional
1001
1016
  hyd_file_in : `str`
1002
1017
  Path to an EPANET .hyd file for storing the simulated hydraulics --
1003
1018
  the quality analysis is computed using those hydraulics.
@@ -1054,13 +1069,13 @@ class ScenarioSimulator():
1054
1069
  bulk_species_link_concentrations = []
1055
1070
  for species_idx in bulk_species_idx:
1056
1071
  cur_species_concentrations = []
1057
- for node_idx in range(1, n_nodes+1):
1072
+ for node_idx in range(1, n_nodes + 1):
1058
1073
  concen = msx_get_cur_value(0, node_idx, species_idx)
1059
1074
  cur_species_concentrations.append(concen)
1060
1075
  bulk_species_node_concentrations.append(cur_species_concentrations)
1061
1076
 
1062
1077
  cur_species_concentrations = []
1063
- for link_idx in range(1, n_links+1):
1078
+ for link_idx in range(1, n_links + 1):
1064
1079
  concen = msx_get_cur_value(1, link_idx, species_idx)
1065
1080
  cur_species_concentrations.append(concen)
1066
1081
  bulk_species_link_concentrations.append(cur_species_concentrations)
@@ -1068,13 +1083,13 @@ class ScenarioSimulator():
1068
1083
  if len(bulk_species_node_concentrations) == 0:
1069
1084
  bulk_species_node_concentrations = None
1070
1085
  else:
1071
- bulk_species_node_concentrations = np.array(bulk_species_node_concentrations).\
1086
+ bulk_species_node_concentrations = np.array(bulk_species_node_concentrations). \
1072
1087
  reshape((1, len(bulk_species_idx), n_nodes))
1073
1088
 
1074
1089
  if len(bulk_species_link_concentrations) == 0:
1075
1090
  bulk_species_link_concentrations = None
1076
1091
  else:
1077
- bulk_species_link_concentrations = np.array(bulk_species_link_concentrations).\
1092
+ bulk_species_link_concentrations = np.array(bulk_species_link_concentrations). \
1078
1093
  reshape((1, len(bulk_species_idx), n_links))
1079
1094
 
1080
1095
  # Surface species
@@ -1082,7 +1097,7 @@ class ScenarioSimulator():
1082
1097
  for species_idx in surface_species_idx:
1083
1098
  cur_species_concentrations = []
1084
1099
 
1085
- for link_idx in range(1, n_links+1):
1100
+ for link_idx in range(1, n_links + 1):
1086
1101
  concen = msx_get_cur_value(1, link_idx, species_idx)
1087
1102
  cur_species_concentrations.append(concen)
1088
1103
 
@@ -1091,7 +1106,7 @@ class ScenarioSimulator():
1091
1106
  if len(surface_species_concentrations) == 0:
1092
1107
  surface_species_concentrations = None
1093
1108
  else:
1094
- surface_species_concentrations = np.array(surface_species_concentrations).\
1109
+ surface_species_concentrations = np.array(surface_species_concentrations). \
1095
1110
  reshape((1, len(surface_species_idx), n_links))
1096
1111
 
1097
1112
  return bulk_species_node_concentrations, bulk_species_link_concentrations, \
@@ -1102,14 +1117,17 @@ class ScenarioSimulator():
1102
1117
  surface_species_concentrations = __get_concentrations(init_qual=True)
1103
1118
 
1104
1119
  if verbose is True:
1105
- next(progress_bar)
1120
+ try:
1121
+ next(progress_bar)
1122
+ except StopIteration:
1123
+ pass
1106
1124
 
1107
1125
  if reporting_time_start == 0:
1108
1126
  if return_as_dict is True:
1109
1127
  yield {"bulk_species_node_concentration_raw": bulk_species_node_concentrations,
1110
1128
  "bulk_species_link_concentration_raw": bulk_species_link_concentrations,
1111
1129
  "surface_species_concentration_raw": surface_species_concentrations,
1112
- "sensor_readings_time": np.array([total_time])}
1130
+ "sensor_readings_time": np.array([0])}
1113
1131
  else:
1114
1132
  yield ScadaData(sensor_config=self.__sensor_config,
1115
1133
  bulk_species_node_concentration_raw=bulk_species_node_concentrations,
@@ -1131,21 +1149,24 @@ class ScenarioSimulator():
1131
1149
  # Compute current time step
1132
1150
  total_time, tleft = self.epanet_api.stepMSXQualityAnalysisTimeLeft()
1133
1151
 
1152
+ if verbose is True:
1153
+ try:
1154
+ next(progress_bar)
1155
+ except StopIteration:
1156
+ pass
1157
+
1134
1158
  # Fetch data at regular time intervals
1135
1159
  if total_time % hyd_time_step == 0:
1136
1160
  bulk_species_node_concentrations, bulk_species_link_concentrations, \
1137
1161
  surface_species_concentrations = __get_concentrations()
1138
1162
 
1139
- if verbose is True:
1140
- next(progress_bar)
1141
-
1142
1163
  # Report results in a regular time interval only!
1143
1164
  if total_time % reporting_time_step == 0 and total_time >= reporting_time_start:
1144
1165
  if return_as_dict is True:
1145
1166
  yield {"bulk_species_node_concentration_raw":
1146
- bulk_species_node_concentrations,
1167
+ bulk_species_node_concentrations,
1147
1168
  "bulk_species_link_concentration_raw":
1148
- bulk_species_link_concentrations,
1169
+ bulk_species_link_concentrations,
1149
1170
  "surface_species_concentration_raw": surface_species_concentrations,
1150
1171
  "sensor_readings_time": np.array([total_time])}
1151
1172
  else:
@@ -1216,13 +1237,13 @@ class ScenarioSimulator():
1216
1237
  support_abort: bool = False,
1217
1238
  return_as_dict: bool = False,
1218
1239
  frozen_sensor_config: bool = False,
1219
- ) -> Generator[Union[ScadaData, dict],
1220
- bool, None]:
1240
+ ) -> Generator[Union[ScadaData, dict], bool, None]:
1221
1241
  """
1222
1242
  Runs a basic quality analysis using EPANET.
1223
1243
 
1224
1244
  Parameters
1225
1245
  ----------
1246
+ support_abort : `bool`, optional
1226
1247
  hyd_file_in : `str`
1227
1248
  Path to an EPANET .hyd file for storing the simulated hydraulics --
1228
1249
  the quality analysis is computed using those hydraulics.
@@ -1277,16 +1298,16 @@ class ScenarioSimulator():
1277
1298
 
1278
1299
  if verbose is True:
1279
1300
  if (total_time + tstep) % requested_time_step == 0:
1280
- next(progress_bar)
1301
+ try:
1302
+ next(progress_bar)
1303
+ except StopIteration:
1304
+ pass
1281
1305
 
1282
1306
  # Compute current time step
1283
1307
  t = self.epanet_api.runQualityAnalysis()
1284
1308
  total_time = t
1285
1309
 
1286
1310
  # Fetch data
1287
- quality_node_data = None
1288
- quality_link_data = None
1289
-
1290
1311
  quality_node_data = self.epanet_api.getNodeActualQuality().reshape(1, -1)
1291
1312
  quality_link_data = self.epanet_api.getLinkActualQuality().reshape(1, -1)
1292
1313
 
@@ -1381,7 +1402,11 @@ class ScenarioSimulator():
1381
1402
  if hyd_export_old is not None:
1382
1403
  shutil.copyfile(hyd_export, hyd_export_old)
1383
1404
 
1384
- os.remove(hyd_export)
1405
+ try:
1406
+ # temp solution
1407
+ os.remove(hyd_export)
1408
+ except:
1409
+ warnings.warn(f"Failed to remove temporary file '{hyd_export}'")
1385
1410
 
1386
1411
  return result
1387
1412
 
@@ -1464,8 +1489,11 @@ class ScenarioSimulator():
1464
1489
  first_itr = False
1465
1490
 
1466
1491
  if verbose is True:
1467
- if (total_time + tstep) % requested_time_step == 0:
1492
+ #if (total_time + tstep) % requested_time_step == 0:
1493
+ try:
1468
1494
  next(progress_bar)
1495
+ except StopIteration:
1496
+ pass
1469
1497
 
1470
1498
  # Apply system events in a regular time interval only!
1471
1499
  if (total_time + tstep) % requested_time_step == 0:
@@ -1478,14 +1506,6 @@ class ScenarioSimulator():
1478
1506
  total_time = t
1479
1507
 
1480
1508
  # Fetch data
1481
- pressure_data = None
1482
- flow_data = None
1483
- demand_data = None
1484
- quality_node_data = None
1485
- quality_link_data = None
1486
- pumps_state_data = None
1487
- valves_state_data = None
1488
-
1489
1509
  pressure_data = self.epanet_api.getNodePressure().reshape(1, -1)
1490
1510
  flow_data = self.epanet_api.getLinkFlows().reshape(1, -1)
1491
1511
  demand_data = self.epanet_api.getNodeActualDemand().reshape(1,
@@ -612,7 +612,7 @@ class SensorConfig(JsonSerializable):
612
612
 
613
613
  bulk_species = []
614
614
  surface_species = []
615
- if hasattr(epanet_api, "msx"):
615
+ if epanet_api.msx is not None:
616
616
  for species_id, species_type in zip(epanet_api.getMSXSpeciesNameID(),
617
617
  epanet_api.getMSXSpeciesType()):
618
618
  if species_type == "BULK":
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: epyt-flow
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: EPyT-Flow -- EPANET Python Toolkit - Flow
5
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
6
  License: MIT License
7
7
  Project-URL: Homepage, https://github.com/WaterFutures/EPyT-Flow
8
- Project-URL: Documentation, https://epytflow.readthedocs.io/en/latest/
8
+ Project-URL: Documentation, https://epyt-flow.readthedocs.io/en/latest/
9
9
  Project-URL: Repository, https://github.com/WaterFutures/EPyT-Flow.git
10
10
  Project-URL: Issues, https://github.com/WaterFutures/EPyT-Flow/issues
11
11
  Keywords: epanet,water,networks,hydraulics,quality,simulations
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Requires-Python: >=3.9
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: epyt>=1.1.3
23
+ Requires-Dist: epyt>=1.1.6
24
24
  Requires-Dist: requests>=2.31.0
25
25
  Requires-Dist: scipy>=1.11.4
26
26
  Requires-Dist: u-msgpack-python>=2.8.0
@@ -32,6 +32,13 @@ Requires-Dist: falcon>=3.1.3
32
32
  Requires-Dist: multiprocess>=0.70.16
33
33
  Requires-Dist: psutil
34
34
 
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
+ [![pypi](https://img.shields.io/pypi/v/epyt-flow.svg)](https://pypi.org/project/epyt-flow/)
37
+ [![build](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml/badge.svg)](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml)
38
+ [![Documentation Status](https://readthedocs.org/projects/epyt-flow/badge/?version=stable)](https://epyt-flow.readthedocs.io/en/stable/?badge=stable)
39
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow)](https://pepy.tech/project/epyt-flow)
40
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow/month)](https://pepy.tech/project/epyt-flow)
41
+
35
42
  # EPyT-Flow -- EPANET Python Toolkit - Flow
36
43
 
37
44
  EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
@@ -49,7 +56,7 @@ Furthermore, it also provides an environment for developing and testing control
49
56
 
50
57
  EPyT-Flow supports Python 3.9 - 3.12
51
58
 
52
- Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overrite the binaries
59
+ Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overwrite the binaries
53
60
  shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
54
61
  a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
55
62
 
@@ -113,7 +120,7 @@ if __name__ == "__main__":
113
120
 
114
121
  ## Documentation
115
122
 
116
- Documentation is available on readthedocs: [https://epytflow.readthedocs.io/en/latest/](https://epytflow.readthedocs.io/en/latest/)
123
+ Documentation is available on readthedocs:[https://epyt-flow.readthedocs.io/en/latest/](https://epyt-flow.readthedocs.io/en/stable)
117
124
 
118
125
  ## License
119
126
 
@@ -1,4 +1,4 @@
1
- epyt>=1.1.3
1
+ epyt>=1.1.6
2
2
  requests>=2.31.0
3
3
  scipy>=1.11.4
4
4
  u-msgpack-python>=2.8.0
@@ -27,7 +27,7 @@ dynamic = ["version", "readme", "dependencies"]
27
27
 
28
28
  [project.urls]
29
29
  Homepage = "https://github.com/WaterFutures/EPyT-Flow"
30
- Documentation = "https://epytflow.readthedocs.io/en/latest/"
30
+ Documentation = "https://epyt-flow.readthedocs.io/en/latest/"
31
31
  Repository = "https://github.com/WaterFutures/EPyT-Flow.git"
32
32
  Issues = "https://github.com/WaterFutures/EPyT-Flow/issues"
33
33
 
@@ -1 +0,0 @@
1
- 0.1.0
@@ -1,24 +0,0 @@
1
- import sys
2
- import subprocess
3
- import os
4
- import shutil
5
-
6
-
7
- with open(os.path.join(os.path.dirname(__file__), 'VERSION'), encoding="utf-8") as f:
8
- VERSION = f.read().strip()
9
-
10
-
11
- if sys.platform.startswith("linux"):
12
- path_to_custom_libs = os.path.join(os.path.dirname(__file__), "customlibs")
13
- path_to_lib_epanet = os.path.join(path_to_custom_libs, "libepanet2_2.so")
14
-
15
- update = False
16
- if os.path.isfile(path_to_lib_epanet):
17
- if os.path.getmtime(__file__) > os.path.getmtime(path_to_lib_epanet):
18
- update = True
19
-
20
- if not os.path.isfile(path_to_lib_epanet) or update is True:
21
- if shutil.which("gcc") is not None:
22
- print("Compiling EPANET and EPANET-MSX...")
23
- path_to_epanet = os.path.join(os.path.dirname(__file__), "EPANET")
24
- subprocess.check_call(f"cd \"{path_to_epanet}\"; bash compile.sh", shell=True)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes