debugging estimating electrical consumption

This commit is contained in:
Khalim Conn-Kowlessar 2024-08-12 17:37:02 +01:00
parent 7107e37027
commit 18b3487438
2 changed files with 6 additions and 16 deletions

View file

@ -749,7 +749,7 @@ class Property:
self.current_energy_consumption = sum(list(unadjusted_kwh_estimates.values()))
self.energy_cost_estimates = {
"adjusted": adjusted_heating_costs,
# "adjusted": adjusted_heating_costs,
"unadjusted": unadjusted_heating_costs,
"epc": {
"heating": float(self.data["heating-cost-current"]),
@ -1265,19 +1265,20 @@ class Property:
exclusions = [] if exclusions is None else exclusions
# If the property currently has an ASHP, we don't gain from any efficiency improvements
if not self.is_ashp_valid(exclusions=exclusions):
return self.current_energy_consumption
remap_fuel_sources = ["Natural Gas", "LPG", "Wood Logs"]
implemented_fuel_sources = ["Electricity"] + remap_fuel_sources
# If the property currently has an electric boiler, it will still benefit from the ASHP efficiency gain
remap_fuel_sources = ["Natural Gas", "LPG", "Wood Logs", "Oil", "Electricity"]
heating_energy_source = self.heating_energy_source
hot_water_energy_source = self.hot_water_energy_source
heating_consumption = self.energy_consumption_estimates["unadjusted"]["heating"]
hotwater_consumption = self.energy_consumption_estimates["unadjusted"]["hot_water"]
if (heating_energy_source not in implemented_fuel_sources) or (
hot_water_energy_source not in implemented_fuel_sources
if (heating_energy_source not in remap_fuel_sources) or (
hot_water_energy_source not in remap_fuel_sources
):
raise NotImplementedError("Have not implemented estimating electrical consumption for this fuel type")

View file

@ -507,17 +507,6 @@ async def trigger_plan(body: PlanTriggerRequest):
# TODO: For simple properties, we should do a comparison/check between the solar API's roof area and the
# basic estimate of roof area
for p in tqdm(input_properties):
if p.uprn in [100060066017, 10033248492]:
continue
energy_consumption_client.estimate_new_consumption(
current_energy_efficiency=p.data["current-energy-efficiency"],
target_efficiency="69",
current_consumption=p.estimate_electrical_consumption(
assumed_ashp_efficiency=assumptions.PESSIMISTIC_ASHPY_EFFICIENCY, exclusions=body.exclusions
),
)
building_ids = [
{
"building_id": p.building_id,