mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Added init and started adding the recommendation function
This commit is contained in:
parent
9f42344e04
commit
c6c8de6dcf
1 changed files with 29 additions and 3 deletions
|
|
@ -1,7 +1,33 @@
|
||||||
|
from typing import List
|
||||||
|
from backend.Property import Property
|
||||||
|
from recommendations.Costs import Costs
|
||||||
|
|
||||||
|
|
||||||
class WindowsRecommendations:
|
class WindowsRecommendations:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, property_instance: Property, materials: List):
|
||||||
pass
|
self.property = property_instance
|
||||||
|
self.costs = Costs(self.property)
|
||||||
|
|
||||||
|
self.recommendations = []
|
||||||
|
|
||||||
|
self.glazing_materials = [
|
||||||
|
material for material in materials if material["type"] == "window_glazing"
|
||||||
|
]
|
||||||
|
|
||||||
|
# TODO: This will be populated with the works associated to upgrading glazing. This will involve removal of
|
||||||
|
# previous glazing and installation of new glazing. This will not include the cost of the windows material
|
||||||
|
# themselfs
|
||||||
|
self.glazing_works_materials = []
|
||||||
|
|
||||||
def recommend(self):
|
def recommend(self):
|
||||||
pass
|
"""
|
||||||
|
This method will recommend the best possible glazing options for a property.
|
||||||
|
|
||||||
|
In order to do this, we need to estimate the number of windows that the home has. This information will be
|
||||||
|
stored in the property object, under property.number_of_windows
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
|
||||||
|
if not self.property.number_of_windows:
|
||||||
|
raise ValueError("Number of windows not specified")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue