From 4c946e7998f728224312c10c20273f3ccd4d42ab Mon Sep 17 00:00:00 2001
From: j-c-cook
Date: Sun, 12 Mar 2023 17:29:18 -0500
Subject: [PATCH] Adjust placement of loads
---
ghedt/peak_load_analysis_tool/ground_loads.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ghedt/peak_load_analysis_tool/ground_loads.py b/ghedt/peak_load_analysis_tool/ground_loads.py
index b66ba95..0b8dfc4 100644
--- a/ghedt/peak_load_analysis_tool/ground_loads.py
+++ b/ghedt/peak_load_analysis_tool/ground_loads.py
@@ -189,7 +189,7 @@ def split_load_by_month(self):
self.monthly_average[i] = self.monthly_total[i] / len(month_loads)
# Day of month the peak load occurs (e.g. 1-31)
- self.monthly_peak_day[i] = math.ceil(month_loads.index(
+ self.monthly_peak_day[i] = math.floor(month_loads.index(
self.monthly_peak[i]) / hours_in_day)
hours_in_previous_months += hours_in_month
@@ -361,7 +361,7 @@ def peak_hour_range(self, m_idx, total_months):
# hybrid time step.)
# Catch the first and last peak hours to make sure they aren't 0
# Could only be 0 when the first month has no load.
- _hours_to_mid_day = (self.monthly_peak_day[m_idx] - 1) * 24 + 12
+ _hours_to_mid_day = (self.monthly_peak_day[m_idx] - 0) * 24 + 12
_half_peak_duration = (self.monthly_peak_duration[m_idx] / 2)
first_hour_peak = \
firstmonthhour(total_months) + _hours_to_mid_day - _half_peak_duration