Add schedule_value class for occupancy

This commit is contained in:
SanamDabirian 2020-10-20 11:28:21 -04:00
parent 1b2513692f
commit 0848339725
2 changed files with 50 additions and 1 deletions

View File

@ -25,7 +25,7 @@ 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): basement_heated=0, week_day_schedules, saturday_schedules, sunday_schedules):
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,13 @@ 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_schedules = []
self._saturday_schedules = []
self._sunday_schedules = []
# ToDo: Check this for LOD4 # ToDo: Check this for LOD4
self._thermal_zones = [] self._thermal_zones = []
@ -337,3 +344,11 @@ 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[ScheduleValues]:
"""
Get schedule of weekdays
:return: [Schedule_Values]
"""
return self._week_day_schedules

View File

@ -0,0 +1,34 @@
"""
Building module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca
"""
class schedule_value:
"""
Schedule Values class
"""
def __init__(self, hour, probability):
"""
Constructor
"""
self._hour = hour
self._probability = probability
@property
def hour(self):
"""
Get hours
:return: hour of a day
"""
return self._hour
@property
def probability(self):
"""
Get probabilities of occupants' presence
:return: occupants' presence probabilities
"""
return self._probability