Compare commits

...

2 Commits

4 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,7 @@ class Surface:
self._short_wave_reflectance = None self._short_wave_reflectance = None
self._long_wave_emittance = None self._long_wave_emittance = None
self._inverse = None self._inverse = None
self._associated_thermal_boundaries = [] self._associated_thermal_boundaries = None
self._vegetation = None self._vegetation = None
self._percentage_shared = None self._percentage_shared = None
self._solar_collectors_area_reduction_factor = None self._solar_collectors_area_reduction_factor = None

View File

@ -54,3 +54,5 @@ class ConstructionFactory:
:return: None :return: None
""" """
getattr(self, self._handler, lambda: None)() getattr(self, self._handler, lambda: None)()
for building in self._city.buildings:
_ = building.thermal_zones_from_internal_zones # ensure internal zones initialization

View File

@ -144,6 +144,6 @@ class TestExports(TestCase):
UsageFactory('nrcan', city).enrich() UsageFactory('nrcan', city).enrich()
WeatherFactory('epw', city).enrich() WeatherFactory('epw', city).enrich()
try: try:
EnergyBuildingsExportsFactory('idf', city, self._output_path).export() EnergyBuildingsExportsFactory('idf', city, self._output_path, target_buildings=[1]).export()
except Exception: except Exception:
self.fail("Idf ExportsFactory raised ExceptionType unexpectedly!") self.fail("Idf ExportsFactory raised ExceptionType unexpectedly!")

View File

@ -93,7 +93,7 @@ class TestGeometryFactory(TestCase):
self.assertIsNone(surface.short_wave_reflectance, 'surface short_wave_reflectance is not none') self.assertIsNone(surface.short_wave_reflectance, 'surface short_wave_reflectance is not none')
self.assertIsNone(surface.long_wave_emittance, 'surface long_wave_emittance is not none') self.assertIsNone(surface.long_wave_emittance, 'surface long_wave_emittance is not none')
self.assertIsNotNone(surface.inverse, 'surface inverse is none') self.assertIsNotNone(surface.inverse, 'surface inverse is none')
self.assertEqual(len(surface.associated_thermal_boundaries), 0, 'associated_thermal_boundaries are assigned') self.assertIsNone(surface.associated_thermal_boundaries, 'associated_thermal_boundaries are assigned')
self.assertIsNone(surface.vegetation, 'surface vegetation is not none') self.assertIsNone(surface.vegetation, 'surface vegetation is not none')
# citygml_classes # citygml_classes