Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
m4dm4rtig4n committed Aug 21, 2023
1 parent 85b6937 commit 3813103
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions app/models/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,10 @@ def peak_offpeak_percent(self):
value_peak_offpeak_percent_hc = 0
value_peak_offpeak_percent_hp_vs_hc = 0
for day in self.db.get_detail_range(self.usage_point_id, begin, end, self.measurement_direction):
print(day.measure_type, day.date, day.value)
if day.measure_type == "HP":
value_peak_offpeak_percent_hp = value_peak_offpeak_percent_hp + day.value
if day.measure_type == "HC":
value_peak_offpeak_percent_hc = value_peak_offpeak_percent_hc + day.value
print(begin, end)
print(value_peak_offpeak_percent_hp, value_peak_offpeak_percent_hc)
if value_peak_offpeak_percent_hc != 0:
value_peak_offpeak_percent_hp_vs_hc = abs(((100 * value_peak_offpeak_percent_hc) / value_peak_offpeak_percent_hp) - 100)
logging.debug(f" peak_offpeak_percent_hp VS peak_offpeak_percent_hc => {value_peak_offpeak_percent_hp_vs_hc}")
Expand Down

0 comments on commit 3813103

Please sign in to comment.