diff --git a/backend/apis/GoogleSolarApi.py b/backend/apis/GoogleSolarApi.py index 00fb98d8..a0970ac5 100644 --- a/backend/apis/GoogleSolarApi.py +++ b/backend/apis/GoogleSolarApi.py @@ -704,7 +704,7 @@ class GoogleSolarApi: # We set the target rating to EPC C, which is the typical EPC rating we would expect the # property to achieve post retrofit of just the fabric "energy_consumption": cls.estimate_new_consumption( - current_energy_efficiency=p.data["current-energy-efficiency"], + current_energy_efficiency=min(p.data["current-energy-efficiency"], 100), target_efficiency="69", current_consumption=p.estimate_electrical_consumption( assumed_ashp_efficiency=assumptions.AVERAGE_ASHP_EFFICIENCY, exclusions=body.exclusions @@ -723,7 +723,7 @@ class GoogleSolarApi: # We set the target rating to EPC C, which is the typical EPC rating we would expect the # property to achieve post retrofit of just the fabric "energy_consumption": cls.estimate_new_consumption( - current_energy_efficiency=p.data["current-energy-efficiency"], + current_energy_efficiency=min(p.data["current-energy-efficiency"], 100), target_efficiency="69", current_consumption=p.estimate_electrical_consumption( assumed_ashp_efficiency=assumptions.AVERAGE_ASHP_EFFICIENCY, exclusions=body.exclusions diff --git a/backend/engine/engine.py b/backend/engine/engine.py index 93ddc085..215adfe4 100644 --- a/backend/engine/engine.py +++ b/backend/engine/engine.py @@ -472,8 +472,6 @@ async def model_engine(body: PlanTriggerRequest): created_at = datetime.now().isoformat() start_ms = int(time.time() * 1000) - # TODO: if the measure is already installed, it should actually be the very first phase - try: session.begin() logger.info("Getting the inputs") diff --git a/backend/ml_models/AnnualBillSavings.py b/backend/ml_models/AnnualBillSavings.py index 4a2a6f1f..569d43c1 100644 --- a/backend/ml_models/AnnualBillSavings.py +++ b/backend/ml_models/AnnualBillSavings.py @@ -26,21 +26,21 @@ class AnnualBillSavings: AVERAGE_ELECTRICITY_CONSUMPTION = 2700 AVERAGE_GAS_CONSUMPTION = 11500 - # Latest price cap figures from Ofgem are for April 2024 + # Latest price cap figures from Ofgem are for Jan 2026 to March 2026 # https://www.ofgem.gov.uk/energy-price-cap - ELECTRICITY_PRICE_CAP = 0.2573 - GAS_PRICE_CAP = 0.0633 - # This is the most recent export payment figure, at 9.28p/kWh + ELECTRICITY_PRICE_CAP = 0.2769 + GAS_PRICE_CAP = 0.593 + # This is the most recent export payment figure, at 13p/kWh - Updated Nov 2025 # Smart export guarantee rates can be found here: # https://www.sunsave.energy/solar-panels-advice/exporting-to-the-grid/best-seg-rates - ELECTRICITY_EXPORT_PAYMENT = 0.0928 + ELECTRICITY_EXPORT_PAYMENT = 0.13 # This is a weighted mean of the price caps, using the consumption figures above as weights PRICE_FACTOR = 0.09549999999999999 # Daily standard charge, based on average across England, Scotland and Wales, and includes VAT - DAILY_STANDARD_CHARGE_GAS = 0.2982 - DAILY_STANDARD_CHARGE_ELECTRICITY = 0.5137 + DAILY_STANDARD_CHARGE_GAS = 0.3509 + DAILY_STANDARD_CHARGE_ELECTRICITY = 0.5475 # Based on https://www.nottenergy.com/advice-and-tools/project-energy-cost-comparison # For July 2024. These quotes are based on the east midlands region, so we