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.
Files changed (49) hide show
  1. open_fdd/air_handling_unit/faults/__init__.py +30 -1487
  2. open_fdd/air_handling_unit/faults/fault_condition_eight.py +135 -0
  3. open_fdd/air_handling_unit/faults/fault_condition_eleven.py +108 -0
  4. open_fdd/air_handling_unit/faults/fault_condition_fifteen.py +189 -0
  5. open_fdd/air_handling_unit/faults/fault_condition_five.py +126 -0
  6. open_fdd/air_handling_unit/faults/fault_condition_four.py +128 -0
  7. open_fdd/air_handling_unit/faults/fault_condition_fourteen.py +177 -0
  8. open_fdd/air_handling_unit/faults/fault_condition_nine.py +140 -0
  9. open_fdd/air_handling_unit/faults/fault_condition_one.py +113 -0
  10. open_fdd/air_handling_unit/faults/fault_condition_seven.py +106 -0
  11. open_fdd/air_handling_unit/faults/fault_condition_six.py +228 -0
  12. open_fdd/air_handling_unit/faults/fault_condition_sixteen.py +196 -0
  13. open_fdd/air_handling_unit/faults/fault_condition_ten.py +119 -0
  14. open_fdd/air_handling_unit/faults/fault_condition_thirteen.py +139 -0
  15. open_fdd/air_handling_unit/faults/fault_condition_three.py +112 -0
  16. open_fdd/air_handling_unit/faults/fault_condition_twelve.py +164 -0
  17. open_fdd/air_handling_unit/faults/fault_condition_two.py +112 -0
  18. open_fdd/air_handling_unit/faults/helper_utils.py +29 -19
  19. open_fdd/air_handling_unit/reports/__init__.py +6 -4
  20. open_fdd/air_handling_unit/reports/fault_report.py +3 -2
  21. open_fdd/chiller_plant/faults/__init__.py +6 -2279
  22. open_fdd/chiller_plant/faults/fault_condition_one.py +113 -0
  23. open_fdd/chiller_plant/faults/fault_condition_two.py +100 -0
  24. open_fdd/tests/ahu/test_ahu_fc1.py +2 -2
  25. open_fdd/tests/ahu/test_ahu_fc10.py +1 -0
  26. open_fdd/tests/ahu/test_ahu_fc11.py +3 -4
  27. open_fdd/tests/ahu/test_ahu_fc12.py +3 -4
  28. open_fdd/tests/ahu/test_ahu_fc13.py +3 -4
  29. open_fdd/tests/ahu/test_ahu_fc14.py +3 -4
  30. open_fdd/tests/ahu/test_ahu_fc15.py +3 -4
  31. open_fdd/tests/ahu/test_ahu_fc16.py +4 -3
  32. open_fdd/tests/ahu/test_ahu_fc2.py +1 -0
  33. open_fdd/tests/ahu/test_ahu_fc3.py +1 -0
  34. open_fdd/tests/ahu/test_ahu_fc4.py +3 -1
  35. open_fdd/tests/ahu/test_ahu_fc5.py +1 -0
  36. open_fdd/tests/ahu/test_ahu_fc6.py +1 -0
  37. open_fdd/tests/ahu/test_ahu_fc7.py +1 -0
  38. open_fdd/tests/ahu/test_ahu_fc8.py +1 -0
  39. open_fdd/tests/ahu/test_ahu_fc9.py +1 -0
  40. open_fdd/tests/chiller/test_chiller_fc1.py +2 -2
  41. open_fdd/tests/chiller/test_chiller_fc2.py +2 -2
  42. {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info}/METADATA +4 -3
  43. open_fdd-0.1.9.dist-info/RECORD +52 -0
  44. {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info}/WHEEL +1 -1
  45. open_fdd/air_handling_unit/faults/fault_condition.py +0 -69
  46. open_fdd/air_handling_unit/faults/shared_utils.py +0 -90
  47. open_fdd-0.1.8.dist-info/RECORD +0 -36
  48. {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info/licenses}/LICENSE +0 -0
  49. {open_fdd-0.1.8.dist-info → open_fdd-0.1.9.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,113 @@
1
+ import pandas as pd
2
+
3
+ from open_fdd.core.base_fault import BaseFaultCondition
4
+ from open_fdd.core.components import FaultInputColumn, InstanceAttribute
5
+ from open_fdd.core.mixins import FaultConditionMixin
6
+
7
+ INPUT_COLS = [
8
+ FaultInputColumn(
9
+ name="diff_pressure_col",
10
+ constant_form="DIFF_PRESSURE_COL",
11
+ description="Differential pressure",
12
+ unit="PSI",
13
+ required=True,
14
+ type=str,
15
+ ),
16
+ FaultInputColumn(
17
+ name="pump_speed_col",
18
+ constant_form="PUMP_SPEED_COL",
19
+ description="Pump speed",
20
+ unit="%",
21
+ required=True,
22
+ type=str,
23
+ ),
24
+ FaultInputColumn(
25
+ name="diff_pressure_setpoint_col",
26
+ constant_form="DIFF_PRESSURE_SETPOINT_COL",
27
+ description="Differential pressure setpoint",
28
+ unit="PSI",
29
+ required=True,
30
+ type=str,
31
+ ),
32
+ ]
33
+
34
+ FAULT_PARAMS = [
35
+ InstanceAttribute(
36
+ name="pump_speed_percent_err_thres",
37
+ constant_form="PUMP_SPEED_PERCENT_ERR_THRES",
38
+ description="Pump speed error threshold",
39
+ unit="%",
40
+ type=float,
41
+ range=(0.0, 1.0),
42
+ ),
43
+ InstanceAttribute(
44
+ name="pump_speed_percent_max",
45
+ constant_form="PUMP_SPEED_PERCENT_MAX",
46
+ description="Maximum pump speed percentage",
47
+ unit="%",
48
+ type=float,
49
+ range=(0.0, 1.0),
50
+ ),
51
+ InstanceAttribute(
52
+ name="diff_pressure_psi_err_thres",
53
+ constant_form="DIFF_PRESSURE_PSI_ERR_THRES",
54
+ description="Differential pressure error threshold",
55
+ unit="PSI",
56
+ type=float,
57
+ range=(0.0, 100.0),
58
+ ),
59
+ ]
60
+
61
+
62
+ class FaultConditionOne(BaseFaultCondition, FaultConditionMixin):
63
+ """Class provides the definitions for Fault Condition for pumps.
64
+ Variable pump does not meet differential pressure setpoint.
65
+
66
+ py -3.12 -m pytest open_fdd/tests/chiller/test_chiller_fc1.py -rP -s
67
+ """
68
+
69
+ input_columns = INPUT_COLS
70
+ fault_params = FAULT_PARAMS
71
+ equation_string = (
72
+ "fc_pump_flag = 1 if (DP < DPSP - εDP) and (PUMPSPD >= PUMPSPD_max - εPUMPSPD) "
73
+ "for N consecutive values else 0 \n"
74
+ )
75
+ description_string = (
76
+ "Fault Condition: Differential pressure too low with pump at full speed \n"
77
+ )
78
+ error_string = "One or more required columns are missing or None \n"
79
+
80
+ @FaultConditionMixin._handle_errors
81
+ def apply(self, df: pd.DataFrame) -> pd.DataFrame:
82
+ self._apply_common_checks(df)
83
+
84
+ # Get column values using accessor methods
85
+ diff_pressure_col = self.get_input_column("diff_pressure_col")
86
+ pump_speed_col = self.get_input_column("pump_speed_col")
87
+ diff_pressure_setpoint_col = self.get_input_column("diff_pressure_setpoint_col")
88
+
89
+ # Get parameter values using accessor methods
90
+ pump_speed_percent_max = self.get_param("pump_speed_percent_max")
91
+ pump_speed_percent_err_thres = self.get_param("pump_speed_percent_err_thres")
92
+ diff_pressure_psi_err_thres = self.get_param("diff_pressure_psi_err_thres")
93
+
94
+ # Check analog outputs are floats only
95
+ columns_to_check = [pump_speed_col]
96
+ self._apply_analog_checks(df, columns_to_check)
97
+
98
+ # Perform checks
99
+ pressure_check = (
100
+ df[diff_pressure_col]
101
+ < df[diff_pressure_setpoint_col] - diff_pressure_psi_err_thres
102
+ )
103
+ pump_check = (
104
+ df[pump_speed_col] >= pump_speed_percent_max - pump_speed_percent_err_thres
105
+ )
106
+
107
+ # Combined condition check
108
+ combined_check = pressure_check & pump_check
109
+
110
+ # Set fault flag
111
+ self._set_fault_flag(df, combined_check, "fc_pump_flag")
112
+
113
+ return df
@@ -0,0 +1,100 @@
1
+ import pandas as pd
2
+
3
+ from open_fdd.core.base_fault import BaseFaultCondition
4
+ from open_fdd.core.components import FaultInputColumn, InstanceAttribute
5
+ from open_fdd.core.mixins import FaultConditionMixin
6
+
7
+ INPUT_COLS = [
8
+ FaultInputColumn(
9
+ name="flow_col",
10
+ constant_form="FLOW_COL",
11
+ description="Flow meter reading",
12
+ unit="GPM",
13
+ required=True,
14
+ type=str,
15
+ ),
16
+ FaultInputColumn(
17
+ name="pump_speed_col",
18
+ constant_form="PUMP_SPEED_COL",
19
+ description="Pump speed",
20
+ unit="%",
21
+ required=True,
22
+ type=str,
23
+ ),
24
+ ]
25
+
26
+ FAULT_PARAMS = [
27
+ InstanceAttribute(
28
+ name="flow_error_threshold",
29
+ constant_form="FLOW_ERROR_THRESHOLD",
30
+ description="Flow error threshold",
31
+ unit="GPM",
32
+ type=float,
33
+ range=(0.0, 1000.0),
34
+ ),
35
+ InstanceAttribute(
36
+ name="pump_speed_percent_max",
37
+ constant_form="PUMP_SPEED_PERCENT_MAX",
38
+ description="Maximum pump speed percentage",
39
+ unit="%",
40
+ type=float,
41
+ range=(0.0, 1.0),
42
+ ),
43
+ InstanceAttribute(
44
+ name="pump_speed_percent_err_thres",
45
+ constant_form="PUMP_SPEED_PERCENT_ERR_THRES",
46
+ description="Pump speed error threshold",
47
+ unit="%",
48
+ type=float,
49
+ range=(0.0, 1.0),
50
+ ),
51
+ ]
52
+
53
+
54
+ class FaultConditionTwo(BaseFaultCondition, FaultConditionMixin):
55
+ """
56
+ Class provides the definitions for Fault Condition 2.
57
+ Primary chilled water flow is too high with the chilled water pump running at high speed.
58
+
59
+ py -3.12 -m pytest open_fdd/tests/chiller/test_chiller_fc2.py -rP -s
60
+ """
61
+
62
+ input_columns = INPUT_COLS
63
+ fault_params = FAULT_PARAMS
64
+ equation_string = (
65
+ "fc2_flag = 1 if (FLOW > εFM) and (PUMPSPD >= PUMPSPD_max - εPUMPSPD) "
66
+ "for N consecutive values else 0 \n"
67
+ )
68
+ description_string = "Fault Condition 2: Primary chilled water flow is too high with the pump running at high speed \n"
69
+ error_string = "One or more required columns are missing or None \n"
70
+
71
+ @FaultConditionMixin._handle_errors
72
+ def apply(self, df: pd.DataFrame) -> pd.DataFrame:
73
+ self._apply_common_checks(df)
74
+
75
+ # Get column values using accessor methods
76
+ flow_col = self.get_input_column("flow_col")
77
+ pump_speed_col = self.get_input_column("pump_speed_col")
78
+
79
+ # Get parameter values using accessor methods
80
+ flow_error_threshold = self.get_param("flow_error_threshold")
81
+ pump_speed_percent_max = self.get_param("pump_speed_percent_max")
82
+ pump_speed_percent_err_thres = self.get_param("pump_speed_percent_err_thres")
83
+
84
+ # Check analog outputs are floats only
85
+ columns_to_check = [pump_speed_col]
86
+ self._apply_analog_checks(df, columns_to_check)
87
+
88
+ # Perform checks
89
+ flow_check = df[flow_col] < flow_error_threshold
90
+ pump_check = (
91
+ df[pump_speed_col] >= pump_speed_percent_max - pump_speed_percent_err_thres
92
+ )
93
+
94
+ # Combined condition check
95
+ combined_check = flow_check & pump_check
96
+
97
+ # Set fault flag
98
+ self._set_fault_flag(df, combined_check, "fc2_flag")
99
+
100
+ return df
@@ -1,9 +1,9 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionOne
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
- from open_fdd.air_handling_unit.faults.fault_condition import MissingColumnError
6
-
6
+ from open_fdd.core.exceptions import MissingColumnError
7
7
 
8
8
  # Constants
9
9
  TEST_VFD_ERR_THRESHOLD = 0.05
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionTen
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,10 +1,9 @@
1
1
  import pandas as pd
2
2
  import pytest
3
- from open_fdd.air_handling_unit.faults import (
4
- FaultConditionEleven,
5
- )
6
- from open_fdd.core.exceptions import MissingColumnError
3
+
4
+ from open_fdd.air_handling_unit.faults import FaultConditionEleven
7
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
6
+ from open_fdd.core.exceptions import MissingColumnError
8
7
 
9
8
  """
10
9
  To see print statements in pytest run with:
@@ -1,10 +1,9 @@
1
1
  import pandas as pd
2
2
  import pytest
3
- from open_fdd.air_handling_unit.faults import (
4
- FaultConditionTwelve,
5
- )
6
- from open_fdd.core.exceptions import MissingColumnError
3
+
4
+ from open_fdd.air_handling_unit.faults import FaultConditionTwelve
7
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
6
+ from open_fdd.core.exceptions import MissingColumnError
8
7
 
9
8
  """
10
9
  To see print statements in pytest run with:
@@ -1,10 +1,9 @@
1
1
  import pandas as pd
2
2
  import pytest
3
- from open_fdd.air_handling_unit.faults import (
4
- FaultConditionThirteen,
5
- )
6
- from open_fdd.core.exceptions import MissingColumnError
3
+
4
+ from open_fdd.air_handling_unit.faults import FaultConditionThirteen
7
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
6
+ from open_fdd.core.exceptions import MissingColumnError
8
7
 
9
8
  """
10
9
  To see print statements in pytest run with:
@@ -1,10 +1,9 @@
1
1
  import pandas as pd
2
2
  import pytest
3
- from open_fdd.air_handling_unit.faults import (
4
- FaultConditionFourteen,
5
- )
6
- from open_fdd.core.exceptions import MissingColumnError
3
+
4
+ from open_fdd.air_handling_unit.faults import FaultConditionFourteen
7
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
6
+ from open_fdd.core.exceptions import MissingColumnError
8
7
 
9
8
  """
10
9
  To see print statements in pytest run with:
@@ -1,10 +1,9 @@
1
1
  import pandas as pd
2
2
  import pytest
3
- from open_fdd.air_handling_unit.faults import (
4
- FaultConditionFifteen,
5
- )
6
- from open_fdd.core.exceptions import MissingColumnError
3
+
4
+ from open_fdd.air_handling_unit.faults import FaultConditionFifteen
7
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
6
+ from open_fdd.core.exceptions import MissingColumnError
8
7
 
9
8
  """
10
9
  To see print statements in pytest run with:
@@ -1,8 +1,9 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionSixteen
4
- from open_fdd.core.exceptions import MissingColumnError, InvalidParameterError
5
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
6
+ from open_fdd.core.exceptions import InvalidParameterError, MissingColumnError
6
7
 
7
8
  """
8
9
  To see print statements in pytest run with:
@@ -152,7 +153,7 @@ class TestFaultOnInvalidParams:
152
153
  "SUPPLY_VFD_SPEED_COL": TEST_SUPPLY_VFD_SPEED_COL,
153
154
  }
