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
"""
import uuid
from typing import List
from city_model_structure.attributes.node import Node
from typing import List, TypeVar
UsageZone = TypeVar('Node')
class Edge:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,13 +5,14 @@ Copyright © 2020 Project
"""
import pandas as pd
import parseidf
import xmltodict
class DoeIdf:
"""
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_EQUIP_SCH': 'Equipment',
'ACTIVITY_SCH': 'Activity',
@ -44,8 +45,8 @@ class DoeIdf:
def _load_schedule(self, idf, building_usage):
schedules_day = {}
for compact_schedule in idf[self._SCHEDULE_COMPACT_TYPE]:
if compact_schedule[self._SCHEDULE_TYPE_NAME] in self.idf_schedule_to_commet_schedule:
schedule_type = self.idf_schedule_to_commet_schedule[compact_schedule[self._SCHEDULE_TYPE_NAME]]
if compact_schedule[self._SCHEDULE_TYPE_NAME] in self.idf_schedule_to_comnet_schedule:
schedule_type = self.idf_schedule_to_comnet_schedule[compact_schedule[self._SCHEDULE_TYPE_NAME]]
else:
continue
days_index = []