Merge initial version for Catalogs as factories data sources
This commit is contained in:
parent
b1e74daa48
commit
d5565530c1
|
@ -18,7 +18,8 @@ nrel_to_function = {
|
||||||
'quick service restaurant': cte.QUICK_SERVICE_RESTAURANT,
|
'quick service restaurant': cte.QUICK_SERVICE_RESTAURANT,
|
||||||
'full service restaurant': cte.FULL_SERVICE_RESTAURANT,
|
'full service restaurant': cte.FULL_SERVICE_RESTAURANT,
|
||||||
'small hotel': cte.SMALL_HOTEL,
|
'small hotel': cte.SMALL_HOTEL,
|
||||||
'large hotel': cte.LARGE_HOTEL
|
'large hotel': cte.LARGE_HOTEL,
|
||||||
|
'industry': cte.INDUSTRY
|
||||||
}
|
}
|
||||||
|
|
||||||
nrcan_to_function = {
|
nrcan_to_function = {
|
||||||
|
|
|
@ -116,7 +116,6 @@ class NrelCatalog(Catalog):
|
||||||
climate_zone = archetype['@climate_zone']
|
climate_zone = archetype['@climate_zone']
|
||||||
construction_period = reference_standard_to_construction_period[archetype['@reference_standard']]
|
construction_period = reference_standard_to_construction_period[archetype['@reference_standard']]
|
||||||
average_storey_height = archetype['average_storey_height']['#text']
|
average_storey_height = archetype['average_storey_height']['#text']
|
||||||
number_of_storeys = archetype['number_of_storeys']['#text']
|
|
||||||
thermal_capacity = archetype['thermal_capacity']['#text']
|
thermal_capacity = archetype['thermal_capacity']['#text']
|
||||||
extra_loses_due_to_thermal_bridges = archetype['extra_loses_due_to_thermal_bridges']['#text']
|
extra_loses_due_to_thermal_bridges = archetype['extra_loses_due_to_thermal_bridges']['#text']
|
||||||
indirect_heated_ratio = archetype['indirect_heated_ratio']['#text']
|
indirect_heated_ratio = archetype['indirect_heated_ratio']['#text']
|
||||||
|
@ -151,7 +150,6 @@ class NrelCatalog(Catalog):
|
||||||
construction_period,
|
construction_period,
|
||||||
archetype_constructions,
|
archetype_constructions,
|
||||||
average_storey_height,
|
average_storey_height,
|
||||||
number_of_storeys,
|
|
||||||
thermal_capacity,
|
thermal_capacity,
|
||||||
extra_loses_due_to_thermal_bridges,
|
extra_loses_due_to_thermal_bridges,
|
||||||
indirect_heated_ratio,
|
indirect_heated_ratio,
|
||||||
|
|
|
@ -16,7 +16,6 @@ class Archetype:
|
||||||
construction_period,
|
construction_period,
|
||||||
constructions,
|
constructions,
|
||||||
average_storey_height,
|
average_storey_height,
|
||||||
number_of_storeys,
|
|
||||||
thermal_capacity,
|
thermal_capacity,
|
||||||
extra_loses_due_to_thermal_bridges,
|
extra_loses_due_to_thermal_bridges,
|
||||||
indirect_heated_ratio,
|
indirect_heated_ratio,
|
||||||
|
@ -29,7 +28,6 @@ class Archetype:
|
||||||
self._construction_period = construction_period
|
self._construction_period = construction_period
|
||||||
self._constructions = constructions
|
self._constructions = constructions
|
||||||
self._average_storey_height = average_storey_height
|
self._average_storey_height = average_storey_height
|
||||||
self._number_of_storeys = number_of_storeys
|
|
||||||
self._thermal_capacity = thermal_capacity
|
self._thermal_capacity = thermal_capacity
|
||||||
self._extra_loses_due_to_thermal_bridges = extra_loses_due_to_thermal_bridges
|
self._extra_loses_due_to_thermal_bridges = extra_loses_due_to_thermal_bridges
|
||||||
self._indirect_heated_ratio = indirect_heated_ratio
|
self._indirect_heated_ratio = indirect_heated_ratio
|
||||||
|
@ -92,14 +90,6 @@ class Archetype:
|
||||||
"""
|
"""
|
||||||
return self._average_storey_height
|
return self._average_storey_height
|
||||||
|
|
||||||
@property
|
|
||||||
def number_of_storeys(self):
|
|
||||||
"""
|
|
||||||
Get archetype number of storeys
|
|
||||||
:return: int
|
|
||||||
"""
|
|
||||||
return self._number_of_storeys
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def thermal_capacity(self):
|
def thermal_capacity(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
</construction>
|
</construction>
|
||||||
</constructions>
|
</constructions>
|
||||||
<average_storey_height units="m">3.05</average_storey_height>
|
<average_storey_height units="m">3.05</average_storey_height>
|
||||||
<number_of_storeys units="-">2</number_of_storeys>
|
|
||||||
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
||||||
<extra_loses_due_to_thermal_bridges units="W/K m2">0.15</extra_loses_due_to_thermal_bridges>
|
<extra_loses_due_to_thermal_bridges units="W/K m2">0.15</extra_loses_due_to_thermal_bridges>
|
||||||
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
||||||
|
@ -173,7 +172,6 @@
|
||||||
</construction>
|
</construction>
|
||||||
</constructions>
|
</constructions>
|
||||||
<average_storey_height units="m">6.1</average_storey_height>
|
<average_storey_height units="m">6.1</average_storey_height>
|
||||||
<number_of_storeys units="-">1</number_of_storeys>
|
|
||||||
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
||||||
<extra_loses_due_to_thermal_bridges units="W/K m2">0.15</extra_loses_due_to_thermal_bridges>
|
<extra_loses_due_to_thermal_bridges units="W/K m2">0.15</extra_loses_due_to_thermal_bridges>
|
||||||
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
||||||
|
@ -394,7 +392,6 @@
|
||||||
</construction>
|
</construction>
|
||||||
</constructions>
|
</constructions>
|
||||||
<average_storey_height units="m">3.05</average_storey_height>
|
<average_storey_height units="m">3.05</average_storey_height>
|
||||||
<number_of_storeys units="-">2</number_of_storeys>
|
|
||||||
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
||||||
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
|
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
|
||||||
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
||||||
|
@ -549,7 +546,6 @@
|
||||||
</construction>
|
</construction>
|
||||||
</constructions>
|
</constructions>
|
||||||
<average_storey_height units="m">6.1</average_storey_height>
|
<average_storey_height units="m">6.1</average_storey_height>
|
||||||
<number_of_storeys units="-">1</number_of_storeys>
|
|
||||||
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
|
||||||
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
|
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
|
||||||
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
||||||
|
@ -798,7 +794,7 @@
|
||||||
<infiltration_rate_for_ventilation_system_off units="ACH">0.50</infiltration_rate_for_ventilation_system_off>
|
<infiltration_rate_for_ventilation_system_off units="ACH">0.50</infiltration_rate_for_ventilation_system_off>
|
||||||
<infiltration_rate_for_ventilation_system_on units="ACH">0</infiltration_rate_for_ventilation_system_on>
|
<infiltration_rate_for_ventilation_system_on units="ACH">0</infiltration_rate_for_ventilation_system_on>
|
||||||
</archetype>
|
</archetype>
|
||||||
<archetype id="37" building_type="industrial" reference_standard="non_standard_dompark" climate_zone="ASHRAE_2004:4A">
|
<archetype id="37" building_type="industry" reference_standard="non_standard_dompark" climate_zone="ASHRAE_2004:4A">
|
||||||
<constructions>
|
<constructions>
|
||||||
<construction id="106" type="exterior wall" >
|
<construction id="106" type="exterior wall" >
|
||||||
<window_ratio units="-">0.15</window_ratio>
|
<window_ratio units="-">0.15</window_ratio>
|
||||||
|
@ -813,11 +809,11 @@
|
||||||
<window/>
|
<window/>
|
||||||
</construction>
|
</construction>
|
||||||
</constructions>
|
</constructions>
|
||||||
<average_storey_height units="m"></average_storey_height>
|
<average_storey_height units="m">3.05</average_storey_height>
|
||||||
<thermal_capacity units="kJ/K m2"></thermal_capacity>
|
<thermal_capacity units="kJ/K m2">90</thermal_capacity>
|
||||||
<extra_loses_due_to_thermal_bridges units="W/K m2"></extra_loses_due_to_thermal_bridges>
|
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
|
||||||
<indirect_heated_ratio units="-"></indirect_heated_ratio>
|
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
|
||||||
<infiltration_rate_for_ventilation_system_off units="ACH"></infiltration_rate_for_ventilation_system_off>
|
<infiltration_rate_for_ventilation_system_off units="ACH">0.10</infiltration_rate_for_ventilation_system_off>
|
||||||
<infiltration_rate_for_ventilation_system_on units="ACH"></infiltration_rate_for_ventilation_system_on>
|
<infiltration_rate_for_ventilation_system_on units="ACH">0</infiltration_rate_for_ventilation_system_on>
|
||||||
</archetype>
|
</archetype>
|
||||||
</archetypes>
|
</archetypes>
|
||||||
|
|
|
@ -716,7 +716,7 @@
|
||||||
</layer>
|
</layer>
|
||||||
</layers>
|
</layers>
|
||||||
</construction>
|
</construction>
|
||||||
<construction id="102" type="ceiling" name="Project internal floor_Reversed">
|
<construction id="102" type="roof" name="Project internal floor_Reversed">
|
||||||
<layers>
|
<layers>
|
||||||
<layer id="1" name="Layer 1">
|
<layer id="1" name="Layer 1">
|
||||||
<material>105</material>
|
<material>105</material>
|
||||||
|
@ -797,7 +797,7 @@
|
||||||
</layer>
|
</layer>
|
||||||
</layers>
|
</layers>
|
||||||
</construction>
|
</construction>
|
||||||
<construction id="109" type="ceiling" name="Project internal floor_Rev">
|
<construction id="109" type="roof" name="Project internal floor_Rev">
|
||||||
<layers>
|
<layers>
|
||||||
<layer id="1" name="Layer 1">
|
<layer id="1" name="Layer 1">
|
||||||
<material>105</material>
|
<material>105</material>
|
||||||
|
|
|
@ -251,7 +251,8 @@ class GeometryHelper:
|
||||||
cte.QUICK_SERVICE_RESTAURANT: cte.RESTAURANT,
|
cte.QUICK_SERVICE_RESTAURANT: cte.RESTAURANT,
|
||||||
cte.FULL_SERVICE_RESTAURANT: cte.RESTAURANT,
|
cte.FULL_SERVICE_RESTAURANT: cte.RESTAURANT,
|
||||||
cte.SMALL_HOTEL: cte.HOTEL,
|
cte.SMALL_HOTEL: cte.HOTEL,
|
||||||
cte.LARGE_HOTEL: cte.HOTEL
|
cte.LARGE_HOTEL: cte.HOTEL,
|
||||||
|
cte.INDUSTRY:cte.INDUSTRY
|
||||||
}
|
}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -25,7 +25,7 @@ class TestBuildings(TestCase):
|
||||||
self._example_path = (Path(__file__).parent / 'tests_data').resolve()
|
self._example_path = (Path(__file__).parent / 'tests_data').resolve()
|
||||||
|
|
||||||
def test_doe_idf(self):
|
def test_doe_idf(self):
|
||||||
city_file = "../unittests/tests_data/C40_Final.gml"
|
city_file = "../unittests/tests_data/one_building_in_kelowna.gml"
|
||||||
output_path = Path('../unittests/tests_outputs/').resolve()
|
output_path = Path('../unittests/tests_outputs/').resolve()
|
||||||
city = GeometryFactory('citygml', city_file).city
|
city = GeometryFactory('citygml', city_file).city
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
|
@ -34,7 +34,7 @@ class TestBuildings(TestCase):
|
||||||
UsageFactory('comnet', city).enrich()
|
UsageFactory('comnet', city).enrich()
|
||||||
ExportsFactory('idf', city, output_path).export()
|
ExportsFactory('idf', city, output_path).export()
|
||||||
|
|
||||||
self.assertEqual(10, len(city.buildings))
|
self.assertEqual(1, len(city.buildings))
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
for internal_zone in building.internal_zones:
|
for internal_zone in building.internal_zones:
|
||||||
self.assertTrue(len(internal_zone.usage_zones) > 0)
|
self.assertTrue(len(internal_zone.usage_zones) > 0)
|
||||||
|
|
|
@ -35,6 +35,7 @@ class TestSchedulesFactory(TestCase):
|
||||||
self.assertIsNotNone(_city, 'city is none')
|
self.assertIsNotNone(_city, 'city is none')
|
||||||
for building in _city.buildings:
|
for building in _city.buildings:
|
||||||
building.function = GeometryHelper.libs_function_from_hft(building.function)
|
building.function = GeometryHelper.libs_function_from_hft(building.function)
|
||||||
|
building.year_of_construction = 2005
|
||||||
UsageFactory('hft', _city).enrich()
|
UsageFactory('hft', _city).enrich()
|
||||||
return _city
|
return _city
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user