epyt-flow 0.2.0__tar.gz → 0.4.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 (151) hide show
  1. epyt_flow-0.4.0/CITATION.cff +37 -0
  2. {epyt_flow-0.2.0/epyt_flow.egg-info → epyt_flow-0.4.0}/PKG-INFO +18 -6
  3. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/README.md +16 -5
  4. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/REQUIREMENTS.txt +1 -0
  5. epyt_flow-0.4.0/epyt_flow/EPANET/compile_macos.sh +4 -0
  6. epyt_flow-0.4.0/epyt_flow/VERSION +1 -0
  7. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/__init__.py +6 -2
  8. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/leakdb.py +7 -12
  9. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/networks.py +404 -40
  10. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/base_handler.py +14 -0
  11. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scada_data/handlers.py +42 -0
  12. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/server.py +3 -1
  13. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/leakages.py +28 -18
  14. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/parallel_simulation.py +7 -7
  15. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/scada/scada_data.py +543 -12
  16. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/scada/scada_data_export.py +38 -5
  17. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/scenario_config.py +7 -5
  18. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/scenario_simulator.py +81 -48
  19. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/sensor_config.py +342 -47
  20. epyt_flow-0.4.0/epyt_flow/topology.py +633 -0
  21. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/uncertainty/model_uncertainty.py +26 -19
  22. {epyt_flow-0.2.0 → epyt_flow-0.4.0/epyt_flow.egg-info}/PKG-INFO +18 -6
  23. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow.egg-info/SOURCES.txt +2 -0
  24. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow.egg-info/requires.txt +1 -0
  25. epyt_flow-0.2.0/epyt_flow/VERSION +0 -1
  26. epyt_flow-0.2.0/epyt_flow/topology.py +0 -331
  27. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/CODE_OF_CONDUCT.md +0 -0
  28. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/LICENSE +0 -0
  29. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/MANIFEST.in +0 -0
  30. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +0 -0
  31. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +0 -0
  32. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +0 -0
  33. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +0 -0
  34. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +0 -0
  35. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +0 -0
  36. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +0 -0
  37. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +0 -0
  38. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +0 -0
  39. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c +0 -0
  40. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/hash.c +0 -0
  41. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/hash.h +0 -0
  42. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +0 -0
  43. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +0 -0
  44. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +0 -0
  45. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +0 -0
  46. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +0 -0
  47. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +0 -0
  48. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +0 -0
  49. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +0 -0
  50. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/input1.c +0 -0
  51. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/input2.c +0 -0
  52. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/input3.c +0 -0
  53. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/main.c +0 -0
  54. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +0 -0
  55. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +0 -0
  56. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/output.c +0 -0
  57. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/project.c +0 -0
  58. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/quality.c +0 -0
  59. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +0 -0
  60. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +0 -0
  61. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/report.c +0 -0
  62. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/rules.c +0 -0
  63. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +0 -0
  64. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/text.h +0 -0
  65. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET/SRC_engines/types.h +0 -0
  66. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt +0 -0
  67. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h +0 -0
  68. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/hash.c +0 -0
  69. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/hash.h +0 -0
  70. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx.h +0 -0
  71. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx_export.h +0 -0
  72. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.c +0 -0
  73. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.h +0 -0
  74. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/mempool.c +0 -0
  75. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/mempool.h +0 -0
  76. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxchem.c +0 -0
  77. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxcompiler.c +0 -0
  78. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxdict.h +0 -0
  79. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxdispersion.c +0 -0
  80. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxerr.c +0 -0
  81. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxfile.c +0 -0
  82. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.c +0 -0
  83. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.h +0 -0
  84. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxinp.c +0 -0
  85. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxout.c +0 -0
  86. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxproj.c +0 -0
  87. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxqual.c +0 -0
  88. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxrpt.c +0 -0
  89. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxtank.c +0 -0
  90. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxtoolkit.c +0 -0
  91. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxtypes.h +0 -0
  92. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.c +0 -0
  93. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.h +0 -0
  94. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/newton.c +0 -0
  95. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/newton.h +0 -0
  96. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/rk5.c +0 -0
  97. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/rk5.h +0 -0
  98. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/ros2.c +0 -0
  99. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/ros2.h +0 -0
  100. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.c +0 -0
  101. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.h +0 -0
  102. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/EPANET-MSX/readme.txt +0 -0
  103. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/EPANET/compile_linux.sh +0 -0
  104. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/__init__.py +0 -0
  105. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/__init__.py +0 -0
  106. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/batadal.py +0 -0
  107. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/batadal_data.py +0 -0
  108. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/battledim.py +0 -0
  109. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/battledim_data.py +0 -0
  110. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/gecco_water_quality.py +0 -0
  111. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/leakdb_data.py +0 -0
  112. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/data/benchmarks/water_usage.py +0 -0
  113. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/gym/__init__.py +0 -0
  114. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/gym/control_gyms.py +0 -0
  115. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/gym/scenario_control_env.py +0 -0
  116. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/metrics.py +0 -0
  117. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/models/__init__.py +0 -0
  118. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/models/event_detector.py +0 -0
  119. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/models/sensor_interpolation_detector.py +0 -0
  120. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/__init__.py +0 -0
  121. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/res_manager.py +0 -0
  122. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scada_data/__init__.py +0 -0
  123. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scada_data/data_handlers.py +0 -0
  124. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scada_data/export_handlers.py +0 -0
  125. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scenario/__init__.py +0 -0
  126. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scenario/event_handlers.py +0 -0
  127. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scenario/handlers.py +0 -0
  128. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scenario/simulation_handlers.py +0 -0
  129. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/rest_api/scenario/uncertainty_handlers.py +0 -0
  130. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/serialization.py +0 -0
  131. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/__init__.py +0 -0
  132. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/__init__.py +0 -0
  133. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/actuator_events.py +0 -0
  134. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/event.py +0 -0
  135. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/sensor_faults.py +0 -0
  136. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/sensor_reading_attack.py +0 -0
  137. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/sensor_reading_event.py +0 -0
  138. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/events/system_event.py +0 -0
  139. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/scada/__init__.py +0 -0
  140. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/scada/advanced_control.py +0 -0
  141. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/simulation/scenario_visualizer.py +0 -0
  142. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/uncertainty/__init__.py +0 -0
  143. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/uncertainty/sensor_noise.py +0 -0
  144. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/uncertainty/uncertainties.py +0 -0
  145. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/uncertainty/utils.py +0 -0
  146. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow/utils.py +1 -1
  147. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow.egg-info/dependency_links.txt +0 -0
  148. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/epyt_flow.egg-info/top_level.txt +0 -0
  149. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/pyproject.toml +0 -0
  150. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/setup.cfg +0 -0
  151. {epyt_flow-0.2.0 → epyt_flow-0.4.0}/setup.py +0 -0
