mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added loft_insulated_at_rafters_efficiency
This commit is contained in:
parent
a7c34c8503
commit
90389ec3c2
1 changed files with 33 additions and 4 deletions
|
|
@ -598,11 +598,40 @@ def loft_insulated_at_rafters_efficiency_thickness(insulation_thickness: int | N
|
|||
def loft_insulated_at_rafters_efficiency_age_band(age_band: EpcConstructionAgeBand) -> EpcEfficiency:
|
||||
"""
|
||||
# 2023 onwards -> Very Good
|
||||
# 2012-2022 -> Good
|
||||
Before 1900 -> Very Poor
|
||||
:param age_band:
|
||||
:return:
|
||||
# 2003-2006, 2012-2022 -> Good
|
||||
# 1983 - 1990, 1996-2002 -> Average
|
||||
# 1976-1982 -> Poor
|
||||
# 1967-1975 and earlier bands -> Very Poor
|
||||
:param age_band: EpcConstructionAgeBand
|
||||
:return: EpcEfficiency
|
||||
"""
|
||||
year = age_band.start_year()
|
||||
if year >= 2023:
|
||||
return EpcEfficiency.VERY_GOOD
|
||||
if year >= 2003:
|
||||
return EpcEfficiency.GOOD
|
||||
if year >= 1983:
|
||||
return EpcEfficiency.AVERAGE
|
||||
if year >= 1976:
|
||||
return EpcEfficiency.POOR
|
||||
|
||||
return EpcEfficiency.VERY_POOR
|
||||
|
||||
|
||||
def loft_insulated_at_rafters_efficiency(
|
||||
insulation_thickness: int | None,
|
||||
age_band: EpcConstructionAgeBand,
|
||||
) -> EpcEfficiency:
|
||||
"""
|
||||
Combines both age band and insulation thickness to determine loft insulated at rafters roof efficiency.
|
||||
:param insulation_thickness: Insulation thickness in mm
|
||||
:param age_band: EpcConstructionAgeBand
|
||||
:return: EpcEfficiency
|
||||
"""
|
||||
if insulation_thickness is not None:
|
||||
return loft_insulated_at_rafters_efficiency_thickness(insulation_thickness)
|
||||
|
||||
return loft_insulated_at_rafters_efficiency_age_band(age_band)
|
||||
|
||||
|
||||
ROOF_DESCRIPTION_EFFICIENCIES: Mapping[EpcRoofDescriptions, RoofEfficiencyRule] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue