epyt-flow 0.11.0__py3-none-any.whl → 0.12.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. epyt_flow/VERSION +1 -1
  2. epyt_flow/data/benchmarks/gecco_water_quality.py +2 -2
  3. epyt_flow/data/benchmarks/leakdb.py +40 -5
  4. epyt_flow/data/benchmarks/water_usage.py +4 -3
  5. epyt_flow/gym/__init__.py +0 -3
  6. epyt_flow/gym/scenario_control_env.py +3 -10
  7. epyt_flow/rest_api/scenario/control_handlers.py +118 -0
  8. epyt_flow/rest_api/scenario/event_handlers.py +114 -1
  9. epyt_flow/rest_api/scenario/handlers.py +33 -0
  10. epyt_flow/rest_api/server.py +14 -2
  11. epyt_flow/simulation/backend/__init__.py +1 -0
  12. epyt_flow/simulation/backend/my_epyt.py +1056 -0
  13. epyt_flow/simulation/events/quality_events.py +3 -1
  14. epyt_flow/simulation/scada/scada_data.py +201 -12
  15. epyt_flow/simulation/scenario_simulator.py +142 -59
  16. epyt_flow/topology.py +8 -7
  17. epyt_flow/utils.py +30 -0
  18. epyt_flow/visualization/scenario_visualizer.py +159 -69
  19. epyt_flow/visualization/visualization_utils.py +144 -17
  20. {epyt_flow-0.11.0.dist-info → epyt_flow-0.12.0.dist-info}/METADATA +4 -4
  21. {epyt_flow-0.11.0.dist-info → epyt_flow-0.12.0.dist-info}/RECORD +24 -27
  22. {epyt_flow-0.11.0.dist-info → epyt_flow-0.12.0.dist-info}/WHEEL +1 -1
  23. epyt_flow/gym/control_gyms.py +0 -55
  24. epyt_flow/metrics.py +0 -471
  25. epyt_flow/models/__init__.py +0 -2
  26. epyt_flow/models/event_detector.py +0 -36
  27. epyt_flow/models/sensor_interpolation_detector.py +0 -123
  28. epyt_flow/simulation/scada/advanced_control.py +0 -138
  29. {epyt_flow-0.11.0.dist-info → epyt_flow-0.12.0.dist-info/licenses}/LICENSE +0 -0
  30. {epyt_flow-0.11.0.dist-info → epyt_flow-0.12.0.dist-info}/top_level.txt +0 -0
@@ -7,6 +7,7 @@ from dataclasses import dataclass
7
7
  from typing import Optional, Union, List, Tuple
8
8
 
9
9
  import matplotlib as mpl
10
+ import matplotlib.pyplot as plt
10
11
  import networkx.drawing.nx_pylab as nxp
11
12
  import numpy as np
12
13
  from scipy.interpolate import CubicSpline
@@ -114,7 +115,7 @@ class JunctionObject:
114
115
 
115
116
  self.node_color.append(sorted_values)
116
117
  self.vmin = min(*sorted_values, self.vmin)
117
- self.vmax = max(*sorted_values, self.vmin)
118
+ self.vmax = max(*sorted_values, self.vmax)
118
119
 
119
120
  def get_frame(self, frame_number: int = 0):
120
121
  """
@@ -156,6 +157,42 @@ class JunctionObject:
156
157
 
157
158
  return valid_params
158
159
 
160
+ def get_frame_mask(self, mask, color):
161
+ """
162
+ Returns all attributes necessary for networkx to draw the specified
163
+ frame mask. Meaning covering all masked junction objects with the
164
+ default value.
165
+
166
+ Parameters
167
+ ----------
168
+ mask: `np.ndarray`
169
+ An array consisting of 0 and 1, where 0 means no sensor. Nodes
170
+ without sensor are to be masked.
171
+ color:
172
+ The default color of masked nodes.
173
+
174
+ Returns
175
+ -------
176
+ valid_params : `dict`
177
+ A dictionary containing all attributes that function as parameters
178
+ for `networkx.drawing.nx_pylab.draw_networkx_nodes() <https://networkx.org/documentation/stable/reference/generated/networkx.drawing.nx_pylab.draw_networkx_nodes.html#draw-networkx-nodes>`_.
179
+ """
180
+
181
+ attributes = vars(self).copy()
182
+
183
+ attributes['nodelist'] = [node for node, flag in
184
+ zip(self.nodelist, mask) if not flag]
185
+ attributes['node_color'] = color
186
+
187
+ sig = inspect.signature(nxp.draw_networkx_nodes)
188
+
189
+ valid_params = {
190
+ key: value for key, value in attributes.items()
191
+ if key in sig.parameters and value is not None
192
+ }
193
+
194
+ return valid_params
195
+
159
196
  def interpolate(self, num_inter_frames: int):
160
197
  """
