epyt-flow 0.7.3__py3-none-any.whl → 0.8.1__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.
- epyt_flow/VERSION +1 -1
- epyt_flow/data/benchmarks/leakdb.py +2 -2
- epyt_flow/data/networks.py +14 -26
- epyt_flow/gym/scenario_control_env.py +129 -10
- epyt_flow/serialization.py +10 -3
- epyt_flow/simulation/events/__init__.py +1 -0
- epyt_flow/simulation/events/leakages.py +55 -12
- epyt_flow/simulation/events/quality_events.py +194 -0
- epyt_flow/simulation/events/system_event.py +5 -0
- epyt_flow/simulation/scada/scada_data.py +512 -64
- epyt_flow/simulation/scada/scada_data_export.py +7 -5
- epyt_flow/simulation/scenario_config.py +13 -2
- epyt_flow/simulation/scenario_simulator.py +275 -187
- epyt_flow/simulation/scenario_visualizer.py +1259 -13
- {epyt_flow-0.7.3.dist-info → epyt_flow-0.8.1.dist-info}/METADATA +31 -30
- {epyt_flow-0.7.3.dist-info → epyt_flow-0.8.1.dist-info}/RECORD +19 -18
- {epyt_flow-0.7.3.dist-info → epyt_flow-0.8.1.dist-info}/WHEEL +1 -1
- {epyt_flow-0.7.3.dist-info → epyt_flow-0.8.1.dist-info}/LICENSE +0 -0
- {epyt_flow-0.7.3.dist-info → epyt_flow-0.8.1.dist-info}/top_level.txt +0 -0
|
@@ -58,7 +58,8 @@ class ScadaDataExport():
|
|
|
58
58
|
"""
|
|
59
59
|
return self.__export_raw_data
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
@staticmethod
|
|
62
|
+
def create_global_sensor_config(scada_data: ScadaData) -> SensorConfig:
|
|
62
63
|
"""
|
|
63
64
|
Creates a global sensor configuration with sensors placed everywhere.
|
|
64
65
|
|
|
@@ -89,7 +90,8 @@ class ScadaDataExport():
|
|
|
89
90
|
|
|
90
91
|
return sensor_config
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
@staticmethod
|
|
94
|
+
def create_column_desc(scada_data: ScadaData) -> np.ndarray:
|
|
93
95
|
"""
|
|
94
96
|
Creates column descriptions -- i.e. sensor type and location for each column
|
|
95
97
|
|
|
@@ -101,9 +103,9 @@ class ScadaDataExport():
|
|
|
101
103
|
Returns
|
|
102
104
|
-------
|
|
103
105
|
`numpy.ndarray`
|
|
104
|
-
|
|
105
|
-
The first dimension describes the sensor type,
|
|
106
|
-
describes the sensor location.
|
|
106
|
+
3-dimensional array describing all columns of the sensor readings:
|
|
107
|
+
The first dimension describes the sensor type, the second dimension
|
|
108
|
+
describes the sensor location, and the third one describes the measurement units.
|
|
107
109
|
"""
|
|
108
110
|
sensor_readings = scada_data.get_data()
|
|
109
111
|
|
|
@@ -6,6 +6,7 @@ from copy import deepcopy
|
|
|
6
6
|
import os
|
|
7
7
|
import json
|
|
8
8
|
import numpy as np
|
|
9
|
+
from pathlib import Path
|
|
9
10
|
|
|
10
11
|
from ..uncertainty import AbsoluteGaussianUncertainty, RelativeGaussianUncertainty, \
|
|
11
12
|
AbsoluteUniformUncertainty, RelativeUniformUncertainty, ModelUncertainty, \
|
|
@@ -220,7 +221,12 @@ class ScenarioConfig(Serializable):
|
|
|
220
221
|
`str`
|
|
221
222
|
Path to the .inp file.
|
|
222
223
|
"""
|
|
223
|
-
|
|
224
|
+
if Path(self.__f_inp_in).is_absolute():
|
|
225
|
+
return self.__f_inp_in
|
|
226
|
+
elif Path(self.__f_inp_in).name == self.__f_inp_in:
|
|
227
|
+
return os.path.join(self._parent_path, self.__f_inp_in)
|
|
228
|
+
else:
|
|
229
|
+
return self.__f_inp_in
|
|
224
230
|
|
|
225
231
|
@property
|
|
226
232
|
def f_msx_in(self) -> str:
|
|
@@ -235,7 +241,12 @@ class ScenarioConfig(Serializable):
|
|
|
235
241
|
if self.__f_msx_in is None:
|
|
236
242
|
return None
|
|
237
243
|
else:
|
|
238
|
-
|
|
244
|
+
if Path(self.__f_msx_in).is_absolute():
|
|
245
|
+
return self.__f_msx_in
|
|
246
|
+
elif Path(self.__f_msx_in).name == self.__f_msx_in:
|
|
247
|
+
return os.path.join(self._parent_path, self.__f_msx_in)
|
|
248
|
+
else:
|
|
249
|
+
return self.__f_msx_in
|
|
239
250
|
|
|
240
251
|
@property
|
|
241
252
|
def general_params(self) -> dict:
|