Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions constrain/library/vav_turndown_during_reheat.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def verify(self):
self.df["V_dot_VAV_max"] > 0
).all(), "Not all `V_dot_VAV_max` values are greater than 0"

# Check if the `reheat_coil_flag` column has only False values
if (self.df["reheat_coil_flag"] == False).all():
# Check if the `reheat_coil_flag` column has only True/False values
if self.df["reheat_coil_flag"].nunique() == 1:
Comment thread
leijerry888 marked this conversation as resolved.
self.df["result"] = "Untested"
else:
self.df["V_dot_VAV_ratio"] = self.df["V_dot_VAV"] / self.df["V_dot_VAV_max"]
Expand Down
39 changes: 38 additions & 1 deletion tests/test_vav_turndown_during_reheat.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_vav_turndown_during_reheat_fail(self):
binary_result = verification_obj.check_bool()
self.assertFalse(binary_result)

def test_vav_turndown_during_reheat_untested(self):
def test_vav_turndown_during_reheat_no_reheat_untested(self):
points = [
"reheat_coil_flag",
"V_dot_VAV",
Expand Down Expand Up @@ -127,3 +127,40 @@ def test_vav_turndown_during_reheat_untested(self):

self.assertEqual(results, expected_results)
self.assertEqual(verification_obj.check_bool(), "Untested")

def test_vav_turndown_during_reheat_all_reheat_untested(self):
points = [
"reheat_coil_flag",
"V_dot_VAV",
"V_dot_VAV_max",
]

timestamp = [
datetime(2024, 8, 1, 12, 0, 0),
datetime(2024, 8, 1, 13, 0, 0),
datetime(2024, 8, 1, 14, 0, 0),
datetime(2024, 8, 1, 15, 0, 0),
]

data = [
[True, 350, 620],
[True, 370, 620],
[True, 360, 620],
[True, 380, 620],
]

df = pd.DataFrame(data, columns=points, index=timestamp)

verification_obj = run_test_verification_with_data(
"VAVTurndownDuringReheat", df
)
results = list(verification_obj.result)
expected_results = [
"Untested",
"Untested",
"Untested",
"Untested",
]

self.assertEqual(results, expected_results)
self.assertEqual(verification_obj.check_bool(), "Untested")