diff --git a/recommendations/Costs.py b/recommendations/Costs.py index 71d20855..671c4db7 100644 --- a/recommendations/Costs.py +++ b/recommendations/Costs.py @@ -55,6 +55,11 @@ INSTALLER_SOLAR_COSTS = [ {'n_panels': 18, 'array_kwp': 7.4, 'cost': 6021.00, 'installer': 'CEG'} ] +# CEG uses use Solshare as an inverter to provide solar PV to multiple flats. This costs £7500 for the inverter alone +# https://midsummerwholesale.co.uk/buy/solshare +INSTALLER_SOLAR_PV_INVERTER_COST = 7500 +INSTALLER_SOLAR_PV_INVERTER_LABOUR_COST = 500 # Just a rough guess to labour costs + INSTALLER_SCAFFOLDING_COSTS = [ {'stories': 1, 'description': '1 Story Scaffold', 'cost': 531.00, 'installer': 'CEG'}, {'stories': 2, 'description': '2 Story Scaffold', 'cost': 841.00, 'installer': 'CEG'}, @@ -1055,12 +1060,13 @@ class Costs: } def solar_pv( - self, wattage: float, + self, n_panels: int | float, has_battery: bool = False, array_cost=None, n_floors: int = 1, battery_kwh: int = 5, + needs_inverter=False ): """ @@ -1073,12 +1079,13 @@ class Costs: Price can also be benchmarked against this checkatrade article: https://www.checkatrade.com/blog/cost-guides/cost-of-solar-panel-installation/ - :param wattage: Peak wattage of the solar PV system :param n_panels: Number of solar panels :param has_battery: Bool, whether the system includes a battery :param array_cost: float, containing the cost of the solar PV array :param n_floors: int, number of floors in the property, used to estimate the cost of scaffolding :param battery_kwh: int, capacity of the battery in kWh. Defaulted to 5 + :param needs_inverter: Bool, whether the system needs an inverter, where the solar panels are feeding multiple + units """ system_cost = [c for c in INSTALLER_SOLAR_COSTS if c["n_panels"] == n_panels][0]["cost"] @@ -1092,6 +1099,11 @@ class Costs: scaffolding_cost = [c for c in INSTALLER_SCAFFOLDING_COSTS if c["stories"] == n_floors][0]["cost"] total_cost += scaffolding_cost + if needs_inverter: + total_cost += INSTALLER_SOLAR_PV_INVERTER_COST + # We also add an additional labour cost + total_cost += INSTALLER_SOLAR_PV_INVERTER_LABOUR_COST + # We add an additional cost for scaffolding subtotal_before_vat = total_cost / (1 + self.VAT_RATE) diff --git a/recommendations/SolarPvRecommendations.py b/recommendations/SolarPvRecommendations.py index bbaffdda..dc11ce4a 100644 --- a/recommendations/SolarPvRecommendations.py +++ b/recommendations/SolarPvRecommendations.py @@ -104,8 +104,13 @@ class SolarPvRecommendations: roof_coverage_percent = round(recommendation_config["panneled_roof_area"] / total_roof_area * 100) else: raise Exception("IMPLEMENT ME") - # Spread the cost to the individual units - adding a 20% contingency - total_cost = recommendation_config["total_cost"] / n_units + total_cost = self.costs.solar_pv( + array_cost=recommendation_config.get("cost", None), + n_panels=recommendation_config["n_panels"], + n_floors=self.property.number_of_storeys["number_of_storeys"], + needs_inverter=True, + )["total"] / n_units + kw = np.floor(recommendation_config["array_wattage"] / 100) / 10 # Default to a weeks work for a team of 3 people doing 8 hour days labour_days = 5 @@ -194,10 +199,10 @@ class SolarPvRecommendations: roof_coverage_percent = np.ceil(roof_coverage_percent / 10) * 10 for has_battery in [False, True]: cost_result = self.costs.solar_pv( - wattage=recommendation_config["array_wattage"], has_battery=has_battery, array_cost=non_invasive_recommendation.get("cost", None), n_panels=recommendation_config["n_panels"], + n_floors=self.property.number_of_floors ) kw = np.floor(recommendation_config["array_wattage"] / 100) / 10 if has_battery: