mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Handling different fuel types
This commit is contained in:
parent
61b5724810
commit
e7ab28bd17
3 changed files with 9 additions and 3 deletions
|
|
@ -724,7 +724,7 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
# We now insert kwh estimates and costs into the recommendations
|
||||
# TODO: We should join the methodology which maps the heating and hot water descriptions to the fuel types in
|
||||
# Recommendations, but also the Property class
|
||||
for property_id in recommendations.keys():
|
||||
for property_id in tqdm(recommendations.keys()):
|
||||
property_recommendations = recommendations[property_id]
|
||||
property_instance = [p for p in input_properties if p.id == property_id][0]
|
||||
|
||||
|
|
|
|||
|
|
@ -272,7 +272,6 @@ class AnnualBillSavings:
|
|||
cost_per_kwh = cls.cost_per_kwh(
|
||||
price_data["Price (p)"], price_data["Energy Content, Net Calorific value (kWh/unit)"]
|
||||
)
|
||||
|
||||
return (kwh / cop) * cost_per_kwh
|
||||
|
||||
if fuel == "Wood Logs":
|
||||
|
|
@ -280,11 +279,17 @@ class AnnualBillSavings:
|
|||
cost_per_kwh = cls.cost_per_kwh(
|
||||
price_data["Price (p)"], price_data["Energy Content, Net Calorific value (kWh/unit)"]
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
if fuel == "Oil":
|
||||
price_data = cls.FUEL_DATA[cls.FUEL_DATA["Fuel"] == "Kerosene"].squeeze()
|
||||
cost_per_kwh = cls.cost_per_kwh(
|
||||
price_data["Price (p)"], price_data["Energy Content, Net Calorific value (kWh/unit)"]
|
||||
)
|
||||
return (kwh / cop) * cost_per_kwh
|
||||
|
||||
raise Exception("Fuel not recognised")
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ DESCRIPTIONS_TO_FUEL_TYPES = {
|
|||
"Boiler and underfloor heating, mains gas": {"fuel": "Natural Gas", "cop": 0.9},
|
||||
"No system present: electric heaters assumed": {"fuel": "Electricity", "cop": 1},
|
||||
"Electric instantaneous at point of use": {"fuel": "Electricity", "cop": 1},
|
||||
"Boiler and radiators, oil": {"fuel": "Oil", "cop": 0.9},
|
||||
}
|
||||
STARTING_DUMMY_ID_VALUE = -9999
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue