Homogenize todos

IDF export now allows the user to select the target and adjacent buildings
 - Only target and adjacent buildings in the city are calculated.
 - All other buildings are considered shade objects.

The zones are properly labeled with the building name
The "Building" is labeled as a city
This commit is contained in:
Guille Gutierrez 2022-11-09 11:42:06 -05:00
parent b81f55b5e5
commit 6473ffd6dc
6 changed files with 7 additions and 10 deletions

View File

@ -170,6 +170,6 @@ Attributes with known units should be explicit in method's comment.
Pending to implement operations should be indicated with ToDo comments to highlight the missing functionality. Pending to implement operations should be indicated with ToDo comments to highlight the missing functionality.
```python ```python
# ToDo: right now extracted at the city level, in the future should be extracted also at building level if exist # todo: right now extracted at the city level, in the future should be extracted also at building level if exist
``` ```

View File

@ -150,7 +150,7 @@ class Building(CityObject):
""" """
Raises not implemented error Raises not implemented error
""" """
# ToDo: this need to be calculated based on the basement and attic heated values # todo: this need to be calculated based on the basement and attic heated values
raise NotImplementedError raise NotImplementedError
@property @property

View File

@ -176,7 +176,7 @@ class HeatPumpExport:
self._input_data["HPDisactivationTemperature"] = self._input_data["HPSupTemp"] - 2 self._input_data["HPDisactivationTemperature"] = self._input_data["HPSupTemp"] - 2
self._input_data["HPReactivationTemperature"] = self._input_data["HPSupTemp"] - 4 self._input_data["HPReactivationTemperature"] = self._input_data["HPSupTemp"] - 4
# compute maximum demand. TODO: This should come from catalog in the future # compute maximum demand. todo: This should come from catalog in the future
max_demand = self._compute_max_demand() max_demand = self._compute_max_demand()
# compute TESCapacity # compute TESCapacity
self._input_data["TESCapacity"] = self._input_data["HoursOfStorageAtMaxDemand"] * (max_demand * 3.6) / ( self._input_data["TESCapacity"] = self._input_data["HoursOfStorageAtMaxDemand"] * (max_demand * 3.6) / (

View File

@ -425,7 +425,7 @@ class Idf:
self._add_shading(building) self._add_shading(building)
else: else:
self._add_block(building) self._add_block(building)
# TODO: this should change to specific variables per zone to process only the ones in the buildings_to_calculate # todo: this should change to specific variables per zone to process only the ones in the buildings_to_calculate
for building in self._target_buildings: for building in self._target_buildings:
continue continue
@ -489,7 +489,7 @@ class Idf:
Diffuse_Visible_Reflectance_of_Unglazed_Part_of_Shading_Surface=visible_reflectance, Diffuse_Visible_Reflectance_of_Unglazed_Part_of_Shading_Surface=visible_reflectance,
Fraction_of_Shading_Surface_That_Is_Glazed=0) Fraction_of_Shading_Surface_That_Is_Glazed=0)
# TODO: Add properties for that name # todo: Add properties for that name
def _add_surfaces(self, building, zone_name): def _add_surfaces(self, building, zone_name):
for internal_zone in building.internal_zones: for internal_zone in building.internal_zones:

View File

@ -103,7 +103,7 @@ class ConstructionHelper:
:param city: str :param city: str
:return: str :return: str
""" """
# ToDo: Dummy function that needs to be implemented # todo: Dummy function that needs to be implemented
reference_city = 'Baltimore' reference_city = 'Baltimore'
if city is not None: if city is not None:
reference_city = 'Baltimore' reference_city = 'Baltimore'

View File

@ -103,10 +103,7 @@ class TestExports(TestCase):
UsageFactory('comnet', city).enrich() UsageFactory('comnet', city).enrich()
try: try:
ExportsFactory('idf', city, self._output_path).export() ExportsFactory('idf', city, self._output_path).export()
ExportsFactory('idf', city, self._output_path, target_buildings=['gml_1066158', 'gml_1']).export() ExportsFactory('idf', city, self._output_path, target_buildings=['gml_1066158', 'gml_1066159']).export()
ExportsFactory('idf', city, self._output_path, target_buildings=['gml_1066158'],
adjacent_buildings=['gml_1']).export()
ExportsFactory('idf', city, self._output_path, target_buildings=['gml_1066158']).export()
except Exception: except Exception:
self.fail("Idf ExportsFactory raised ExceptionType unexpectedly!") self.fail("Idf ExportsFactory raised ExceptionType unexpectedly!")