forked from s_ranjbar/city_retrofit
implementing shared_surfaces method. Not working
This commit is contained in:
parent
491cee92da
commit
8ca95ddde0
|
@ -44,6 +44,7 @@ class Building(CityObject):
|
|||
self._appliances_electrical_demand = dict()
|
||||
self._domestic_hot_water_heat_demand = dict()
|
||||
self._eave_height = None
|
||||
self._neighbours = None
|
||||
self._grounds = []
|
||||
self._roofs = []
|
||||
self._walls = []
|
||||
|
@ -441,3 +442,15 @@ class Building(CityObject):
|
|||
for usage in internal_zone.usages:
|
||||
_usage = f'{_usage}{usage.name}_{usage.percentage} '
|
||||
return _usage.rstrip()
|
||||
|
||||
def identify_shared_walls(self):
|
||||
"""
|
||||
Identifies which building' walls adjoin the neighbouring building and saves that information in the
|
||||
corresponding surfaces
|
||||
"""
|
||||
for wall in self.walls:
|
||||
percentage = 0
|
||||
for building in self._neighbours:
|
||||
for neighbour_wall in building.walls:
|
||||
percentage += wall.shared_percentage(neighbour_wall)
|
||||
wall.set_shared_percentage(percentage)
|
||||
|
|
Loading…
Reference in New Issue
Block a user