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