Skip to content

Adjust placement of loads #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all 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 ghedt/peak_load_analysis_tool/ground_loads.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down