def type_bldg_residential( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu=False, residential_layout=None, neighbour_buildings=None, attic=None, cellar=None, dormer=None, construction_type=None): """Old function, consider rewriting your code This is an old function for archetype generation, consider rewriting your code to use Project.add_non_residential(). This function will be eliminated within the next versions """ warnings.warn("You are using an old function for archetype " "generation, consider rewriting you code to use " "Project.add_residential(). This function will be " "eliminated within the next versions") type_bldg = SingleFamilyDwelling( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, residential_layout, neighbour_buildings, attic, cellar, dormer, construction_type) type_bldg.generate_archetype() type_bldg.calc_building_parameter( number_of_elements=self._number_of_elements_calc, merge_windows=self._merge_windows_calc, used_library=self._used_library_calc) return type_bldg
def type_bldg_residential(self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu=False, residential_layout=None, neighbour_buildings=None, attic=None, cellar=None, dormer=None, construction_type=None): '''Create and calculate an residential building Parameters ---------- name : str individual name year_of_construction : int year of first construction number_of_floors : int number of floors above ground height_of_floors : float average height of the floors net_leased_area : float total net leased area of building with_ahu : boolean if building has a central AHU or not residential_layout : int type of floor plan (default = 0) 0: compact 1: elongated/complex neighbour_buildings : int neighbour (default = 0) 0: no neighbour 1: one neighbour 2: two neighbours attic : int type of attic (default = 0) 0: flat roof 1: non heated attic 2: partly heated attic 3: heated attic cellar : int type of cellar (default = 0) 0: no cellar 1: non heated cellar 2: partly heated cellar 3: heated cellar construction_type : str construction type (default = "heavy") heavy: heavy construction light: light construction dormer : str construction type 0: no dormer 1: dormer Returns ---------- type_bldg : Instance of SingleFamilyDwelling() ''' type_bldg = SingleFamilyDwelling(self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, residential_layout, neighbour_buildings, attic, cellar, dormer, construction_type) type_bldg.generate_archetype() type_bldg.calc_building_parameter( number_of_elements=self._number_of_elements_calc, merge_windows=self._merge_windows_calc, used_library=self._used_library_calc) return type_bldg
def add_residential( self, method, usage, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu=False, residential_layout=None, neighbour_buildings=None, attic=None, cellar=None, dormer=None, construction_type=None, number_of_apartments=None): """Adds a residential building to the TEASER project This function adds a residential archetype building to the TEASER project. You need to specify the method of the archetype generation. Currently TEASER supports only method according 'iwu' and 'urbanrenet' for residential buildings ('tabula_de' to follow soon). Further the type of usage needs to be specified. Currently TEASER supports one type of residential building for 'iwu' and eleven types for 'urbanrenet'. For more information on specific archetype buildings and methods, please read the docs of archetype classes. This function also calculates the parameters of the buildings directly with the settings set in the project (e.g. used_library_calc or number_of_elements_calc). Parameters ---------- method : str Used archetype method, currenlty only 'iwu' or 'urbanrenet' are supported, 'tabula_de' to follow soon usage : str Main usage of the obtainend building, currently only 'single_family_dwelling' is supported for iwu and 'est1a', 'est1b', 'est2', 'est3', 'est4a', 'est4b', 'est5' 'est6', 'est7', 'est8a', 'est8b' for urbanrenet. name : str Individual name year_of_construction : int Year of first construction height_of_floors : float [m] Average height of the buildings' floors number_of_floors : int Number of building's floors above ground net_leased_area : float [m2] Total net leased area of building. This is area is NOT the footprint of a building with_ahu : Boolean If set to True, an empty instance of BuildingAHU is instantiated and assigned to attribute central_ahu. This instance holds information for central Air Handling units. Default is False. residential_layout : int Structure of floor plan (default = 0) CAUTION only used for iwu 0: compact 1: elongated/complex neighbour_buildings : int Number of neighbour buildings. CAUTION: this will not change the orientation of the buildings wall, but just the overall exterior wall and window area(!) (default = 0) 0: no neighbour 1: one neighbour 2: two neighbours attic : int Design of the attic. CAUTION: this will not change the orientation or tilt of the roof instances, but just adapt the roof area(!) ( default = 0) CAUTION only used for iwu 0: flat roof 1: non heated attic 2: partly heated attic 3: heated attic cellar : int Design of the of cellar CAUTION: this will not change the orientation, tilt of GroundFloor instances, nor the number or area of ThermalZones, but will change GroundFloor area(!) (default = 0) CAUTION only used for iwu 0: no cellar 1: non heated cellar 2: partly heated cellar 3: heated cellar dormer : str Is a dormer attached to the roof? CAUTION: this will not change roof or window orientation or tilt, but just adapt the roof area(!) (default = 0) CAUTION only used for iwu 0: no dormer 1: dormer construction_type : str Construction type of used wall constructions default is "heavy") heavy: heavy construction light: light construction number_of_apartments : int number of apartments inside Building (default = 1). CAUTION only used for urbanrenet Returns ---------- type_bldg : Instance of SingleFamilyDwelling() """ ass_error_method = "only 'iwu' and 'urbanrenet' are valid methods"\ "for residential archetype generation" assert method in ['iwu', 'urbanrenet'], ass_error_method ass_error_apart = "The keyword number_of_apartmens does not have any " \ "effect on archetype generation for 'iwu', see" \ "docs for more information" if method == 'iwu' and number_of_apartments is not None: warnings.warn(ass_error_apart) if method == 'iwu': ass_error_usage_iwu = "only 'single_family_dewlling' is a valid " \ "usage for iwu archetype method" assert usage in ['single_family_dwelling'], ass_error_usage_iwu if usage == 'single_family_dwelling': type_bldg = SingleFamilyDwelling( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, residential_layout, neighbour_buildings, attic, cellar, dormer, construction_type) elif method == 'urbanrenet': ass_error_usage_urn = "only 'est1a', 'est1b', 'est2', 'est3', " \ "'est4a', 'est4b', 'est5' 'est6', 'est7', " \ "'est8a','est8b' is are valid usages for " \ "urbanrenet archetype method" assert usage in ['est1a', 'est1b', 'est2', 'est3', 'est4a', 'est4b', 'est5', 'est6', 'est7', 'est8a', 'est8b'], ass_error_usage_urn if usage == 'est1a': type_bldg = EST1a( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type) elif usage == 'est1b': type_bldg = EST1b( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est2': type_bldg = EST2( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est3': type_bldg = EST3( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est4a': type_bldg = EST4a( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est4b': type_bldg = EST4b( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est5': type_bldg = EST5( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est6': type_bldg = EST6( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est7': type_bldg = EST7( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est8a': type_bldg = EST8a( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) elif usage == 'est8b': type_bldg = EST8b( self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, neighbour_buildings, construction_type, number_of_apartments) type_bldg.generate_archetype() type_bldg.calc_building_parameter( number_of_elements=self._number_of_elements_calc, merge_windows=self._merge_windows_calc, used_library=self._used_library_calc) return type_bldg
def type_bldg_residential(self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu=False, residential_layout=None, neighbour_buildings=None, attic=None, cellar=None, dormer=None, construction_type=None): '''Create and calculate an residential building Parameters ---------- name : str individual name year_of_construction : int year of first construction number_of_floors : int number of floors above ground height_of_floors : float average height of the floors net_leased_area : float total net leased area of building with_ahu : boolean if building has a central AHU or not residential_layout : int type of floor plan (default = 0) 0: compact 1: elongated/complex neighbour_buildings : int neighbour (default = 0) 0: no neighbour 1: one neighbour 2: two neighbours attic : int type of attic (default = 0) 0: flat roof 1: non heated attic 2: partly heated attic 3: heated attic cellar : int type of cellar (default = 0) 0: no cellar 1: non heated cellar 2: partly heated cellar 3: heated cellar construction_type : str construction type (default = "heavy") heavy: heavy construction light: light construction dormer : str construction type 0: no dormer 1: dormer Returns ---------- type_bldg : Instance of SingleFamilyDwelling() ''' type_bldg = SingleFamilyDwelling(self, name, year_of_construction, number_of_floors, height_of_floors, net_leased_area, with_ahu, residential_layout, neighbour_buildings, attic, cellar, dormer, construction_type) type_bldg.generate_archetype() type_bldg.calc_building_parameter( number_of_elements=self._number_of_elements_calc, merge_windows=self._merge_windows_calc, used_library=self._used_library_calc) return type_bldg