154
155
  )
155
- assert "should be a float" in str(excinfo.value)
156
+ assert "should be of type float" in str(excinfo.value)
156
157
 
157
158
  def test_invalid_efficiency_value(self):
158
159
  """Test that InvalidParameterError is raised if efficiency values are out of 0.0 - 1.0 range."""
@@ -173,7 +174,7 @@ class TestFaultOnInvalidParams:
173
174
  "SUPPLY_VFD_SPEED_COL": TEST_SUPPLY_VFD_SPEED_COL,
174
175
  }
175
176
  )
176
- assert "should be a float between 0.0 and 1.0" in str(excinfo.value)
177
+ assert "should be between 0.0 and 1.0" in str(excinfo.value)
177
178
 
178
179
 
179
180
  class TestFaultOnMissingColumns:
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionTwo
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionThree
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,8 +1,10 @@
1
+ from datetime import datetime, timezone
2
+
1
3
  import pandas as pd
2
4
  import pytest
5
+
3
6
  from open_fdd.air_handling_unit.faults import FaultConditionFour
4
7
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
- from datetime import datetime, timezone
6
8
 
7
9
  """
8
10
  To see print statements in pytest run with:
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionFive
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionSix
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionSeven
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionEight
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,5 +1,6 @@
1
1
  import pandas as pd
2
2
  import pytest
3
+
3
4
  from open_fdd.air_handling_unit.faults import FaultConditionNine
4
5
  from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
5
6
 
@@ -1,8 +1,8 @@
1
1
  import pandas as pd
2
2
  import pytest
3
- from open_fdd.chiller_plant.faults import FaultConditionOne
4
- from open_fdd.air_handling_unit.faults.fault_condition import MissingColumnError
5
3
 
4
+ from open_fdd.chiller_plant.faults import FaultConditionOne
5
+ from open_fdd.core.exceptions import MissingColumnError
6
6
 
7
7
  # Constants for test cases
8
8
  TEST_PUMP_ERR_THRESHOLD = 0.05
@@ -1,8 +1,8 @@
1
1
  import pandas as pd
2
2
  import pytest
3
- from open_fdd.chiller_plant.faults import FaultConditionTwo
4
- from open_fdd.air_handling_unit.faults.fault_condition import MissingColumnError
5
3
 
4
+ from open_fdd.chiller_plant.faults import FaultConditionTwo
5
+ from open_fdd.core.exceptions import MissingColumnError
6
6
 
7
7
  # Constants for test cases
8
8
  TEST_FLOW_ERR_THRESHOLD = 10.0 # Error threshold for flow in GPM
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: open_fdd
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: A package for fault detection and diagnosis in HVAC systems
5
5
  Home-page: https://bbartling.github.io/open-fdd/
6
6
  Author: Ben Bartling
@@ -20,6 +20,7 @@ Dynamic: classifier
20
20
  Dynamic: description
21
21
  Dynamic: description-content-type
22
22
  Dynamic: home-page
23
+ Dynamic: license-file
23
24
  Dynamic: requires-dist
24
25
  Dynamic: requires-python
25
26
  Dynamic: summary
@@ -127,7 +128,7 @@ py -3.12 -m black .
127
128
 
128
129
  【MIT License】
129
130
 
130
- Copyright 2024 Ben Bartling
131
+ Copyright 2025 Ben Bartling
131
132
 
132
133
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
133
134
 
@@ -0,0 +1,52 @@
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=y4XUyFDNZthjhN37AWcKA8gowmi2Fm6zThI-IxYKFEU,1577
4
+ open_fdd/air_handling_unit/faults/fault_condition_eight.py,sha256=XNqWA0q-ogY9QwMHzLpDYxOobeDD13Ij7-s5vDh5PSU,4525
5
+ open_fdd/air_handling_unit/faults/fault_condition_eleven.py,sha256=cKhm6lKpRouWpof_ibVC9zywW9Tpq7ncJEeZcHEsb5U,3607
6
+ open_fdd/air_handling_unit/faults/fault_condition_fifteen.py,sha256=UtqZYUy57VEW6trUVER4r9sEyxnbIq8Ttufj0aUKWIY,6952
7
+ open_fdd/air_handling_unit/faults/fault_condition_five.py,sha256=sQFBpvvvNSQasCKJ9epqGSXk16btjjzRJitwEC8Os_Y,4245
8
+ open_fdd/air_handling_unit/faults/fault_condition_four.py,sha256=IRJH17I1_QkOEYwUmSsI5HtYp7_YXiaDxbcGud-5WJo,4547
9
+ open_fdd/air_handling_unit/faults/fault_condition_fourteen.py,sha256=FaSNp2dBHPD6T6um2RrqFj8Di7oK3surzFPyjzfQ6f8,6320
10
+ open_fdd/air_handling_unit/faults/fault_condition_nine.py,sha256=n0uB9JySxF6ga7QbiUnKiYbR2j7bFDLykM6LVgUTL_s,4708
11
+ open_fdd/air_handling_unit/faults/fault_condition_one.py,sha256=5SAu1MXzX3cVW9zyFH8wgRxXMnXBo_y9exuKfYkIuz8,3981
12
+ open_fdd/air_handling_unit/faults/fault_condition_seven.py,sha256=6gWEZhal0bWz0VppOzUOpl55_25qVEEkj75lWT9ImBM,3518
13
+ open_fdd/air_handling_unit/faults/fault_condition_six.py,sha256=-nIFl4BtV_AMfx4FI25cnxo5dukE6YXvlowVs7oxJcQ,7971
14
+ open_fdd/air_handling_unit/faults/fault_condition_sixteen.py,sha256=DutgmWyz3AMlF39G7ivIpL3tFV75QkvRs2FndW5n464,7231
15
+ open_fdd/air_handling_unit/faults/fault_condition_ten.py,sha256=TP9-bsiGUGyeNYYS1MQE3Lw7gDCssG2Um2-osKZNcAE,3999
16
+ open_fdd/air_handling_unit/faults/fault_condition_thirteen.py,sha256=CNteakiAxaDMFQynys9MK2pEokIlUJQhMI4StwBA4Gs,4841
17
+ open_fdd/air_handling_unit/faults/fault_condition_three.py,sha256=BiSQSlMqr8AI9IL06jdQsKyyjxDgTm7WmpPc1KtEDRw,3719
18
+ open_fdd/air_handling_unit/faults/fault_condition_twelve.py,sha256=snE1toPvqH9TDbT0Y54m8Dnji19a7s8erzFYTw5S40I,5684
19
+ open_fdd/air_handling_unit/faults/fault_condition_two.py,sha256=nPtrhex23TMI88AbGtzbUOq-wrY-qm9u1O4X8sGOXLo,3715
20
+ open_fdd/air_handling_unit/faults/helper_utils.py,sha256=4w_t9BvfbvNn-fip0zH3r3350W9oQIvDq_LdtY7W9uI,12732
21
+ open_fdd/air_handling_unit/reports/__init__.py,sha256=Stg1NcWYbNoV8Osk9-vUAiAfw5dJFUEWm2RuBTXeIWY,40745
22
+ open_fdd/air_handling_unit/reports/fault_report.py,sha256=lQ1RvhH_b--mT9VzWK6HESEsOmhlPF0sfVn6W7Ue_-8,1444
23
+ open_fdd/chiller_plant/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ open_fdd/chiller_plant/faults/__init__.py,sha256=b-nH3L0ijb2SY7TqRT_DCVEGn3TmF-WvaxemHjbAGsg,232
25
+ open_fdd/chiller_plant/faults/fault_condition_one.py,sha256=jwSmO4lKpXw7wnN6rEbdcICfv82ujqjErKneqMmGWCw,3784
26
+ open_fdd/chiller_plant/faults/fault_condition_two.py,sha256=IrsxFyPubOXJwPFFUQMEITcurAl7pLKakmP8lRBrRhM,3288
27
+ open_fdd/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ open_fdd/tests/ahu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ open_fdd/tests/ahu/test_ahu_fc1.py,sha256=_zNavzKHam7kqxKT3tn0IxK0ofzP2RjPDWtgr_eU3-w,5414
30
+ open_fdd/tests/ahu/test_ahu_fc10.py,sha256=f1V2I5Ul9xyhhmQstdiFEO1AlIDsa_Y4HENRMNanyHM,4579
31
+ open_fdd/tests/ahu/test_ahu_fc11.py,sha256=TIhvGVUJGGjQSW7PRdffRyL2sL9bJhLkDMCFt3UVHEc,4143
32
+ open_fdd/tests/ahu/test_ahu_fc12.py,sha256=Wn1rxqSxy6aNBTfUaHi9Q7mr3gLLEirLKw6XVREbwOc,7197
33
+ open_fdd/tests/ahu/test_ahu_fc13.py,sha256=U-BG6trhK-xmqoU9DzvCCiUd1jqgKAffaO-oq7xVTUw,6055
34
+ open_fdd/tests/ahu/test_ahu_fc14.py,sha256=GpH2ftTlh9YHktFuRaMmWRNjktGd8h2fVogbJjdumSg,8400
35
+ open_fdd/tests/ahu/test_ahu_fc15.py,sha256=eL3nYiBD3gp3SXsiKAsAUGOT9GVnNm_gJ0pFdz6Faws,8149
36
+ open_fdd/tests/ahu/test_ahu_fc16.py,sha256=z873OSK0TyKbq2XkhKw4uAdBZ5d4BaFd5qD0iVppMTY,9451
37
+ open_fdd/tests/ahu/test_ahu_fc2.py,sha256=hpenWlBmfQSaGCh06iUbg4otmbG0w4COZ4FtVuohgP0,4738
38
+ open_fdd/tests/ahu/test_ahu_fc3.py,sha256=rdW7Omd6mDaUfDauxfXiWa5k0suTtDp8hcruQulsHPk,4660
39
+ open_fdd/tests/ahu/test_ahu_fc4.py,sha256=7CBkJMStdnIGWoeHnR1uSiRZ2bOEn2QuYwK_xxcM75I,6308
40
+ open_fdd/tests/ahu/test_ahu_fc5.py,sha256=mQLDP_1QqnkFx5Dy08iU9h_zMhsF5JEFJX0-JL1MDQc,6540
41
+ open_fdd/tests/ahu/test_ahu_fc6.py,sha256=JtcLEKWUD9nnYNbVtpf-qzayIdL9e4QVwRmtIsY8GBQ,10353
42
+ open_fdd/tests/ahu/test_ahu_fc7.py,sha256=iGyBtHhOuL-1ldNTzXbXESL39YHPF_DW3XZ65IEk1q4,2471
43
+ open_fdd/tests/ahu/test_ahu_fc8.py,sha256=f_DI_7gne81uVzZO0URG5J1sOE1Np2AidYKhdWmRvSE,4665
44
+ open_fdd/tests/ahu/test_ahu_fc9.py,sha256=8ELH0XUcsQqqNjW94C0r4Q6EYldYgNqjWl8QyLhev74,4798
45
+ open_fdd/tests/chiller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
+ open_fdd/tests/chiller/test_chiller_fc1.py,sha256=MTggFcfLUCvMQ_vc_sVAWv-VRqscg1mAcWDHmyBM_QM,3705
47
+ open_fdd/tests/chiller/test_chiller_fc2.py,sha256=rWVRrFSZ_wHh-KsDdNeNgs5MTdB-di_UayfhgZ6HcYc,3019
48
+ open_fdd-0.1.9.dist-info/licenses/LICENSE,sha256=eghao_GGx_0gB2Sll3x2vV29knONEzUQKrkaXpX1F7w,1087
49
+ open_fdd-0.1.9.dist-info/METADATA,sha256=di_1orLR5AEe1T5HDyqpQ7FHYOs_iS62Ne-07aKounU,5636
50
+ open_fdd-0.1.9.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
51
+ open_fdd-0.1.9.dist-info/top_level.txt,sha256=Q7sB6UB2d8Ch1v_xIsTiNegmgcCXPkwkrxK3ug6VEOs,9
52
+ open_fdd-0.1.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.1.0)
2
+ Generator: setuptools (78.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,69 +0,0 @@
1
- import pandas as pd
2
- import pandas.api.types as pdtypes
3
- from open_fdd.air_handling_unit.faults.helper_utils import HelperUtils
4
- import sys
5
-
6
- """see __init__.py for fault classes"""
7
-
8
-
9
- class MissingColumnError(Exception):
10
- """Custom exception raised when a required column is missing or None."""
11
-
12
- def __init__(self, message):
13
- self.message = message
14
- super().__init__(self.message)
15
-
16
-
17
- class InvalidParameterError(Exception):
18
- """Custom exception raised when a parameter is not valid (e.g., not a float)."""
19
-
20
- def __init__(self, message):
21
- self.message = message
22
- super().__init__(self.message)
23
-
24
-
25
- class FaultCondition:
26
- """Parent class for Fault Conditions. Methods are inherited to all children."""
27
-
28
- def __init__(self):
29
- self.required_columns = []
30
-
31
- def set_attributes(self, dict_):
32
- """Passes dictionary into initialization of class instance"""
33
- for attribute in self.__dict__.keys():
34
- upper = attribute.upper()
35
- if upper in dict_:
36
- value = dict_[upper]
37
- self.__setattr__(attribute, value)
38
-
39
- def check_required_columns(self, df: pd.DataFrame):
40
- """Checks if required columns are present in the DataFrame."""
41
- missing_columns = [
42
- col for col in self.required_columns if col is None or col not in df.columns
43
- ]
44
-
45
- if missing_columns:
46
- raise MissingColumnError(f"Missing required columns: {missing_columns}")
47
-
48
- def troubleshoot_cols(self, df):
49
- """Print troubleshoot columns mapping."""
50
- print("Troubleshoot mode enabled - not removing helper columns")
51
- for col in df.columns:
52
- print(
53
- "df column: ",
54
- col,
55
- "- max: ",
56
- df[col].max(),
57
- "- col type: ",
58
- df[col].dtypes,
59
- )
60
- sys.stdout.flush()
61
-
62
- def check_analog_pct(self, df, columns):
63
- """Check analog outputs [data with units of %] are floats only."""
64
- helper = HelperUtils()
65
- for col in columns:
66
- if not pdtypes.is_float_dtype(df[col]):
67
- df = helper.convert_to_float(df, col)
68
- if df[col].max() > 1.0:
69
- raise TypeError(helper.float_max_check_err(col))