Skip to content

Commit

Permalink
Corrected sign in overmorrow calc
Browse files Browse the repository at this point in the history
  • Loading branch information
salewis38 authored Sep 21, 2023
1 parent 92586bb commit 2ee02ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions palm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,11 @@ def compute_tgt_soc(self, gen_fcast, weight: int, commit: bool) -> str:

# We now have the four values of max & min charge for tomorrow & overmorrow
# Check if overmorrow is better than tomorrow and there is opportunity to reduce target
# to avoid residual charge at the end of the day in anticipation of a sunny day
# to avoid residual charge at the end of the day in anticipation of a sunny day.
# Reduce the target by implying that there will be more than forecast generation
if max_charge_pcnt[1] > 100 and max_charge_pcnt[0] < 100:
logger.info("Overmorrow correction enabled")
max_charge_pc -= int((max_charge_pcnt[1] - 100) / 2)
max_charge_pc += int((max_charge_pcnt[1] - 100) / 2)
else:
logger.info("Overmorrow correction not needed/enabled")

Expand Down

0 comments on commit 2ee02ca

Please sign in to comment.