forked from s_ranjbar/city_retrofit
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7bb775f92a
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
"""
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -236,9 +236,9 @@ class Surface:
|
|||
"""
|
||||
Get hole surfaces, a list of hole polygons found in the surface
|
||||
:return: None, [] or [Polygon]
|
||||
None -> not known whether holes exist in reality or not due to low level of detail of input data
|
||||
[] -> no holes in the surface
|
||||
[Polygon] -> one or more holes in the surface
|
||||
None -> not known whether holes exist in reality or not due to low level of detail of input data
|
||||
[] -> no holes in the surface
|
||||
[Polygon] -> one or more holes in the surface
|
||||
"""
|
||||
return self._holes_polygons
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -68,6 +68,6 @@ class Sensor:
|
|||
@property
|
||||
def measures(self):
|
||||
"""
|
||||
Sensor measures
|
||||
Raises not implemented error
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user