161
198
  Interpolates node_color values for smoother animations.
@@ -220,7 +257,7 @@ class EdgeObject:
220
257
  edge_color: Union[str, list] = 'k'
221
258
  interpolated = {}
222
259
 
223
- def rescale_widths(self, line_widths: Tuple[int] = (1, 2)):
260
+ def rescale_widths(self, line_widths: Tuple[int, int] = (1, 2)):
224
261
  """
225
262
  Rescales all edge widths to the given interval.
226
263
 
@@ -253,7 +290,9 @@ class EdgeObject:
253
290
  scada_data: Optional[ScadaData],
254
291
  parameter: str = 'flow_rate', statistic: str = 'mean',
255
292
  pit: Optional[Union[int, Tuple[int]]] = None,
256
- intervals: Optional[Union[int, List[Union[int, float]]]] = None):
293
+ species: str = None,
294
+ intervals: Optional[Union[int, List[Union[int, float]]]] = None,
295
+ use_sensor_data: bool = None):
257
296
  """
258
297
  Adds a new frame of edge_color or edge width based on the given data
259
298
  and statistic.
@@ -277,10 +316,18 @@ class EdgeObject:
277
316
  'max' or 'time_step'.
278
317
  pit : `int`
279
318
  The point in time for the 'time_step' statistic.
319
+ species: `str`, optional
320
+ Key of the species. Necessary only for parameter
321
+ 'bulk_species_concentration'.
280
322
  intervals : `int`, `list[int]` or `list[float]`
281
323
  If provided, the data will be grouped into intervals. It can be an
282
324
  integer specifying the number of groups or a list of boundary
283
325
  points.
326
+ use_sensor_data : `bool`, optional
327
+ If `True`, instead of using raw simulation data, the data recorded
328
+ by the corresponding sensors in the system is used for the
329
+ visualization. Note: Not all components may have a sensor attached
330
+ and sensors may be subject to sensor faults or noise.
284
331
 
285
332
  Raises
286
333
  ------
@@ -296,11 +343,36 @@ class EdgeObject:
296
343
  self.edge_vmax = float('-inf')
297
344
 
298
345
  if parameter == 'flow_rate':
299
- values = scada_data.flow_data_raw
346
+ if use_sensor_data:
347
+ values, self.mask = scada_data.get_data_flows_as_edge_features()
348
+ values = values[:, ::2]
349
+ self.mask = self.mask[::2]
350
+ else:
351
+ values = scada_data.flow_data_raw
300
352
  elif parameter == 'link_quality':
301
- values = scada_data.link_quality_data_raw
353
+ if use_sensor_data:
354
+ values, self.mask = scada_data.get_data_links_quality_as_edge_features()
355
+ values = values[:, ::2]
356
+ self.mask = self.mask[::2]
357
+ else:
358
+ values = scada_data.link_quality_data_raw
302
359
  elif parameter == 'custom_data':
303
360
  values = scada_data
361
+ elif parameter == 'bulk_species_concentration':
362
+ if not species:
363
+ raise ValueError('Species must be given when using '
364
+ 'bulk_species_concentration')
365
+ if use_sensor_data:
366
+ values, self.mask = scada_data.get_data_bulk_species_concentrations_as_edge_features()
367
+ self.mask = self.mask[::2,
368
+ scada_data.sensor_config.bulk_species.index(
369
+ species)]
370
+ values = values[:, ::2,
371
+ scada_data.sensor_config.bulk_species.index(species)]
372
+ else:
373
+ values = scada_data.bulk_species_link_concentration_raw[:,
374
+ scada_data.sensor_config.bulk_species.index(species),
375
+ :]
304
376
  elif parameter == 'diameter':
