added costing method for solar thermal

This commit is contained in:
Khalim Conn-Kowlessar 2024-08-12 20:56:56 +01:00
parent b4d8959c16
commit 709d4aa958

View file

@ -1,5 +1,6 @@
import numpy as np
import pandas as pd
from backend.apis.GoogleSolarApi import GoogleSolarApi
QUARTERLY_ENERGY_PRICES = [
# 2024 Q1
@ -282,4 +283,8 @@ class AnnualBillSavings:
return (kwh / cop) * cost_per_kwh
if fuel == "Natural Gas + Solar Thermal":
# The solar thermal covers a % of the heating kwh, so we need to adjust the cost
return (kwh / cop) * GoogleSolarApi.SOLAR_CONSUMPTION_PROPORTION * cls.GAS_PRICE_CAP
raise Exception("Fuel not recognised")