bug in function assignment. Dictionaries must be reviewed

This commit is contained in:
Pilar 2022-12-07 11:04:04 -05:00
parent b34b07b161
commit 4080b0ad8f
3 changed files with 3 additions and 36 deletions

View File

@ -197,7 +197,7 @@ class GeometryHelper:
'W1': cte.PRIMARY_SCHOOL,
'W2': cte.PRIMARY_SCHOOL,
'W3': cte.SECONDARY_SCHOOL,
'W4': cte.SECONDARY_SCHOOL,
'W4': cte.EDUCATION,
'W5': cte.SECONDARY_SCHOOL,
'W6': cte.SECONDARY_SCHOOL,
'W7': cte.SECONDARY_SCHOOL,
@ -225,7 +225,7 @@ class GeometryHelper:
'strip mall': cte.STRIP_MALL,
'warehouse': cte.WAREHOUSE,
'primary school': cte.PRIMARY_SCHOOL,
'secondary school': cte.SECONDARY_SCHOOL,
'secondary school': cte.EDUCATION,
'office': cte.MEDIUM_OFFICE,
'large office': cte.LARGE_OFFICE
}

View File

@ -10,6 +10,7 @@ from pathlib import Path
from imports.usage.comnet_usage_parameters import ComnetUsageParameters
from imports.usage.nrcan_usage_parameters import NrcanUsageParameters
class UsageFactory:
"""
UsageFactory class

View File

@ -125,37 +125,3 @@ class TestUsageFactory(TestCase):
self.assertIsNotNone(appliances.schedules, 'appliances schedule is none')
self.assertIsNotNone(usage_zone.thermal_control.hvac_availability_schedules,
'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')