c764c96deb
added building_type = "residential" to us_archetypes.xml 20 buildings example returns geometrical errors in third building
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
"""
|
|
UsFunctionToUsage helper
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
|
"""
|
|
|
|
|
|
class UsFunctionToUsage:
|
|
"""
|
|
UsFunctionToUsage class
|
|
"""
|
|
_building_usage = {
|
|
'full service restaurant': 'restaurant',
|
|
'highrise apartment': 'residential',
|
|
'hospital': 'health care',
|
|
'large hotel': 'hotel',
|
|
'large office': 'office and administration',
|
|
'medium office': 'office and administration',
|
|
'midrise apartment': 'residential',
|
|
'outpatient healthcare': 'health care',
|
|
'primary school': 'education',
|
|
'quick service restaurant': 'restaurant',
|
|
'secondary school': 'education',
|
|
'small hotel': 'hotel',
|
|
'small office': 'office and administration',
|
|
'stand alone retail': 'retail',
|
|
'strip mall': 'hall',
|
|
'supermarket': 'retail',
|
|
'warehouse': 'industry',
|
|
'residential': 'residential'
|
|
}
|
|
|
|
@staticmethod
|
|
def usage(building_function):
|
|
"""
|
|
Get the usage for the given building function
|
|
:param building_function: str
|
|
:return: str
|
|
"""
|
|
return UsFunctionToUsage._building_usage[building_function]
|