epyt-flow 0.4.0__tar.gz → 0.5.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 → epyt_flow-0.5.0}/PKG-INFO +1 -1
  2. epyt_flow-0.5.0/epyt_flow/VERSION +1 -0
  3. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/scada/scada_data.py +6 -0
  4. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/scenario_visualizer.py +1 -1
  5. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/sensor_config.py +37 -1
  6. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/topology.py +72 -2
  7. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/utils.py +25 -2
  8. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow.egg-info/PKG-INFO +1 -1
  9. epyt_flow-0.5.0/epyt_flow.egg-info/top_level.txt +12 -0
  10. epyt_flow-0.4.0/epyt_flow/VERSION +0 -1
  11. epyt_flow-0.4.0/epyt_flow.egg-info/top_level.txt +0 -6
  12. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/CITATION.cff +0 -0
  13. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/CODE_OF_CONDUCT.md +0 -0
  14. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/LICENSE +0 -0
  15. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/MANIFEST.in +0 -0
  16. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/README.md +0 -0
  17. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/REQUIREMENTS.txt +0 -0
  18. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +0 -0
  19. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +0 -0
  20. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +0 -0
  21. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +0 -0
  22. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +0 -0
  23. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +0 -0
  24. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +0 -0
  25. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +0 -0
  26. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +0 -0
  27. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c +0 -0
  28. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/hash.c +0 -0
  29. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/hash.h +0 -0
  30. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +0 -0
  31. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +0 -0
  32. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +0 -0
  33. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +0 -0
  34. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +0 -0
  35. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +0 -0
  36. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +0 -0
  37. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +0 -0
  38. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/input1.c +0 -0
  39. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/input2.c +0 -0
  40. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/input3.c +0 -0
  41. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/main.c +0 -0
  42. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +0 -0
  43. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +0 -0
  44. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/output.c +0 -0
  45. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/project.c +0 -0
  46. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/quality.c +0 -0
  47. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +0 -0
  48. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +0 -0
  49. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/report.c +0 -0
  50. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/rules.c +0 -0
  51. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +0 -0
  52. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/text.h +0 -0
  53. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET/SRC_engines/types.h +0 -0
  54. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt +0 -0
  55. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h +0 -0
  56. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/hash.c +0 -0
  57. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/hash.h +0 -0
  58. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx.h +0 -0
  59. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx_export.h +0 -0
  60. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.c +0 -0
  61. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.h +0 -0
  62. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/mempool.c +0 -0
  63. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/mempool.h +0 -0
  64. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxchem.c +0 -0
  65. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxcompiler.c +0 -0
  66. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxdict.h +0 -0
  67. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxdispersion.c +0 -0
  68. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxerr.c +0 -0
  69. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxfile.c +0 -0
  70. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.c +0 -0
  71. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.h +0 -0
  72. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxinp.c +0 -0
  73. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxout.c +0 -0
  74. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxproj.c +0 -0
  75. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxqual.c +0 -0
  76. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxrpt.c +0 -0
  77. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxtank.c +0 -0
  78. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxtoolkit.c +0 -0
  79. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxtypes.h +0 -0
  80. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.c +0 -0
  81. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/msxutils.h +0 -0
  82. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/newton.c +0 -0
  83. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/newton.h +0 -0
  84. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/rk5.c +0 -0
  85. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/rk5.h +0 -0
  86. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/ros2.c +0 -0
  87. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/ros2.h +0 -0
  88. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.c +0 -0
  89. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/Src/smatrix.h +0 -0
  90. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/EPANET-MSX/readme.txt +0 -0
  91. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/compile_linux.sh +0 -0
  92. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/EPANET/compile_macos.sh +0 -0
  93. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/__init__.py +0 -0
  94. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/__init__.py +0 -0
  95. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/__init__.py +0 -0
  96. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/batadal.py +0 -0
  97. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/batadal_data.py +0 -0
  98. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/battledim.py +0 -0
  99. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/battledim_data.py +0 -0
  100. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/gecco_water_quality.py +0 -0
  101. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/leakdb.py +0 -0
  102. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/leakdb_data.py +0 -0
  103. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/benchmarks/water_usage.py +0 -0
  104. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/data/networks.py +0 -0
  105. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/gym/__init__.py +0 -0
  106. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/gym/control_gyms.py +0 -0
  107. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/gym/scenario_control_env.py +0 -0
  108. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/metrics.py +0 -0
  109. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/models/__init__.py +0 -0
  110. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/models/event_detector.py +0 -0
  111. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/models/sensor_interpolation_detector.py +0 -0
  112. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/__init__.py +0 -0
  113. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/base_handler.py +0 -0
  114. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/res_manager.py +0 -0
  115. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scada_data/__init__.py +0 -0
  116. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scada_data/data_handlers.py +0 -0
  117. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scada_data/export_handlers.py +0 -0
  118. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scada_data/handlers.py +0 -0
  119. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scenario/__init__.py +0 -0
  120. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scenario/event_handlers.py +0 -0
  121. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scenario/handlers.py +0 -0
  122. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scenario/simulation_handlers.py +0 -0
  123. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/scenario/uncertainty_handlers.py +0 -0
  124. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/rest_api/server.py +0 -0
  125. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/serialization.py +0 -0
  126. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/__init__.py +0 -0
  127. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/__init__.py +0 -0
  128. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/actuator_events.py +0 -0
  129. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/event.py +0 -0
  130. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/leakages.py +0 -0
  131. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/sensor_faults.py +0 -0
  132. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/sensor_reading_attack.py +0 -0
  133. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/sensor_reading_event.py +0 -0
  134. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/events/system_event.py +0 -0
  135. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/parallel_simulation.py +0 -0
  136. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/scada/__init__.py +0 -0
  137. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/scada/advanced_control.py +0 -0
  138. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/scada/scada_data_export.py +0 -0
  139. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/scenario_config.py +0 -0
  140. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/simulation/scenario_simulator.py +0 -0
  141. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/uncertainty/__init__.py +0 -0
  142. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/uncertainty/model_uncertainty.py +0 -0
  143. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/uncertainty/sensor_noise.py +0 -0
  144. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/uncertainty/uncertainties.py +0 -0
  145. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow/uncertainty/utils.py +0 -0
  146. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow.egg-info/SOURCES.txt +0 -0
  147. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow.egg-info/dependency_links.txt +0 -0
  148. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/epyt_flow.egg-info/requires.txt +0 -0
  149. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/pyproject.toml +0 -0
  150. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/setup.cfg +0 -0
  151. {epyt_flow-0.4.0 → epyt_flow-0.5.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: epyt-flow
3
- Version: 0.4.0
3
+ Version: 0.5.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
@@ -0,0 +1 @@
1
+ 0.5.0
@@ -1163,6 +1163,9 @@ class ScadaData(Serializable):
1163
1163
  :func:`~epyt_flow.simulation.scada.scada_data.ScadaData.get_data` --
1164
1164
  calling this function is the only way of accessing the energy usage of each pump.
1165
1165
 
1166
+ The odering in the returned NumPy array corresponds to the ordering
1167
+ of the pumps in EPANET.
1168
+
1166
1169
  Returns
1167
1170
  -------
1168
1171
  `numpy.ndarray`
@@ -1180,6 +1183,9 @@ class ScadaData(Serializable):
1180
1183
  :func:`~epyt_flow.simulation.scada.scada_data.ScadaData.get_data` --
1181
1184
  calling this function is the only way of accessing the pumps' efficiency.
1182
1185
 
1186
+ The odering in the returned NumPy array corresponds to the ordering
1187
+ of the pumps in EPANET.
1188
+
1183
1189
  Returns
1184
1190
  -------
1185
1191
  `numpy.ndarray`
@@ -12,7 +12,7 @@ class ScenarioVisualizer():
12
12
 
13
13
  Parameters
14
14
  ----------
15
- scenario : :class:`epyt_flow.simulation.scenario_simulator.ScenarioSimulator`
15
+ scenario : :class:`~epyt_flow.simulation.scenario_simulator.ScenarioSimulator`
16
16
  Scenario to be visualized.
17
17
  """
18
18
  def __init__(self, scenario: ScenarioSimulator):
@@ -1647,6 +1647,42 @@ class SensorConfig(JsonSerializable):
1647
1647
  """
1648
1648
  return deepcopy(self.__sensors_id_to_idx)
1649
1649
 
1650
+ def get_as_dict(self) -> dict:
1651
+ """
1652
+ Gets the sensor configuration as a dictionary.
1653
+
1654
+ Returns
1655
+ -------
1656
+ `dict`
1657
+ Dictionary of set sensors -- the keys are the sensor types.
1658
+ """
1659
+ r = {}
1660
+
1661
+ if self.__pressure_sensors != []:
1662
+ r["pressure"] = self.__pressure_sensors
1663
+ if self.__flow_sensors != []:
1664
+ r["flow"] = self.__flow_sensors
1665
+ if self.__demand_sensors != []:
1666
+ r["demand"] = self.__demand_sensors
1667
+ if self.__tank_volume_sensors != []:
1668
+ r["tank_volume"] = self.__tank_volume_sensors
1669
+ if self.__valve_state_sensors != []:
1670
+ r["valve_state"] = self.__valve_state_sensors
1671
+ if self.__pump_state_sensors != []:
1672
+ r["pump_state"] = self.__pump_state_sensors
1673
+ if self.__quality_node_sensors != []:
1674
+ r["node_quality"] = self.__quality_node_sensors
1675
+ if self.__quality_link_sensors != []:
1676
+ r["link_quality"] = self.__quality_link_sensors
1677
+ if self.__bulk_species_node_sensors != {}:
1678
+ r["node_bulk_species"] = self.__bulk_species_node_sensors
1679
+ if self.__bulk_species_link_sensors != {}:
1680
+ r["link_bulk_species"] = self.__bulk_species_link_sensors
1681
+ if self.__surface_species_sensors != {}:
1682
+ r["surface_species"] = self.__surface_species_sensors
1683
+
1684
+ return r
1685
+
1650
1686
  def get_attributes(self) -> dict:
1651
1687
  attr = {"nodes": self.__nodes, "links": self.__links,
1652
1688
  "valves": self.__valves, "pumps": self.__pumps,
@@ -1719,7 +1755,7 @@ class SensorConfig(JsonSerializable):
1719
1755
  f"pump_id_to_idx: {self.__pump_id_to_idx} tank_id_to_idx: {self.__tank_id_to_idx} " +\
1720
1756
  f"valve_id_to_idx: {self.__valve_id_to_idx} " +\
1721
1757
  f"bulkspecies_id_to_idx: {self.__bulkspecies_id_to_idx} " +\
1722
- f"surfacespecies_id_to_idx: {self.__surfacespecies_id_to_idx}" +\
1758
+ f"surfacespecies_id_to_idx: {self.__surfacespecies_id_to_idx} " +\
1723
1759
  f"pressure_sensors: {self.__pressure_sensors} flow_sensors: {self.__flow_sensors} " +\
1724
1760
  f"demand_sensors: {self.__demand_sensors} " +\
1725
1761
  f"quality_node_sensors: {self.__quality_node_sensors} " +\
@@ -108,7 +108,7 @@ class NetworkTopology(nx.Graph, JsonSerializable):
108
108
 
109
109
  def convert_units(self, units: int) -> Any:
110
110
  """
111
- Converts this instance to a :class:`epyt_flow.topology.NetworkTopology` instance
111
+ Converts this instance to a :class:`~epyt_flow.topology.NetworkTopology` instance
112
112
  where everything is measured in given measurement units category
113
113
  (US Customary or SI Metric).
114
114
 
@@ -124,7 +124,7 @@ class NetworkTopology(nx.Graph, JsonSerializable):
124
124
 
125
125
  Returns
126
126
  -------
127
- :class:`epyt_flow.topology.NetworkTopology`
127
+ :class:`~epyt_flow.topology.NetworkTopology`
128
128
  Network topology with the new measurements units.
129
129
  """
130
130
  if self.__units is None:
@@ -199,6 +199,76 @@ class NetworkTopology(nx.Graph, JsonSerializable):
199
199
  """
200
200
  return [(link_id, end_points) for link_id, end_points, _ in self.__links]
201
201
 
202
+ def get_all_junctions(self) -> list[str]:
203
+ """
204
+ Gets all junctions -- i.e. nodes that are not tanks or reservoirs.
205
+
206
+ Returns
207
+ -------
208
+ `list[str]`
209
+ List of all junctions.
210
+ """
211
+ r = []
212
+
213
+ for node_id in self.get_all_nodes():
214
+ if self.get_node_info(node_id)["type"] == "JUNCTION":
215
+ r.append(node_id)
216
+
217
+ return r
218
+
219
+ def get_all_tanks(self) -> list[str]:
220
+ """
221
+ Gets all tanks -- i.e. nodes that are not junctions or reservoirs.
222
+
223
+ Returns
224
+ -------
225
+ `list[str]`
226
+ List of all tanks.
227
+ """
228
+ r = []
229
+
230
+ for node_id in self.get_all_nodes():
231
+ if self.get_node_info(node_id)["type"] == "TANK":
232
+ r.append(node_id)
233
+
234
+ return r
235
+
236
+ def get_all_reservoirs(self) -> list[str]:
237
+ """
238
+ Gets all reservoirs -- i.e. nodes that are not junctions or tanks.
239
+
240
+ Returns
241
+ -------
242
+ `list[str]`
243
+ List of all reservoirs.
244
+ """
245
+ r = []
246
+
247
+ for node_id in self.get_all_nodes():
248
+ if self.get_node_info(node_id)["type"] == "RESERVOIR":
249
+ r.append(node_id)
250
+
251
+ return r
252
+
253
+ def get_all_pipes(self) -> list[tuple[str, tuple[str, str]]]:
254
+ """
255
+ Gets all pipes -- i.e. links that not valves or pumps.
256
+
257
+ Returns
258
+ -------
259
+ `list[tuple[str, tuple[str, str]]]`
260
+ List of all pipes -- (link ID, (left node ID, right node ID)).
261
+ """
262
+ r = []
263
+
264
+ for link_id, link_nodes in self.get_all_links():
265
+ link_info = self.get_link_info(link_id)
266
+
267
+ if link_info["type"] == "PIPE":
268
+ r.append((link_id, link_nodes))
269
+
270
+ return r
271
+
202
272
  def get_all_pumps(self) -> list[str]:
203
273
  """
204
274
  Gets the IDs of all pumps.
@@ -153,8 +153,10 @@ def plot_timeseries_data(data: np.ndarray, labels: list[str] = None, x_axis_labe
153
153
 
154
154
 
155
155
  def plot_timeseries_prediction(y: np.ndarray, y_pred: np.ndarray,
156
- confidence_interval: np.ndarray = None, show: bool = True,
157
- ax: matplotlib.axes.Axes = None) -> matplotlib.axes.Axes:
156
+ confidence_interval: np.ndarray = None,
157
+ x_axis_label: str = None, y_axis_label: str = None,
158
+ show: bool = True, ax: matplotlib.axes.Axes = None
159
+ ) -> matplotlib.axes.Axes:
158
160
  """
159
161
  Plots the prediction (e.g. forecast) of *single* time series together with the
160
162
  ground truth time series. In addition, confidence intervals can be plotted as well.
@@ -169,6 +171,14 @@ def plot_timeseries_prediction(y: np.ndarray, y_pred: np.ndarray,
169
171
  Confidence interval (upper and lower value) for each prediction in `y_pred`.
170
172
  If not None, the confidence interval is plotted as well.
171
173
 
174
+ The default is None.
175
+ x_axis_label : `str`, optional
176
+ X axis label.
177
+
178
+ The default is None.
179
+ y_axis_label : `str`, optional
180
+ Y axis label.
181
+
172
182
  The default is None.
173
183
  show : `bool`, optional
174
184
  If True, the plot/figure is shown in a window.
@@ -198,6 +208,14 @@ def plot_timeseries_prediction(y: np.ndarray, y_pred: np.ndarray,
198
208
  raise ValueError("'y_pred' must be a 1d array")
199
209
  if len(y.shape) != 1:
200
210
  raise ValueError("'y' must be a 1d array")
211
+ if x_axis_label is not None:
212
+ if not isinstance(x_axis_label, str):
213
+ raise TypeError("'x_axis_label' must be an instance of 'str' " +
214
+ f"but not of '{type(x_axis_label)}'")
215
+ if y_axis_label is not None:
216
+ if not isinstance(y_axis_label, str):
217
+ raise TypeError("'y_axis_label' must be an instance of 'str' " +
218
+ f"but not of '{type(y_axis_label)}'")
201
219
  if not isinstance(show, bool):
202
220
  raise TypeError(f"'show' must be an instance of 'bool' but not of '{type(show)}'")
203
221
  if ax is not None:
@@ -218,6 +236,11 @@ def plot_timeseries_prediction(y: np.ndarray, y_pred: np.ndarray,
218
236
  ax.plot(y_pred, ".-", label="Prediction")
219
237
  ax.legend()
220
238
 
239
+ if x_axis_label is not None:
240
+ ax.set_xlabel(x_axis_label)
241
+ if y_axis_label is not None:
242
+ ax.set_ylabel(y_axis_label)
243
+
221
244
  if show is True and fig is not None:
222
245
  plt.show()
223
246
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: epyt-flow
3
- Version: 0.4.0
3
+ Version: 0.5.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
@@ -0,0 +1,12 @@
1
+ Hanoi
2
+ MacOS
3
+ Net1
4
+ Tut
5
+ build
6
+ dist
7
+ docs
8
+ epyt_flow
9
+ examples
10
+ paper
11
+ quality-example-data
12
+ tests
@@ -1 +0,0 @@
1
- 0.4.0
@@ -1,6 +0,0 @@
1
- dist
2
- docs
3
- epyt_flow
4
- examples
5
- paper
6
- tests
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes