bug in function assignment. Dictionaries must be reviewed
This commit is contained in:
parent
b34b07b161
commit
4080b0ad8f
|
@ -197,7 +197,7 @@ class GeometryHelper:
|
||||||
'W1': cte.PRIMARY_SCHOOL,
|
'W1': cte.PRIMARY_SCHOOL,
|
||||||
'W2': cte.PRIMARY_SCHOOL,
|
'W2': cte.PRIMARY_SCHOOL,
|
||||||
'W3': cte.SECONDARY_SCHOOL,
|
'W3': cte.SECONDARY_SCHOOL,
|
||||||
'W4': cte.SECONDARY_SCHOOL,
|
'W4': cte.EDUCATION,
|
||||||
'W5': cte.SECONDARY_SCHOOL,
|
'W5': cte.SECONDARY_SCHOOL,
|
||||||
'W6': cte.SECONDARY_SCHOOL,
|
'W6': cte.SECONDARY_SCHOOL,
|
||||||
'W7': cte.SECONDARY_SCHOOL,
|
'W7': cte.SECONDARY_SCHOOL,
|
||||||
|
@ -225,7 +225,7 @@ class GeometryHelper:
|
||||||
'strip mall': cte.STRIP_MALL,
|
'strip mall': cte.STRIP_MALL,
|
||||||
'warehouse': cte.WAREHOUSE,
|
'warehouse': cte.WAREHOUSE,
|
||||||
'primary school': cte.PRIMARY_SCHOOL,
|
'primary school': cte.PRIMARY_SCHOOL,
|
||||||
'secondary school': cte.SECONDARY_SCHOOL,
|
'secondary school': cte.EDUCATION,
|
||||||
'office': cte.MEDIUM_OFFICE,
|
'office': cte.MEDIUM_OFFICE,
|
||||||
'large office': cte.LARGE_OFFICE
|
'large office': cte.LARGE_OFFICE
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ from pathlib import Path
|
||||||
from imports.usage.comnet_usage_parameters import ComnetUsageParameters
|
from imports.usage.comnet_usage_parameters import ComnetUsageParameters
|
||||||
from imports.usage.nrcan_usage_parameters import NrcanUsageParameters
|
from imports.usage.nrcan_usage_parameters import NrcanUsageParameters
|
||||||
|
|
||||||
|
|
||||||
class UsageFactory:
|
class UsageFactory:
|
||||||
"""
|
"""
|
||||||
UsageFactory class
|
UsageFactory class
|
||||||
|
|
|
@ -125,37 +125,3 @@ class TestUsageFactory(TestCase):
|
||||||
self.assertIsNotNone(appliances.schedules, 'appliances schedule is none')
|
self.assertIsNotNone(appliances.schedules, 'appliances schedule is none')
|
||||||
self.assertIsNotNone(usage_zone.thermal_control.hvac_availability_schedules,
|
self.assertIsNotNone(usage_zone.thermal_control.hvac_availability_schedules,
|
||||||
'control hvac availability is none')
|
'control hvac availability is none')
|
||||||
|
|
||||||
def test_import_hft(self):
|
|
||||||
"""
|
|
||||||
Enrich the city with the usage information from hft and verify it
|
|
||||||
"""
|
|
||||||
file = 'pluto_building.gml'
|
|
||||||
city = self._get_citygml(file)
|
|
||||||
for building in city.buildings:
|
|
||||||
building.function = GeometryHelper.libs_function_from_pluto(building.function)
|
|
||||||
|
|
||||||
UsageFactory('hft', city).enrich()
|
|
||||||
self._check_buildings(city)
|
|
||||||
for building in city.buildings:
|
|
||||||
for internal_zone in building.internal_zones:
|
|
||||||
self.assertIsNot(len(internal_zone.usages), 0, 'no building usage_zones defined')
|
|
||||||
for usage_zone in internal_zone.usages:
|
|
||||||
self._check_usage_zone(usage_zone)
|
|
||||||
self.assertIsNone(usage_zone.mechanical_air_change, 'mechanical air change is not none')
|
|
||||||
self.assertIsNotNone(usage_zone.thermal_control.heating_set_point_schedules,
|
|
||||||
'control heating set point schedule is none')
|
|
||||||
self.assertIsNotNone(usage_zone.thermal_control.cooling_set_point_schedules,
|
|
||||||
'control cooling set point schedule is none')
|
|
||||||
self.assertIsNotNone(usage_zone.occupancy, 'occupancy is none')
|
|
||||||
occupancy = usage_zone.occupancy
|
|
||||||
self.assertIsNotNone(occupancy.occupancy_density, 'occupancy density is none')
|
|
||||||
self.assertIsNone(occupancy.latent_internal_gain, 'occupancy latent internal gain is none')
|
|
||||||
self.assertIsNone(occupancy.sensible_convective_internal_gain,
|
|
||||||
'occupancy sensible convective internal gain is not none')
|
|
||||||
self.assertIsNone(occupancy.sensible_radiative_internal_gain,
|
|
||||||
'occupancy sensible radiant internal gain is not none')
|
|
||||||
self.assertIsNone(occupancy.occupancy_schedules, 'occupancy schedule is not none')
|
|
||||||
self.assertIsNone(occupancy.occupants, 'occupancy density is not none')
|
|
||||||
self.assertIsNone(usage_zone.lighting, 'lighting is not none')
|
|
||||||
self.assertIsNone(usage_zone.appliances, 'appliances is not none')
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user