open-fdd 0.1.8__py3-none-any.whl → 0.1.9__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.
- open_fdd/air_handling_unit/faults/__init__.py +30 -1487
- open_fdd/air_handling_unit/faults/fault_condition_eight.py +135 -0
- open_fdd/air_handling_unit/faults/fault_condition_eleven.py +108 -0
- open_fdd/air_handling_unit/faults/fault_condition_fifteen.py +189 -0
- open_fdd/air_handling_unit/faults/fault_condition_five.py +126 -0
- open_fdd/air_handling_unit/faults/fault_condition_four.py +128 -0
- open_fdd/air_handling_unit/faults/fault_condition_fourteen.py +177 -0
- open_fdd/air_handling_unit/faults/fault_condition_nine.py +140 -0
- open_fdd/air_handling_unit/faults/fault_condition_one.py +113 -0
- open_fdd/air_handling_unit/faults/fault_condition_seven.py +106 -0
- open_fdd/air_handling_unit/faults/fault_condition_six.py +228 -0
- open_fdd/air_handling_unit/faults/fault_condition_sixteen.py +196 -0
- open_fdd/air_handling_unit/faults/fault_condition_ten.py +119 -0
- open_fdd/air_handling_unit/faults/fault_condition_thirteen.py +139 -0
- open_fdd/air_handling_unit/faults/fault_condition_three.py +112 -0
- open_fdd/air_handling_unit/faults/fault_condition_twelve.py +164 -0
- open_fdd/air_handling_unit/faults/fault_condition_two.py +112 -0
- open_fdd/air_handling_unit/faults/helper_utils.py +29 -19
- open_fdd/air_handling_unit/reports/__init__.py +6 -4
- open_fdd/air_handling_unit/reports/fault_report.py +3 -2
- open_fdd/chiller_plant/faults/__init__.py +6 -2279
- open_fdd/chiller_plant/faults/fault_condition_one.py +113 -0
- open_fdd/chiller_plant/faults/fault_condition_two.py +100 -0
- open_fdd/tests/ahu/test_ahu_fc1.py +2 -2
- open_fdd/tests/ahu/test_ahu_fc10.py +1 -0
- open_fdd/tests/ahu/test_ahu_fc11.py +3 -4
- open_fdd/tests/ahu/test_ahu_fc12.py +3 -4
- open_fdd/tests/ahu/test_ahu_fc13.py +3 -4
- open_fdd/tests/ahu/test_ahu_fc14.py +3 -4
- open_fdd/tests/ahu/test_ahu_fc15.py +3 -4
- open_fdd/tests/ahu/test_ahu_fc16.py +4 -3
- open_fdd/tests/ahu/test_ahu_fc2.py +1 -0
- open_fdd/tests/ahu/test_ahu_fc3.py +1 -0
- open_fdd/tests/ahu/test_ahu_fc4.py +3 -1
- open_fdd/tests/ahu/test_ahu_fc5.py +1 -0
- open_fdd/tests/ahu/test_ahu_fc6.py +1 -0
- open_fdd/tests/ahu/test_ahu_fc7.py +1 -0
- open_fdd/tests/ahu/test_ahu_fc8.py +1 -0
- open_fdd/tests/ahu/test_ahu_fc9.py +1 -0
- open_fdd/tests/chiller/test_chiller_fc1.py +2 -2
- open_fdd/tests/chiller/test_chiller_fc2.py +2 -2
- {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info}/METADATA +4 -3
- open_fdd-0.1.9.dist-info/RECORD +52 -0
- {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info}/WHEEL +1 -1
- open_fdd/air_handling_unit/faults/fault_condition.py +0 -69
- open_fdd/air_handling_unit/faults/shared_utils.py +0 -90
- open_fdd-0.1.8.dist-info/RECORD +0 -36
- {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info/licenses}/LICENSE +0 -0
- {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info}/top_level.txt +0 -0
@@ -1,90 +0,0 @@
|
|
1
|
-
import pandas as pd
|
2
|
-
import pandas.api.types as pdtypes
|
3
|
-
import sys
|
4
|
-
|
5
|
-
|
6
|
-
class SharedUtils:
|
7
|
-
@staticmethod
|
8
|
-
def float_int_check_err(col):
|
9
|
-
err_str = " column failed with a check that the data is a float"
|
10
|
-
return str(col) + err_str
|
11
|
-
|
12
|
-
@staticmethod
|
13
|
-
def float_max_check_err(col):
|
14
|
-
err_str = (
|
15
|
-
" column failed with a check that the data is a float between 0.0 and 1.0"
|
16
|
-
)
|
17
|
-
return str(col) + err_str
|
18
|
-
|
19
|
-
@staticmethod
|
20
|
-
def isfloat(num):
|
21
|
-
try:
|
22
|
-
float(num)
|
23
|
-
return True
|
24
|
-
except:
|
25
|
-
return False
|
26
|
-
|
27
|
-
@staticmethod
|
28
|
-
def isLessThanOnePointOne(num):
|
29
|
-
try:
|
30
|
-
if num <= 1.0:
|
31
|
-
return True
|
32
|
-
except:
|
33
|
-
return False
|
34
|
-
|
35
|
-
@staticmethod
|
36
|
-
def convert_to_float(df, col):
|
37
|
-
if not pdtypes.is_float_dtype(df[col]):
|
38
|
-
try:
|
39
|
-
df[col] = df[col].astype(float)
|
40
|
-
except ValueError:
|
41
|
-
raise TypeError(SharedUtils.float_int_check_err(col))
|
42
|
-
return df
|
43
|
-
|
44
|
-
@staticmethod
|
45
|
-
def apply_rolling_average_if_needed(df, freq="1min", rolling_window="5min"):
|
46
|
-
"""Apply rolling average if time difference between consecutive
|
47
|
-
timestamps is not greater than the specified frequency.
|
48
|
-
"""
|
49
|
-
|
50
|
-
print(
|
51
|
-
"Warning: If data has a one minute or less sampling \n"
|
52
|
-
"frequency a rolling average will be automatically applied"
|
53
|
-
)
|
54
|
-
|
55
|
-
sys.stdout.flush()
|
56
|
-
|
57
|
-
time_diff = df.index.to_series().diff().iloc[1:]
|
58
|
-
|
59
|
-
# Calculate median time difference to avoid being affected by outliers
|
60
|
-
median_diff = time_diff.median()
|
61
|
-
|
62
|
-
print(
|
63
|
-
f"Warning: Median time difference between consecutive timestamps is {median_diff}."
|
64
|
-
)
|
65
|
-
sys.stdout.flush()
|
66
|
-
|
67
|
-
if median_diff > pd.Timedelta(freq):
|
68
|
-
print(f"Warning: Skipping any rolling averaging...")
|
69
|
-
sys.stdout.flush()
|
70
|
-
|
71
|
-
else:
|
72
|
-
df = df.rolling(rolling_window).mean()
|
73
|
-
print(
|
74
|
-
f"Warning: A {rolling_window} rolling average has been applied to the data."
|
75
|
-
)
|
76
|
-
sys.stdout.flush()
|
77
|
-
return df
|
78
|
-
|
79
|
-
@staticmethod
|
80
|
-
def clean_nan_values(df: pd.DataFrame) -> pd.DataFrame:
|
81
|
-
for col in df.columns:
|
82
|
-
if df[col].isnull().any():
|
83
|
-
print(f"NaN values found in column: {col}")
|
84
|
-
|
85
|
-
# Remove rows with any NaN values, then forward and backfill
|
86
|
-
df = df.dropna().ffill().bfill()
|
87
|
-
print("DataFrame has been cleaned for NaNs")
|
88
|
-
print("and has also been forward and backfilled.")
|
89
|
-
sys.stdout.flush()
|
90
|
-
return df
|
open_fdd-0.1.8.dist-info/RECORD
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
open_fdd/__init__.py,sha256=iGj8QTOZJUTE4nNnBiCHXEXsOdV6YvKcGiLrnOusJCg,1411
|
2
|
-
open_fdd/air_handling_unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
open_fdd/air_handling_unit/faults/__init__.py,sha256=rJwnOYO0Ix0mPXg4KEghC3vvNTDnBiRwS-myEa8-bgI,64124
|
4
|
-
open_fdd/air_handling_unit/faults/fault_condition.py,sha256=UN2_k2AZWMDoO4oPAnJW3fvhkHlMkLXZikzU2lXAOuQ,2364
|
5
|
-
open_fdd/air_handling_unit/faults/helper_utils.py,sha256=el_s2BC9Q14GXUGnazOiBBhzVUMsPBP9sxEG1UIQ6Gw,12668
|
6
|
-
open_fdd/air_handling_unit/faults/shared_utils.py,sha256=rAx27IsG_7OEHLLFHool6o9LAuaMyYisit9gLu8ZVQk,2802
|
7
|
-
open_fdd/air_handling_unit/reports/__init__.py,sha256=JccL19Spj6vE0Jo_57CmZEFucu4WbCPj1-pIwR5LmPg,40741
|
8
|
-
open_fdd/air_handling_unit/reports/fault_report.py,sha256=QxYLJzoLTwf1N0nls2XMmhHJvBSgGCBNT0KxA59QG4Y,1442
|
9
|
-
open_fdd/chiller_plant/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
open_fdd/chiller_plant/faults/__init__.py,sha256=RVoyleGYpMOg_pkwyaHCNuiMRVvvPnGvAYLFMr-jAWY,92796
|
11
|
-
open_fdd/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
-
open_fdd/tests/ahu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
|
-
open_fdd/tests/ahu/test_ahu_fc1.py,sha256=Pw5XlQ19c5Sit0Lyuor8L8lKgxl5PFn4UhruIHyKDfc,5439
|
14
|
-
open_fdd/tests/ahu/test_ahu_fc10.py,sha256=niYL7fi6OlgP0wnF8hNh9A07PLzHiRZkyRkrA1zoL2s,4577
|
15
|
-
open_fdd/tests/ahu/test_ahu_fc11.py,sha256=HrqfRCEbhRSGGpa4_ote0iGIsZXcAf2ppm5KcQXvYrc,4152
|
16
|
-
open_fdd/tests/ahu/test_ahu_fc12.py,sha256=7SUcF3bdIxxLfd8TeOQOYgtwc0IGzKhtZA6dBh9Il4s,7206
|
17
|
-
open_fdd/tests/ahu/test_ahu_fc13.py,sha256=mN0XMOrsnxd-iR5A0euPZHTmkv8sDQEz0FANKPdd_r0,6064
|
18
|
-
open_fdd/tests/ahu/test_ahu_fc14.py,sha256=49A20E8vVt2TZQbaAHorqhuQtlh6rqkWiP46AdXJWKc,8409
|
19
|
-
open_fdd/tests/ahu/test_ahu_fc15.py,sha256=CFZEg9g791SEl9VdZ_eG-CPok9yRVMzJVkcWWe1HBRM,8158
|
20
|
-
open_fdd/tests/ahu/test_ahu_fc16.py,sha256=htGlPAnnbzrHWBZ_6YY85gns5R2Zdw4HubTqDX-gJlY,9451
|
21
|
-
open_fdd/tests/ahu/test_ahu_fc2.py,sha256=CjmO_WUyaSHs17ifCCew3GBJ43nYG55uGL0vHDZpAq8,4736
|
22
|
-
open_fdd/tests/ahu/test_ahu_fc3.py,sha256=NB6pOXDS-R4P0LNoRN8ItAqhhLnGnGuAHZha32Qw-hE,4658
|
23
|
-
open_fdd/tests/ahu/test_ahu_fc4.py,sha256=vV8jEnFuNGLfhCoTVz29RsIcoDpDOMWg722G0aBEXaE,6304
|
24
|
-
open_fdd/tests/ahu/test_ahu_fc5.py,sha256=TpSQTBIF591Q3mVaBeJ6HyqPWhVHmD_gSZNEIFT6yyg,6538
|
25
|
-
open_fdd/tests/ahu/test_ahu_fc6.py,sha256=66dwv0EBU_ujZK-J9Ki5a3fnXlk17nOwmtKDiQOHdbM,10351
|
26
|
-
open_fdd/tests/ahu/test_ahu_fc7.py,sha256=sABbw2m7WlAXbsqfDD323vfEfg606ThI0QzQyB-OjFo,2469
|
27
|
-
open_fdd/tests/ahu/test_ahu_fc8.py,sha256=UZy6BP2PgV1FROUPqMORTx8YnT5ZvqVDhut_Ar81494,4663
|
28
|
-
open_fdd/tests/ahu/test_ahu_fc9.py,sha256=b-eIzhNzjZUjVNsP0JAHkOgZu-BtDuPeNnblVVm-jU8,4796
|
29
|
-
open_fdd/tests/chiller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
-
open_fdd/tests/chiller/test_chiller_fc1.py,sha256=VSSpEHVLGtozixQy6IVm4TbdOBcvYOPZ1b5mb6WpEy4,3730
|
31
|
-
open_fdd/tests/chiller/test_chiller_fc2.py,sha256=vs_XA2RFskbEGbM5VuoG86UmghnKhvwY3d02hQlT4mA,3044
|
32
|
-
open_fdd-0.1.8.dist-info/LICENSE,sha256=eghao_GGx_0gB2Sll3x2vV29knONEzUQKrkaXpX1F7w,1087
|
33
|
-
open_fdd-0.1.8.dist-info/METADATA,sha256=GzfmmY4xwDzfLc9GfnV3n_AUJAGZCjZ3rtMwlF9jEj8,5613
|
34
|
-
open_fdd-0.1.8.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
35
|
-
open_fdd-0.1.8.dist-info/top_level.txt,sha256=Q7sB6UB2d8Ch1v_xIsTiNegmgcCXPkwkrxK3ug6VEOs,9
|
36
|
-
open_fdd-0.1.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|