mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added set method for windows count into property class
This commit is contained in:
parent
1b10f5c9b1
commit
6388d45638
1 changed files with 18 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ from epc_api.client import EpcClient
|
|||
from BaseUtility import Definitions
|
||||
from recommendations.rdsap_tables import england_wales_age_band_lookup, FLOOR_LEVEL_MAP
|
||||
from recommendations.recommendation_utils import (
|
||||
estimate_perimeter, get_wall_type, estimate_external_wall_area, esimtate_pitched_roof_area
|
||||
estimate_perimeter, get_wall_type, estimate_external_wall_area, esimtate_pitched_roof_area, estimate_windows
|
||||
)
|
||||
|
||||
ENVIRONMENT = os.environ.get('ENVIRONMENT', 'dev')
|
||||
|
|
@ -87,6 +87,7 @@ class Property(Definitions):
|
|||
self.insulation_floor_area = None
|
||||
self.number_lighting_outlets = None
|
||||
self.floor_level = None
|
||||
self.number_of_windows = None
|
||||
|
||||
self.current_adjusted_energy = None
|
||||
self.expected_adjusted_energy = None
|
||||
|
|
@ -332,6 +333,7 @@ class Property(Definitions):
|
|||
self.set_wall_type()
|
||||
self.set_floor_type()
|
||||
self.set_floor_level()
|
||||
self.set_windows_count()
|
||||
|
||||
def set_age_band(self):
|
||||
"""
|
||||
|
|
@ -850,3 +852,18 @@ class Property(Definitions):
|
|||
"""
|
||||
self.current_adjusted_energy = current_adjusted_energy
|
||||
self.expected_adjusted_energy = expected_adjusted_energy
|
||||
|
||||
def set_windows_count(self):
|
||||
"""
|
||||
Using the estimate_windows function, this method will set the number of windows in the property
|
||||
:return:
|
||||
"""
|
||||
|
||||
self.number_of_windows = estimate_windows(
|
||||
property_type=self.data["property-type"],
|
||||
built_form=self.data["built-form"],
|
||||
construction_age_band=self.construction_age_band,
|
||||
floor_area=self.floor_area,
|
||||
number_habitable_rooms=self.number_of_rooms,
|
||||
extension_count=float(self.data["extension-count"]),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue