forked from s_ranjbar/city_retrofit
Adding occupancy schedule attributes to building class
This commit is contained in:
parent
ab61e8b244
commit
9e2900ff83
|
@ -18,14 +18,14 @@ from city_model_structure.thermal_zone import ThermalZone
|
||||||
from city_model_structure.usage_zone import UsageZone
|
from city_model_structure.usage_zone import UsageZone
|
||||||
from city_model_structure.city_object import CityObject
|
from city_model_structure.city_object import CityObject
|
||||||
from city_model_structure.building_unit import BuildingUnit
|
from city_model_structure.building_unit import BuildingUnit
|
||||||
|
from city_model_structure.schedule_value import ScheduleValue
|
||||||
|
|
||||||
class Building(CityObject):
|
class Building(CityObject):
|
||||||
"""
|
"""
|
||||||
Building(CityObject) class
|
Building(CityObject) class
|
||||||
"""
|
"""
|
||||||
def __init__(self, name, lod, surfaces, terrains, year_of_construction, function, lower_corner, attic_heated=0,
|
def __init__(self, name, lod, surfaces, terrains, year_of_construction, function, lower_corner, attic_heated=0,
|
||||||
basement_heated=0, week_day_schedules, saturday_schedules, sunday_schedules):
|
basement_heated=0, week_day_schedule, saturday_schedule, sunday_schedule):
|
||||||
super().__init__(lod, surfaces, name)
|
super().__init__(lod, surfaces, name)
|
||||||
self._basement_heated = basement_heated
|
self._basement_heated = basement_heated
|
||||||
self._attic_heated = attic_heated
|
self._attic_heated = attic_heated
|
||||||
|
@ -43,6 +43,9 @@ class Building(CityObject):
|
||||||
self._monthly_cooling = pd.DataFrame()
|
self._monthly_cooling = pd.DataFrame()
|
||||||
self._hourly_heating = pd.DataFrame()
|
self._hourly_heating = pd.DataFrame()
|
||||||
self._hourly_cooling = pd.DataFrame()
|
self._hourly_cooling = pd.DataFrame()
|
||||||
|
self._week_day_schedule = []
|
||||||
|
self._saturday_schedule = []
|
||||||
|
self._sunday_schedule = []
|
||||||
|
|
||||||
# ToDo: Check this for LOD4
|
# ToDo: Check this for LOD4
|
||||||
self._thermal_zones = []
|
self._thermal_zones = []
|
||||||
|
@ -337,3 +340,51 @@ class Building(CityObject):
|
||||||
:param value: DataFrame(cooling demand)
|
:param value: DataFrame(cooling demand)
|
||||||
"""
|
"""
|
||||||
self._hourly_cooling.append(value)
|
self._hourly_cooling.append(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def week_day_schedules(self) -> List[ScheduleValue]:
|
||||||
|
"""
|
||||||
|
Get schedule of weekdays
|
||||||
|
:return: [ScheduleValue]
|
||||||
|
"""
|
||||||
|
return self._week_day_schedule
|
||||||
|
|
||||||
|
@week_day_schedule.setter
|
||||||
|
def week_day_schedule(self, value):
|
||||||
|
"""
|
||||||
|
occupancy schedules of week days
|
||||||
|
:param value: week day schedules
|
||||||
|
"""
|
||||||
|
self._week_day_schedule.append(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def saturday_schedule(self) -> List[ScheduleValue]:
|
||||||
|
"""
|
||||||
|
Get schedule of Saturdays
|
||||||
|
:return: [Saturday Schedule_Values]
|
||||||
|
"""
|
||||||
|
return self._saturday_schedule
|
||||||
|
|
||||||
|
@saturday_schedule.setter
|
||||||
|
def saturday_schedule(self, value):
|
||||||
|
"""
|
||||||
|
occupancy schedules of Saturdays
|
||||||
|
:param value: Saturday schedules
|
||||||
|
"""
|
||||||
|
self._saturday_schedule.append(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def sunday_schedule(self) -> List[ScheduleValue]:
|
||||||
|
"""
|
||||||
|
Get schedule of Sundays
|
||||||
|
:return: [Sundays Schedule_Values]
|
||||||
|
"""
|
||||||
|
return self._sunday_schedule
|
||||||
|
|
||||||
|
@sunday_schedule.setter
|
||||||
|
def sunday_schedule(self, value):
|
||||||
|
"""
|
||||||
|
occupancy schedules of Sundays
|
||||||
|
:param value: Sunday schedules
|
||||||
|
"""
|
||||||
|
self._sunday_schedule.append(value)
|
|
@ -5,7 +5,7 @@ Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class schedule_value:
|
class ScheduleValue:
|
||||||
"""
|
"""
|
||||||
Schedule Values class
|
Schedule Values class
|
||||||
"""
|
"""
|
Loading…
Reference in New Issue
Block a user