Merge remote-tracking branch 'origin/master'

This commit is contained in:
Pilar 2021-09-01 15:14:50 -04:00
commit 7bb775f92a
8 changed files with 20 additions and 17 deletions

View File

@ -5,8 +5,9 @@ Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@conc
Contributor Milad milad.aghamohamadnia@concordia.ca Contributor Milad milad.aghamohamadnia@concordia.ca
""" """
import uuid import uuid
from typing import List from typing import List, TypeVar
from city_model_structure.attributes.node import Node
UsageZone = TypeVar('Node')
class Edge: class Edge:

View File

@ -6,9 +6,9 @@ Contributor Milad milad.aghamohamadnia@concordia.ca
""" """
import uuid import uuid
from typing import List from typing import List, TypeVar
from city_model_structure.attributes.edge import Edge
UsageZone = TypeVar('Edge')
class Node: class Node:
""" """

View File

@ -217,7 +217,7 @@ class Polyhedron:
return self._min_x return self._min_x
@property @property
def centroid(self) -> [float]: def centroid(self) -> List[float]:
""" """
Get polyhedron centroid Get polyhedron centroid
:return: [x,y,z] :return: [x,y,z]

View File

@ -59,9 +59,10 @@ class Building(CityObject):
self._internal_walls.append(surface) self._internal_walls.append(surface)
@property @property
def grounds(self) -> [Surface]: def grounds(self) -> List[Surface]:
""" """
Get building ground surfaces Get building ground surfaces
:return: [Surface]
""" """
return self._grounds return self._grounds
@ -88,7 +89,7 @@ class Building(CityObject):
return False return False
@property @property
def roofs(self) -> [Surface]: def roofs(self) -> List[Surface]:
""" """
Get building roof surfaces Get building roof surfaces
:return: [Surface] :return: [Surface]
@ -96,7 +97,7 @@ class Building(CityObject):
return self._roofs return self._roofs
@property @property
def walls(self) -> [Surface]: def walls(self) -> List[Surface]:
""" """
Get building wall surfaces Get building wall surfaces
:return: [Surface] :return: [Surface]
@ -286,7 +287,7 @@ class Building(CityObject):
return self._eave_height return self._eave_height
@property @property
def storeys(self) -> [Storey]: def storeys(self) -> List[Storey]:
""" """
Get building storeys Get building storeys
:return: [Storey] :return: [Storey]

View File

@ -122,7 +122,7 @@ class CityObject:
return None return None
@property @property
def centroid(self): def centroid(self) -> List[float]:
""" """
Get city object centroid Get city object centroid
:return: [x,y,z] :return: [x,y,z]

View File

@ -68,6 +68,6 @@ class Sensor:
@property @property
def measures(self): def measures(self):
""" """
Sensor measures Raises not implemented error
""" """
raise NotImplementedError raise NotImplementedError

View File

@ -5,13 +5,14 @@ Copyright © 2020 Project
""" """
import pandas as pd import pandas as pd
import parseidf import parseidf
import xmltodict
class DoeIdf: class DoeIdf:
""" """
Idf factory to import schedules into the data model Idf factory to import schedules into the data model
""" """
idf_schedule_to_commet_schedule = {'BLDG_LIGHT_SCH': 'Lights', idf_schedule_to_comnet_schedule = {'BLDG_LIGHT_SCH': 'Lights',
'BLDG_OCC_SCH_wo_SB': 'Occupancy', 'BLDG_OCC_SCH_wo_SB': 'Occupancy',
'BLDG_EQUIP_SCH': 'Equipment', 'BLDG_EQUIP_SCH': 'Equipment',
'ACTIVITY_SCH': 'Activity', 'ACTIVITY_SCH': 'Activity',
@ -44,8 +45,8 @@ class DoeIdf:
def _load_schedule(self, idf, building_usage): def _load_schedule(self, idf, building_usage):
schedules_day = {} schedules_day = {}
for compact_schedule in idf[self._SCHEDULE_COMPACT_TYPE]: for compact_schedule in idf[self._SCHEDULE_COMPACT_TYPE]:
if compact_schedule[self._SCHEDULE_TYPE_NAME] in self.idf_schedule_to_commet_schedule: if compact_schedule[self._SCHEDULE_TYPE_NAME] in self.idf_schedule_to_comnet_schedule:
schedule_type = self.idf_schedule_to_commet_schedule[compact_schedule[self._SCHEDULE_TYPE_NAME]] schedule_type = self.idf_schedule_to_comnet_schedule[compact_schedule[self._SCHEDULE_TYPE_NAME]]
else: else:
continue continue
days_index = [] days_index = []