rounding photo supply to the nearest 5

This commit is contained in:
Khalim Conn-Kowlessar 2024-07-30 11:45:24 +01:00
parent c948c24061
commit e50d82ac24

View file

@ -174,6 +174,10 @@ class SolarPvRecommendations:
if already_installed:
cost_result = override_costs(cost_result)
# We calculate the photo_supply we're going to simulate the impact with and we round this to the
# nearest 5
photo_supply = round(roof_coverage_percent / 5) * 5
self.recommendation.append(
{
"phase": phase,
@ -188,9 +192,9 @@ class SolarPvRecommendations:
# This is required for simulating the SAP impact. solar_pv_percentage is between 0 & 1 so we
# scale
# back up here
"photo_supply": roof_coverage_percent,
"photo_supply": photo_supply,
"has_battery": has_battery,
"initial_ac_kwh_per_year": recommendation_config["initial_ac_kwh_per_year"],
"description_simulation": {"photo-supply": roof_coverage_percent},
"description_simulation": {"photo-supply": photo_supply},
}
)