@@ -0,0 +1,37 @@
1
+ cff-version: 1.2.0
2
+ authors:
3
+ - family-names: Artelt
4
+ given-names: André
5
+ orcid: "https://orcid.org/0000-0002-2426-3126"
6
+ - family-names: Kyriakou
7
+ given-names: Marios S.
8
+ orcid: "https://orcid.org/0000-0002-2324-8661"
9
+ - family-names: Demetriades
10
+ given-names: Marios
11
+ orcid: "https://orcid.org/0000-0001-7775-4319"
12
+ - family-names: Vrachimis
13
+ given-names: Stelios G.
14
+ orcid: "https://orcid.org/0000-0001-8862-5205"
15
+ - family-names: Eliades
16
+ given-names: Demetrios G.
17
+ orcid: "https://orcid.org/0000-0001-6184-6366"
18
+ - family-names: Hammer
19
+ given-names: Barbara
20
+ orcid: "https://orcid.org/0000-0002-0935-5591"
21
+ - family-names: Polycarpou
22
+ given-names: Marios M.
23
+ orcid: "https://orcid.org/0000-0001-6495-9171"
24
+ contact:
25
+ - family-names: Artelt
26
+ given-names: André
27
+ orcid: "https://orcid.org/0000-0002-2426-3126"
28
+ message: "If you use this software, please cite it using these metadata."
29
+ title: "EPyT-Flow -- EPANET Python Toolkit - Flow"
30
+ keywords:
31
+ - python
32
+ - simulation
33
+ - water
34
+ - epanet
35
+ - epanet-python-toolkit
36
+ license: MIT
37
+ repository-code: "https://github.com/WaterFutures/EPyT-Flow"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: epyt-flow
3
- Version: 0.2.0
3
+ Version: 0.4.0
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
@@ -30,10 +30,12 @@ Requires-Dist: tqdm>=4.66.2
30
30
  Requires-Dist: openpyxl>=3.1.2
31
31
  Requires-Dist: falcon>=3.1.3
32
32
  Requires-Dist: multiprocess>=0.70.16
33
+ Requires-Dist: geopandas>=0.14.4
33
34
  Requires-Dist: psutil
34
35
 
35
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
36
  [![pypi](https://img.shields.io/pypi/v/epyt-flow.svg)](https://pypi.org/project/epyt-flow/)
37
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
38
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/epyt-flow)
37
39
  [![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
40
  [![Documentation Status](https://readthedocs.org/projects/epyt-flow/badge/?version=stable)](https://epyt-flow.readthedocs.io/en/stable/?badge=stable)
39
41
  [![Downloads](https://static.pepy.tech/badge/epyt-flow)](https://pepy.tech/project/epyt-flow)
@@ -41,6 +43,8 @@ Requires-Dist: psutil
41
43
 
42
44
  # EPyT-Flow -- EPANET Python Toolkit - Flow
43
45
 
46
+ <img src="https://github.com/WaterFutures/EPyT-Flow/blob/main/docs/_static/net1_plot.png?raw=true" align="right" height="230px"/>
47
+
44
48
  EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
45
49
  for providing easy access to water distribution network simulations.
46
50
  It aims to provide a high-level interface for the easy generation of hydraulic and water quality scenario data.
@@ -50,8 +54,6 @@ and [EPANET-MSX](https://github.com/USEPA/EPANETMSX/).
50
54
  EPyT-Flow provides easy access to popular benchmark data sets for event detection and localization.
51
55
  Furthermore, it also provides an environment for developing and testing control algorithms.
52
56
 
53
- ![](https://github.com/WaterFutures/EPyT-Flow/blob/main/docs/_static/net1_plot.png?raw=true)
54
-
55
57
 
56
58
  ## Unique Features
57
59
 
@@ -74,8 +76,18 @@ Unique features of EPyT-Flow that make it superior to other (Python) toolboxes a
74
76
  EPyT-Flow supports Python 3.9 - 3.12
75
77
 
76
78
  Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overwrite the binaries
77
- shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
78
- a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
79
+ shipped by EPyT **IF** EPyT-Flow is installed on a Unix system and the *gcc* compiler is available.
80
+ By this, we not only aim to achieve a better performance of the simulations but also avoid any
81
+ compatibility issues of pre-compiled binaries.
82
+
83
+ #### Prerequisites for macOS users
84
+ The "true" *gcc* compiler (version 12) is needed which is not the
85
+ *clang* compiler that is shipped with Xcode and is linked to gcc!
86
+
87
+ The correct version of the "true" *gcc* can be installed via [brew](https://brew.sh/):
88
+ ```
89
+ brew install gcc@12
90
+ ```
79
91
 
80
92
  ### PyPI
81
93
 
@@ -1,5 +1,6 @@
1
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
2
1
  [![pypi](https://img.shields.io/pypi/v/epyt-flow.svg)](https://pypi.org/project/epyt-flow/)
2
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/epyt-flow)
3
4
  [![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
5
  [![Documentation Status](https://readthedocs.org/projects/epyt-flow/badge/?version=stable)](https://epyt-flow.readthedocs.io/en/stable/?badge=stable)
5
6
  [![Downloads](https://static.pepy.tech/badge/epyt-flow)](https://pepy.tech/project/epyt-flow)
@@ -7,6 +8,8 @@
7
8
 
8
9
  # EPyT-Flow -- EPANET Python Toolkit - Flow
9
10
 
11
+ <img src="https://github.com/WaterFutures/EPyT-Flow/blob/main/docs/_static/net1_plot.png?raw=true" align="right" height="230px"/>
12
+
10
13
  EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
11
14
  for providing easy access to water distribution network simulations.
12
15
  It aims to provide a high-level interface for the easy generation of hydraulic and water quality scenario data.
@@ -16,8 +19,6 @@ and [EPANET-MSX](https://github.com/USEPA/EPANETMSX/).
16
19
  EPyT-Flow provides easy access to popular benchmark data sets for event detection and localization.
17
20
  Furthermore, it also provides an environment for developing and testing control algorithms.
18
21
 
19
- ![](https://github.com/WaterFutures/EPyT-Flow/blob/main/docs/_static/net1_plot.png?raw=true)
20
-
21
22
 
22
23
  ## Unique Features
23
24
 
@@ -40,8 +41,18 @@ Unique features of EPyT-Flow that make it superior to other (Python) toolboxes a
40
41
  EPyT-Flow supports Python 3.9 - 3.12
41
42
 
42
43
  Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overwrite the binaries
43
- shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
44
- a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
44
+ shipped by EPyT **IF** EPyT-Flow is installed on a Unix system and the *gcc* compiler is available.
45
+ By this, we not only aim to achieve a better performance of the simulations but also avoid any
46
+ compatibility issues of pre-compiled binaries.
47
+
48
+ #### Prerequisites for macOS users
49
+ The "true" *gcc* compiler (version 12) is needed which is not the
50
+ *clang* compiler that is shipped with Xcode and is linked to gcc!
51
+
52
+ The correct version of the "true" *gcc* can be installed via [brew](https://brew.sh/):
53
+ ```
54
+ brew install gcc@12
55
+ ```
45
56
 
46
57
  ### PyPI
47
58
 
@@ -8,4 +8,5 @@ tqdm>=4.66.2
8
8
  openpyxl>=3.1.2
9
9
  falcon>=3.1.3
10
10
  multiprocess>=0.70.16
11
+ geopandas>=0.14.4
11
12
  psutil
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ mkdir -p "../customlibs/"
3
+ gcc-12 -w -O3 -march=native -dynamiclib -fPIC -install_name libepanet2_2.dylib -o "../customlibs/libepanet2_2.dylib" EPANET/SRC_engines/*.c -IEPANET/SRC_engines/include -lc -lm -pthread
4
+ gcc-12 -w -O3 -march=native -dynamiclib -fPIC -install_name libepanetmsx2_2_0.dylib -o "../customlibs/libepanetmsx2_2_0.dylib" -fopenmp -Depanetmsx_EXPORTS -IEPANET-MSX/Src/include -IEPANET/SRC_engines/include EPANET-MSX/Src/*.c -L'../customlibs' -lepanet2_2 -lm -lgomp -lpthread
@@ -0,0 +1 @@
1
+ 0.4.0
@@ -8,7 +8,8 @@ with open(os.path.join(os.path.dirname(__file__), 'VERSION'), encoding="utf-8")
8
8
  VERSION = f.read().strip()
9
9
 
10
10
 
11
- def compile_libraries_unix(lib_epanet_name, compile_script_name):
11
+ def compile_libraries_unix(lib_epanet_name: str, compile_script_name: str,
12
+ gcc_name: str = "gcc") -> None:
12
13
  """Compile EPANET and EPANET-MSX libraries if needed."""
13
14
  path_to_custom_libs = os.path.join(os.path.dirname(__file__), "customlibs")
14
15
  path_to_lib_epanet = os.path.join(path_to_custom_libs, lib_epanet_name)
@@ -20,7 +21,7 @@ def compile_libraries_unix(lib_epanet_name, compile_script_name):
20
21
  update = True
21
22
 
22
23
  if not os.path.isfile(path_to_lib_epanet) or update:
23
- if shutil.which("gcc") is not None:
24
+ if shutil.which(gcc_name) is not None:
24
25
  print("Compiling EPANET and EPANET-MSX...")
25
26
  try:
26
27
  subprocess.check_call(f"cd \"{path_to_epanet}\"; bash {compile_script_name}",
@@ -28,6 +29,7 @@ def compile_libraries_unix(lib_epanet_name, compile_script_name):
28
29
  print("Done")
29
30
  except subprocess.CalledProcessError as ex:
30
31
  print(f"Compilation failed\n{ex}")
32
+ warnings.warn("Falling back to pre-compiled library shipped by EPyT.")
31
33
  else:
32
34
  warnings.warn("GCC is not available to compile the required libraries.\n" +
33
35
  "Falling back to pre-compiled library shipped by EPyT.")
@@ -35,3 +37,5 @@ def compile_libraries_unix(lib_epanet_name, compile_script_name):
35
37
 
36
38
  if sys.platform.startswith("linux"):
37
39
  compile_libraries_unix("libepanet2_2.so", "compile_linux.sh")
40
+ elif sys.platform.startswith("darwin"):
41
+ compile_libraries_unix("libepanet2_2.dylib", "compile_macos.sh", gcc_name="gcc-12")
@@ -475,12 +475,10 @@ def load_scenarios(scenarios_id: list[int], use_net1: bool = True,
475
475
  (int(week_year_pat.shape[0]), int(week_year_pat.shape[1])))
476
476
 
477
477
  # Create demand
478
- if use_net1 is True:
479
- base = 1
480
- else:
481
- base = 0.3 # Avoid negative pressure in Hanoi
478
+ base = 1
482
479
  variation = 0.75 + np.random.normal(0, 0.07) # from 0 to 1
483
480
  dem = base * (year_offset+1) * (week_year_pat*variation+1) * (random+1)
481
+
484
482
  dem = dem.tolist()
485
483
  dem_final = []
486
484
  for d in dem:
@@ -508,6 +506,7 @@ def load_scenarios(scenarios_id: list[int], use_net1: bool = True,
508
506
  wdn.epanet_api.setTimeHydraulicStep(general_params["hydraulic_time_step"])
509
507
  wdn.epanet_api.setTimeSimulationDuration(general_params["simulation_duration"])
510
508
  wdn.epanet_api.setTimePatternStep(general_params["hydraulic_time_step"])
509
+ wdn.epanet_api.setFlowUnitsCMH()
511
510
 
512
511
  wdn.epanet_api.deletePatternsAll()
513
512
 
@@ -542,14 +541,10 @@ def load_scenarios(scenarios_id: list[int], use_net1: bool = True,
542
541
  upper = data + z
543
542
  return lower + np.random.uniform() * (upper - lower)
544
543
 
545
- model_uncertainty = ModelUncertainty(pipe_length_uncertainty=MyUniformUncertainty(low=0,
546
- high=0.25),
547
- pipe_diameter_uncertainty=MyUniformUncertainty(low=0,
548
- high=0.25),
549
- pipe_roughness_uncertainty=MyUniformUncertainty(low=0,
550
- high=0.25),
551
- demand_base_uncertainty=MyUniformUncertainty(low=0,
552
- high=0.25))
544
+ my_uncertainties = {"pipe_length_uncertainty": MyUniformUncertainty(low=0, high=0.25),
545
+ "pipe_roughness_uncertainty": MyUniformUncertainty(low=0, high=0.25),
546
+ "base_demand_uncertainty": MyUniformUncertainty(low=0, high=0.25)}
547
+ model_uncertainty = ModelUncertainty(**my_uncertainties)
553
548
 
554
549
  # Create sensor config (place pressure and flow sensors everywhere)
555
550
  sensor_config = network_config.sensor_config