summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-08-17 08:51:52 -0300
committerRoger Gonzalez <roger@rogs.me>2023-08-17 08:51:52 -0300
commitfc1ac46c786aba12eab6dca4bfa1c48a45d0c93d (patch)
tree50cd55f688d4579e391ea7273948530f070b5415
parentac9045758d50b4fecb7d78a0e223eaf9522dfc7c (diff)
Added more explanations to the costs calculation
-rw-r--r--utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 83775d5..4b9a9c2 100644
--- a/utils.py
+++ b/utils.py
@@ -13,8 +13,13 @@ def get_average_price(plan: str) -> float:
"""
if plan == "triple":
+ # 10.680 UYU/kwh * 16.67% of the day (4 hours)
+ # 2.223 UYU/kwh * 29.17% of the day (7 hours)
+ # 4.875 UYU/kwh * 54.16% of the day (13 hours)
return (10.680 * 0.1667) + (2.223 * 0.2917) + (4.875 * 0.5416)
if plan == "doble":
+ # 10.680 UYU/kwh * 16.67% of the day (4 hours)
+ # 4.280 UYU/kwh * 83.33% of the day (20 hours)
return (10.680 * 0.1667) + (4.280 * 0.8333)
raise Exception("Invalid plan")