Merge remote-tracking branch 'origin/master'

This commit is contained in:
SanamDabirian 2020-10-16 12:11:17 -04:00
commit 7f9f99cb3b

View File

@ -10,6 +10,7 @@ import numpy as np
from matplotlib import pylab
from shapely import ops
from shapely.geometry import MultiPolygon
import pandas as pd
from city_model_structure.surface import Surface
from city_model_structure.thermal_boundary import ThermalBoundary
@ -36,7 +37,12 @@ class Building(CityObject):
self._storeys_above_ground = None
self._foot_print = None
self._usage_zones = []
self._building_units = []
self._type = 'building'
self._monthly_heating = pd.DataFrame()
self._monthly_cooling = pd.DataFrame()
self._hourly_heating = pd.DataFrame()
self._hourly_cooling = pd.DataFrame()
# ToDo: Check this for LOD4
self._thermal_zones = []
@ -265,6 +271,69 @@ class Building(CityObject):
"""
Building units
:param value: [BuildingUnit]
:return: List of building units
"""
self._building_units = value
@property
def monthly_heating(self) -> pd.DataFrame:
"""
building monthly heating values in Watts-hour
:return: DataFrame with 12 values and a header with the source of those
"""
return self._monthly_heating
@monthly_heating.setter
def monthly_heating(self, value):
"""
building monthly heating values in Watts-hour and a header with the source
:param value: DataFrame(heating demand)
"""
self._monthly_heating.append(value)
@property
def monthly_cooling(self) -> pd.DataFrame:
"""
building monthly cooling values in Watts-hour
:return: DataFrame with 12 values and a header with the source of those
"""
return self._monthly_cooling
@monthly_cooling.setter
def monthly_cooling(self, value):
"""
building monthly cooling values in Watts-hour and a header with the source
:param value: DataFrame(cooling demand)
"""
self._monthly_cooling.append(value)
@property
def hourly_heating(self) -> pd.DataFrame:
"""
building hourly heating values in Watts-hour
:return: DataFrame with 8760 values and a header with the source of those
"""
return self._hourly_heating
@hourly_heating.setter
def hourly_heating(self, value):
"""
building hourly heating values in Watts-hour and a header with the source
:param value: DataFrame(heating demand)
"""
self._hourly_heating.append(value)
@property
def hourly_cooling(self) -> pd.DataFrame:
"""
building hourly cooling values in Watts-hour
:return: DataFrame with 8760 values and a header with the source of those
"""
return self._hourly_cooling
@hourly_cooling.setter
def hourly_cooling(self, value):
"""
building hourly cooling values in Watts-hour and a header with the source
:param value: DataFrame(cooling demand)
"""
self._hourly_cooling.append(value)