305
377
  value_dict = {
306
378
  link[0]: topology.get_link_info(link[0])['diameter'] for
@@ -314,7 +386,6 @@ class EdgeObject:
314
386
  self.edge_color.append(sorted_values)
315
387
  self.edge_vmin = min(*sorted_values, self.edge_vmin)
316
388
  self.edge_vmax = max(*sorted_values, self.edge_vmax)
317
-
318
389
  return
319
390
  else:
320
391
  raise ValueError('Parameter must be flow_rate, link_quality, '
@@ -404,6 +475,54 @@ class EdgeObject:
404
475
 
405
476
  return valid_params
406
477
 
478
+ def get_frame_mask(self, frame_number: int = 0, color='k'):
479
+ """
480
+ Returns all attributes necessary for networkx to draw the specified
481
+ frame mask.
482
+
483
+ Parameters
484
+ ----------
485
+ frame_number : `int`, default = 0
486
+ The frame whose parameters should be returned. Default is 0, this
487
+ is also used if only 1 frame exists (e.g. for plots, not
488
+ animations).
489
+ color:
490
+ The default color of masked nodes.
491
+
492
+ Returns
493
+ -------
494
+ valid_params : `dict`
495
+ A dictionary containing all attributes that function as parameters
496
+ for `networkx.drawing.nx_pylab.draw_networkx_edges() <https://networkx.org/documentation/stable/reference/generated/networkx.drawing.nx_pylab.draw_networkx_edges.html#draw-networkx-edges>`_.
497
+ """
498
+ attributes = vars(self).copy()
499
+
500
+ attributes['edgelist'] = [edge for edge, flag in
501
+ zip(self.edgelist, self.mask) if not flag]
502
+ attributes['edge_color'] = color
503
+
504
+ if hasattr(self, 'width'):
505
+ if 'width' in self.interpolated.keys():
506
+ if frame_number > len(self.interpolated['width']):
507
+ frame_number = -1
508
+ attributes['width'] = self.interpolated['width'][frame_number]
509
+ else:
510
+ if frame_number > len(self.width):
511
+ frame_number = -1
512
+ attributes['width'] = self.width[frame_number]
513
+ attributes['width'] = [edge for edge, flag in
514
+ zip(attributes['width'].copy(), self.mask)
515
+ if not flag]
516
+
517
+ sig = inspect.signature(nxp.draw_networkx_edges)
518
+
519
+ valid_params = {
520
+ key: value for key, value in attributes.items()
521
+ if key in sig.parameters and value is not None
522
+ }
523
+
524
+ return valid_params
525
+
407
526
  def interpolate(self, num_inter_frames: int):
408
527
  """
409
528
  Interpolates edge_color and width values for smoother animations.
@@ -447,10 +566,10 @@ class EdgeObject:
447
566
  for key, value in attributes.items():
448
567
  setattr(self, key, value)
449
568
 
450
- @staticmethod
451
- def __rescale(values: Union[np.ndarray, list],
569
+ def __rescale(self, values: Union[np.ndarray, list],
452
570
  scale_min_max: Union[List, Tuple[int]],
453
- values_min_max: Union[List, Tuple[int, int]] = None) -> List:
571
+ values_min_max: Union[
572
+ List, Tuple[int, int]] = None) -> np.ndarray:
454
573
  """
455
574
  Rescales the given values to a new range.
456
575
 
@@ -487,7 +606,13 @@ class EdgeObject:
487
606
  return scale_min_max[0] + (x - min_val) / (
488
607
  max_val - min_val) * scale
489
608
 
490
- return [range_map(x) for x in values]
609
+ vectorized_range_map = np.vectorize(range_map)
610
+ rescaled_widths = vectorized_range_map(np.array(values))
611
+
612
+ if hasattr(self, 'mask'):
613
+ rescaled_widths = np.where(self.mask == 1, rescaled_widths, 1.0)
614
+
615
+ return rescaled_widths
491
616
 
492
617
 
493
618
  @serializable(COLOR_SCHEMES_ID, ".epyt_flow_color_scheme")
@@ -496,6 +621,7 @@ class ColorScheme(JsonSerializable):
496
621
  A class containing the color scheme for the
497
622
  :class:`~epyt_flow.visualization.ScenarioVisualizer`.
498
623
  """
624
+
499
625
  def __init__(self, pipe_color: str, node_color: str, pump_color: str,
500
626
  tank_color: str, reservoir_color: str,
501
627
  valve_color: str) -> None:
@@ -537,7 +663,8 @@ class ColorScheme(JsonSerializable):
537
663
  """
538
664
  attr = {
539
665
  k: v for k, v in self.__dict__.items()
540
- if not (k.startswith("__") or k.startswith("_")) and not callable(v)
666
+ if
667
+ not (k.startswith("__") or k.startswith("_")) and not callable(v)
541
668
  }
542
669
  return super().get_attributes() | attr
543
670
 
@@ -558,12 +685,12 @@ class ColorScheme(JsonSerializable):
558
685
  if not isinstance(other, ColorScheme):
559
686
  return False
560
687
  return (
561
- self.pipe_color == other.pipe_color and
562
- self.node_color == other.node_color and
563
- self.pump_color == other.pump_color and
564
- self.tank_color == other.tank_color and
565
- self.reservoir_color == other.reservoir_color and
566
- self.valve_color == other.valve_color
688
+ self.pipe_color == other.pipe_color and
689
+ self.node_color == other.node_color and
690
+ self.pump_color == other.pump_color and
691
+ self.tank_color == other.tank_color and
692
+ self.reservoir_color == other.reservoir_color and
693
+ self.valve_color == other.valve_color
567
694
  )
568
695
 
569
696
  def __str__(self) -> str:
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: epyt-flow
3
- Version: 0.11.0
3
+ Version: 0.12.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
- License: MIT License
6
+ License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/WaterFutures/EPyT-Flow
8
8
  Project-URL: Documentation, https://epyt-flow.readthedocs.io/en/stable/
9
9
  Project-URL: Repository, https://github.com/WaterFutures/EPyT-Flow.git
@@ -11,7 +11,6 @@ Project-URL: Issues, https://github.com/WaterFutures/EPyT-Flow/issues
11
11
  Keywords: epanet,water,networks,hydraulics,quality,simulations
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Intended Audience :: Science/Research
14
- Classifier: License :: OSI Approved :: MIT License
15
14
  Classifier: Programming Language :: Python :: 3
16
15
  Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
@@ -35,6 +34,7 @@ Requires-Dist: geopandas>=0.14.4
35
34
  Requires-Dist: svgpath2mpl>=1.0.0
36
35
  Requires-Dist: Deprecated>=1.2.14
37
36
  Requires-Dist: psutil
37
+ Dynamic: license-file
38
38
 
39
39
  [![pypi](https://img.shields.io/pypi/v/epyt-flow.svg)](https://pypi.org/project/epyt-flow/)
40
40
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -1,9 +1,8 @@
1
- epyt_flow/VERSION,sha256=eV1rx5V00q7AOtnP7EBLuVCDyd0hDmUh4NQZl3LSjUQ,7
1
+ epyt_flow/VERSION,sha256=ipMkE9QvlQgvgyNEdlI3mkiF4ygynvyjpn7Jx5PAmUA,7
2
2
  epyt_flow/__init__.py,sha256=n-zI5G3DUofs_pNC5YNWopNPCPUtpL-jYi8RPH6eakw,1768
3
- epyt_flow/metrics.py,sha256=vGUOWJ7hHkTtLKXsUTpT4LUHulumQ6WcmWc3yeJ8Fbo,16402
4
3
  epyt_flow/serialization.py,sha256=uGGN1iZ21ek1u6Xzs4z2xum5Qt8554Wem-wEMGEaa7I,14574
5
- epyt_flow/topology.py,sha256=w5V9OK6ZtO7hpCb5LYMyAYY80gd3lDPPZk3qhXP5Qdo,25858
6
- epyt_flow/utils.py,sha256=jQslCH4YMvTp5AtqRMbNIW2B9G3E-TQoGaox7yQ3UtE,16489
4
+ epyt_flow/topology.py,sha256=Ih6m_tMT1JlPOJv8rHDVBtNayFOarPyAmCbMyojJtQg,26037
5
+ epyt_flow/utils.py,sha256=R_IE6uuTF2MRjUkgWDEa3xOYk8iorieHCqqQ0tDUZ40,17476
7
6
  epyt_flow/EPANET/compile_linux.sh,sha256=wcrDyiB8NkivmaC-X9FI2WxhY3IJqDLiyIbVTv2XEPY,489
8
7
  epyt_flow/EPANET/compile_macos.sh,sha256=1K33-bPdgr01EIf87YUvmOFHXyOkBWI6mKXQ8x1Hzmo,504
9
8
  epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS,sha256=yie5yAsEEPY0984PmkSRUdqEU9rVvRSGGWmjxdwCYMU,925
@@ -86,48 +85,46 @@ epyt_flow/data/benchmarks/batadal.py,sha256=E9kl0gI5HyL6LZ9ZoLZwdQBNHXKblWW1QV4E
86
85
  epyt_flow/data/benchmarks/batadal_data.py,sha256=oIzcysGivMPAgrfzrk5l8i-j6Ii96DPcFa6sL4TSaw8,880
87
86
  epyt_flow/data/benchmarks/battledim.py,sha256=JS8nYZVTAhNhhUber_m3_rK-_J94Jqx9B-0DHBc_NfA,20756
88
87
  epyt_flow/data/benchmarks/battledim_data.py,sha256=0vHm-2eAiLv6U-n5dqUUWS1o_szFRy9mVJ3eqDRp4PE,3373
89
- epyt_flow/data/benchmarks/gecco_water_quality.py,sha256=Aes0Cua8w7Lz6CBD8JeK4etTvHY-oDX3GSq0JbseY2c,11409
90
- epyt_flow/data/benchmarks/leakdb.py,sha256=IwOl0vLL5Fn5sJjWrB4eIq52nMx7kmdUpiB2HDGl_rs,25483
88
+ epyt_flow/data/benchmarks/gecco_water_quality.py,sha256=xYN-xrcx409IhTJjvaMbZABORru3XQNnble76aAOKQ8,11414
89
+ epyt_flow/data/benchmarks/leakdb.py,sha256=IEP6-bx9il65kX5mlGK1M9cevQPvAwLaDxg9YaX9qVg,26690
91
90
  epyt_flow/data/benchmarks/leakdb_data.py,sha256=FNssgMkC1wqWVlaOrrihr4Od9trEZY7KeK5KuBeRMvM,507058
92
- epyt_flow/data/benchmarks/water_usage.py,sha256=COgsLRSzcG0JT5xh2qdDm7IjuMCx6n_zrdxOPupHiJY,4920
93
- epyt_flow/gym/__init__.py,sha256=KNTDtPTEtHwZ4ehHfj9qGw81Z9acFqPIgMzYUzH5_uM,115
94
- epyt_flow/gym/control_gyms.py,sha256=7GVIdBKd4vppLke59pqi-OKl8m-BkPyvLwUhg9xRah4,1632
95
- epyt_flow/gym/scenario_control_env.py,sha256=7OZuhrEW6bzKwYfL-lMgvNBERX9WG9Npkle3pfLEgq0,12845
96
- epyt_flow/models/__init__.py,sha256=be5s08y1Tg66SuNYKGz5GnNMHThnQJo8SWJdT9493Kc,75
97
- epyt_flow/models/event_detector.py,sha256=jLCkd0ocJXpYB2t_nlj7GjYIqBfch6hY4eA41KejX4w,941
98
- epyt_flow/models/sensor_interpolation_detector.py,sha256=H5pPbwa18FmE2L8khSkcYEunPjN6fuh2vXb9BZSX_5o,4011
91
+ epyt_flow/data/benchmarks/water_usage.py,sha256=RiLGLof1HT0luwn7_dG11_nP5U5r9B3L8vDLuwsIKTM,4962
92
+ epyt_flow/gym/__init__.py,sha256=gDIP9VGjKraajsJo6MnPN-TaEUTLnnJNj2c_7jrb8Bg,36
93
+ epyt_flow/gym/scenario_control_env.py,sha256=-sydXb7x6765dfZyqpThXF9BnIVcMLyzshMlbpXuZng,12618
99
94
  epyt_flow/rest_api/__init__.py,sha256=4HilmXhdh6H56UHJBB2WUSULlEBUDnI1FPTP11ft3HE,126
100
95
  epyt_flow/rest_api/base_handler.py,sha256=HDLXrMXqgWvxWAsB-3G4plyTyCv27_eBbq4eRl_FeBo,2609
101
96
  epyt_flow/rest_api/res_manager.py,sha256=j6-3FUBZNLKM9bCsIDZzSytfDYJbDLRwjn1mIPstTqI,2342
102
- epyt_flow/rest_api/server.py,sha256=kZlprvRw7op39s7KhtEt1TgAsqs94KTQEdzIW9NMMJc,7778
97
+ epyt_flow/rest_api/server.py,sha256=cPQM17rdbXLFlPRePb0Y7OcCyfJUN9SX7cv0etHtfvo,8727
103
98
  epyt_flow/rest_api/scada_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
99
  epyt_flow/rest_api/scada_data/data_handlers.py,sha256=VGw3uakxhFgqLMYRC5OaAuCbp0SnGxdPXWruUVEBiJc,11895
105
100
  epyt_flow/rest_api/scada_data/export_handlers.py,sha256=W-T2WgPuG8cNVzA8h3e0lwi-nSKFi11PPyuNQWTMwzg,4624
106
101
  epyt_flow/rest_api/scada_data/handlers.py,sha256=jcGw91TjjhRQm_hJvjbWvSTBLpvMJDOA4bQw5iOpSUw,7673
107
102
  epyt_flow/rest_api/scenario/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
- epyt_flow/rest_api/scenario/event_handlers.py,sha256=rld6gbneARp079ege4IU5J5jefkZtOvgNnlFMi-fm18,4362
109
- epyt_flow/rest_api/scenario/handlers.py,sha256=r355-4wjQGOH0vpDTOOIP9qC8bo_Sm7znir2BgNuweg,13656
103
+ epyt_flow/rest_api/scenario/control_handlers.py,sha256=ouxc54V_yJyoO2yPJEJqcPbZs7CXgM_CWKGj5RvkABQ,4585
104
+ epyt_flow/rest_api/scenario/event_handlers.py,sha256=wgKWFHJPwF4celetSb-_jTlrcicoxDbC7GpZ9uw-BJY,8969
105
+ epyt_flow/rest_api/scenario/handlers.py,sha256=v1V6gsBh2HLtPTnl9_53W13Awo5YjG681Urp24yXelY,14993
110
106
  epyt_flow/rest_api/scenario/simulation_handlers.py,sha256=A59Iv-6k7SlGF_RDQgoFlvHWM1mScvfCobXBW4Rhh6E,6511
111
107
  epyt_flow/rest_api/scenario/uncertainty_handlers.py,sha256=Pdo2YmiawOqKXWcLs2P-lv5qN-OKHS3sDgkAFQeRzK8,4568
112
108
  epyt_flow/simulation/__init__.py,sha256=nihvZ8O2rJjYQkv7JhtVMqNacO5bA38VtS8Y_0BWrVQ,129
113
109
  epyt_flow/simulation/parallel_simulation.py,sha256=ph4KXw9jCt-hiJFJbmC6fNvEsrbQoWV-tFKE5-qSfoQ,6523
114
110
  epyt_flow/simulation/scenario_config.py,sha256=uHHwwzCRwooVdODxDNoCOUgfrlol1K-TS8P8_Ja9Coc,30435
115
- epyt_flow/simulation/scenario_simulator.py,sha256=Byk1X6sVdJRLahjpebxfSdSosmXIOYt8hn2rDQTqUoY,156653
111
+ epyt_flow/simulation/scenario_simulator.py,sha256=qdGGrHGytbSOLtzM8KSOfOyJQ6fbx84R2JF-YEWCAu8,160443
116
112
  epyt_flow/simulation/sensor_config.py,sha256=AGAIC5vqcu2UZsglSCwv2pvZ3E0kbTtdaqtFPEMBwSw,94262
113
+ epyt_flow/simulation/backend/__init__.py,sha256=tkJb2NB_hruTv39sYHAq9ffazyA-UzZzFmiy2nYVTqA,23
114
+ epyt_flow/simulation/backend/my_epyt.py,sha256=edkhDDOZBtYSpaQmnui_opdetebaS9ZzBwngnIpkc3s,32040
117
115
  epyt_flow/simulation/events/__init__.py,sha256=gv8ZcvwjJN0Z5MwRXEOVFRNq4X5NPyyqXIQnhBxszQ0,215
118
116
  epyt_flow/simulation/events/actuator_events.py,sha256=gNOIZL9WNiIhEANi8yEyGxKx4vSMBZiRpiSJ4BbDL60,8171
119
117
  epyt_flow/simulation/events/event.py,sha256=kARPV20XCAl6zxnJwI9U7ICtZUPACO_rgAmtHm1mGCs,2603
120
118
  epyt_flow/simulation/events/leakages.py,sha256=pFSbOiKeGeHPZhLAgo2DFFI1QYImd7m167lMW6B-n-U,17838
121
- epyt_flow/simulation/events/quality_events.py,sha256=y9i1U4xjwsoDZ55vtjl4KeJt5AbYJsfVt7X0Xw0Mq6Y,7965
119
+ epyt_flow/simulation/events/quality_events.py,sha256=b0tClag6ln0eJtEfJ-HTvkD5nn7bjmyS-x_b1bfeqGQ,8053
122
120
  epyt_flow/simulation/events/sensor_faults.py,sha256=XX6k-GJh9RWZ4x54eGj9um-Ir9Eq41tY_9pRSCeYeqc,8447
123
121
  epyt_flow/simulation/events/sensor_reading_attack.py,sha256=2E8q6yWnLxeLgYxW0MHw0GSjlUDjIIZ2GybVRLA7FJQ,7967
124
122
  epyt_flow/simulation/events/sensor_reading_event.py,sha256=OWMRWPsvgMgaynMayJ-hQotP9zV5sDIYrOfY0fOCuvc,7586
125
123
  epyt_flow/simulation/events/system_event.py,sha256=IGypfTL-miosmwKd4DGTYvByyBcl8__0Asiifw-SzUQ,2606
126
124
  epyt_flow/simulation/scada/__init__.py,sha256=pfJhg-tM5DaiZTXs0_1qJsY2R6Py_LwSz6BUFJexfQM,150
127
- epyt_flow/simulation/scada/advanced_control.py,sha256=t0dlEHsnUE0T-du2_5YBYUzMW4a3-Qxw0tT_e9Z9g8Y,4883
128
125
  epyt_flow/simulation/scada/complex_control.py,sha256=p2ehLyScJbj2jbyevXf7T3Ot8jnBYWgRR3Cz-m3boB0,22107
129
126
  epyt_flow/simulation/scada/custom_control.py,sha256=QzkKcn7t53GcTaRofRDbY-HErcDReMF4utWkck6bN60,4681
130
- epyt_flow/simulation/scada/scada_data.py,sha256=jH5jrlbDb_gwSndcLNfjLZj3Kt2YAZVY56klWf5yRp8,194085
127
+ epyt_flow/simulation/scada/scada_data.py,sha256=vzhTUoUIdmqTj9rP2w00q1dAaT90rY5vY2S6Sgo04jg,203434
131
128
  epyt_flow/simulation/scada/scada_data_export.py,sha256=WNAFn_WNfzYAEFbl2Al-cOIx-A0ozY4AI60-i_qEHdc,11643
132
129
  epyt_flow/simulation/scada/simple_control.py,sha256=wUsxsrgqmYxXR93_atcKbV9E-t3hgqj60ZeTvoBBnoQ,12215
133
130
  epyt_flow/uncertainty/__init__.py,sha256=ZRjuJL9rDpWVSdPwObPxFpEmMTcgAl3VmPOsS6cIyGg,89
@@ -136,10 +133,10 @@ epyt_flow/uncertainty/sensor_noise.py,sha256=AYtc6YOfzIfBq3zTBWT5s_A4EFthqfLcpXw
136
133
  epyt_flow/uncertainty/uncertainties.py,sha256=5bZu1Zx8RZ6ESzJSvjtPogNkft3eemTojRsYdi_i1Qo,20495
137
134
  epyt_flow/uncertainty/utils.py,sha256=K-ZhyO6Bg7UmNPgpfND0JLa_wRwyrtUUgGTWyWwy-fo,8029
138
135
  epyt_flow/visualization/__init__.py,sha256=uQ7lO6AsgLc88X48Te3QhBQY-iDKGvdPtxKCl4b-Mfw,70
139
- epyt_flow/visualization/scenario_visualizer.py,sha256=LyruyMIXmQwwdkIZSJ2Q4FO0Z0pLexBaPDRT6ufOuoo,52428
140
- epyt_flow/visualization/visualization_utils.py,sha256=IxzoHkddChuAPAQkLDUJdHY_ntqz7k8ui0qvyPEXKVs,22181
141
- epyt_flow-0.11.0.dist-info/LICENSE,sha256=YRJC2kcAhMlpEeHwUF0lzE-GRXLFyAjXNErI8L5UwYk,1071
142
- epyt_flow-0.11.0.dist-info/METADATA,sha256=J5USrYOxWHhykGuW1EHD8UWKB4j_-ZwY2ZclEMqeLeA,9739
143
- epyt_flow-0.11.0.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
144
- epyt_flow-0.11.0.dist-info/top_level.txt,sha256=Wh_kd7TRL8ownCw3Y3dxx-9C0iTSk6wNauv_NX9JcrY,10
145
- epyt_flow-0.11.0.dist-info/RECORD,,
136
+ epyt_flow/visualization/scenario_visualizer.py,sha256=vkP0J_OfjvePUz_HehXJkH4CGKR3chAHe_UTx4hQ6XI,57860
137
+ epyt_flow/visualization/visualization_utils.py,sha256=l-EQ9UlY9MDBcOhK-uUZ9c-tX9emVqlo4xSqR-Sg17M,27525
138
+ epyt_flow-0.12.0.dist-info/licenses/LICENSE,sha256=YRJC2kcAhMlpEeHwUF0lzE-GRXLFyAjXNErI8L5UwYk,1071
139
+ epyt_flow-0.12.0.dist-info/METADATA,sha256=UDnqvbPrbiLm6Ni2ywj80vXIKx3MWBCeFIJ-c4cKW18,9713
140
+ epyt_flow-0.12.0.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
141
+ epyt_flow-0.12.0.dist-info/top_level.txt,sha256=Wh_kd7TRL8ownCw3Y3dxx-9C0iTSk6wNauv_NX9JcrY,10
142
+ epyt_flow-0.12.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,55 +0,0 @@
1
- """
2
- Module provides functions for registering and creating control environments.
3
- """
4
- import warnings
5
-
6
- from .scenario_control_env import ScenarioControlEnv
7
-
8
-
9
- environments = {}
10
-
11
-
12
- def register(env_name: str, env: ScenarioControlEnv) -> None:
13
- """
14
- Registers a new environment under a given name.
15
-
16
- Parameters
17
- ----------
18
- env_name : `str`
19
- Name of the environment -- must be unique among all environments.
20
- env : :class:`~epyt_flow.gym.scenario_control_env.ScenarioControlEnv`
21
- Environment.
22
- """
23
- warnings.warn("'register()' is deprecated and will be removed in future releases -- " +
24
- "please consider switching to the EPyT-Control package")
25
-
26
- if env_name in environments:
27
- raise ValueError(f"Environment '{env_name}' already exists.")
28
- if not issubclass(env, ScenarioControlEnv):
29
- raise TypeError("'env' must be a subclass of " +
30
- "'epyt_flow.gym.ScenarioControlEnv'")
31
-
32
- environments[env_name] = env
33
-
34
-
35
- def make(env_name: str, **kwds) -> ScenarioControlEnv:
36
- """
37
- Creates an instance of a registered environment.
38
-
39
- Parameters
40
- ----------
41
- env_name : `str`
42
- Name of the environment.
43
-
44
- Returns
45
- -------
46
- :class:`~epyt_flow.gym.scenario_control_env.ScenarioControlEnv`
47
- Environment.
48
- """
49
- warnings.warn("'make()' is deprecated and will be removed in future releases -- " +
50
- "please consider switching to the EPyT-Control package")
51
-
52
- if env_name not in environments:
53
- raise ValueError(f"Unknown environment '{env_name}'.")
54
-
55
- return environments[env_name](**kwds)