From 0848339725ea95ede56e2938eb95cb1e4b055d8e Mon Sep 17 00:00:00 2001 From: SanamDabirian Date: Tue, 20 Oct 2020 11:28:21 -0400 Subject: [PATCH] Add schedule_value class for occupancy --- city_model_structure/building.py | 17 ++++++++++++- city_model_structure/schedule_values.py | 34 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 city_model_structure/schedule_values.py diff --git a/city_model_structure/building.py b/city_model_structure/building.py index d99b8a9b..4cf33191 100644 --- a/city_model_structure/building.py +++ b/city_model_structure/building.py @@ -25,7 +25,7 @@ class Building(CityObject): Building(CityObject) class """ 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) self._basement_heated = basement_heated self._attic_heated = attic_heated @@ -43,6 +43,13 @@ class Building(CityObject): self._monthly_cooling = pd.DataFrame() self._hourly_heating = pd.DataFrame() self._hourly_cooling = pd.DataFrame() + self._week_day_schedules = [] + self._saturday_schedules = [] + self._sunday_schedules = [] + + + + # ToDo: Check this for LOD4 self._thermal_zones = [] @@ -337,3 +344,11 @@ class Building(CityObject): :param value: DataFrame(cooling demand) """ 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 \ No newline at end of file diff --git a/city_model_structure/schedule_values.py b/city_model_structure/schedule_values.py new file mode 100644 index 00000000..cc019421 --- /dev/null +++ b/city_model_structure/schedule_values.py @@ -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 \ No newline at end of file