forked from s_ranjbar/city_retrofit
modified monthly values to be a DataFrame and added hourly values
This commit is contained in:
parent
1e94596e1d
commit
dd5b1cee68
|
@ -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
|
||||
|
@ -38,8 +39,10 @@ class Building(CityObject):
|
|||
self._usage_zones = []
|
||||
self._building_units = []
|
||||
self._type = 'building'
|
||||
self._monthly_heating = []
|
||||
self._monthly_cooling = []
|
||||
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 = []
|
||||
|
@ -272,33 +275,65 @@ class Building(CityObject):
|
|||
self._building_units = value
|
||||
|
||||
@property
|
||||
def monthly_heating(self) -> [float]:
|
||||
def monthly_heating(self) -> pd.DataFrame:
|
||||
"""
|
||||
building monthly heating values in Watts-hour
|
||||
:return: List of float (12 values)
|
||||
: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
|
||||
:param value: [heating demand]
|
||||
building monthly heating values in Watts-hour and a header with the source
|
||||
:param value: DataFrame(heating demand)
|
||||
"""
|
||||
self._monthly_heating = value
|
||||
self._monthly_heating.append(value)
|
||||
|
||||
@property
|
||||
def monthly_cooling(self) -> [float]:
|
||||
def monthly_cooling(self) -> pd.DataFrame:
|
||||
"""
|
||||
building monthly cooling values in Watts-hour
|
||||
:return: List of float (12 values)
|
||||
: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
|
||||
:param value: [heating demand]
|
||||
building monthly cooling values in Watts-hour and a header with the source
|
||||
:param value: DataFrame(cooling demand)
|
||||
"""
|
||||
self._monthly_cooling = value
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user