From 9094c286c4a742e3a38ddfae54d0c83b193084cc Mon Sep 17 00:00:00 2001 From: sanam Date: Thu, 10 Aug 2023 10:04:59 -0400 Subject: [PATCH 1/7] new branch created --- .idea/.gitignore | 3 ++ .idea/hub.iml | 12 ++++++++ .idea/inspectionProfiles/Project_Default.xml | 30 +++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/misc.xml | 4 +++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ .../stochastic_occupancy_model/archetype.py | 8 +++++ 8 files changed, 77 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/hub.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/hub.iml b/.idea/hub.iml new file mode 100644 index 00000000..8b8c3954 --- /dev/null +++ b/.idea/hub.iml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..0c6593c6 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,30 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..ef318927 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..8d1428ff --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py b/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py new file mode 100644 index 00000000..86e895fe --- /dev/null +++ b/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py @@ -0,0 +1,8 @@ +""" +Energy System catalog archetype +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2023 Concordia CERC group +Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca +""" + +import \ No newline at end of file From 02a03b8239b7ea44f6c98374de7fff189c6ddbd7 Mon Sep 17 00:00:00 2001 From: sanam Date: Thu, 10 Aug 2023 11:23:23 -0400 Subject: [PATCH 2/7] new directory created --- .../data_models/stochastic_occupancy_model/archetype.py | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py diff --git a/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py b/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py deleted file mode 100644 index 86e895fe..00000000 --- a/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py +++ /dev/null @@ -1,8 +0,0 @@ -""" -Energy System catalog archetype -SPDX - License - Identifier: LGPL - 3.0 - or -later -Copyright © 2023 Concordia CERC group -Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca -""" - -import \ No newline at end of file From e1ca39950fef287e875c4d4ea66acba0bcdf7e55 Mon Sep 17 00:00:00 2001 From: sanam Date: Thu, 10 Aug 2023 11:25:40 -0400 Subject: [PATCH 3/7] new directory created --- .../stochastic_occupancy_model/archetype.py | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py diff --git a/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py b/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py new file mode 100644 index 00000000..3397c4bf --- /dev/null +++ b/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py @@ -0,0 +1,155 @@ +""" +Construction catalog Archetype +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + +from hub.catalog_factories.data_models.construction.construction import Construction + + +class Archetype: + """ + Archetype class + """ + def __init__(self, archetype_id, + name, + function, + climate_zone, + construction_period, + constructions, + average_storey_height, + thermal_capacity, + extra_loses_due_to_thermal_bridges, + indirect_heated_ratio, + infiltration_rate_for_ventilation_system_off, + infiltration_rate_for_ventilation_system_on): + self._id = archetype_id + self._name = name + self._function = function + self._climate_zone = climate_zone + self._construction_period = construction_period + self._constructions = constructions + self._average_storey_height = average_storey_height + self._thermal_capacity = thermal_capacity + self._extra_loses_due_to_thermal_bridges = extra_loses_due_to_thermal_bridges + self._indirect_heated_ratio = indirect_heated_ratio + self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off + self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on + + @property + def id(self): + """ + Get archetype id + :return: str + """ + return self._id + + @property + def name(self): + """ + Get archetype name + :return: str + """ + return self._name + + @property + def function(self): + """ + Get archetype function + :return: str + """ + return self._function + + @property + def climate_zone(self): + """ + Get archetype climate zone + :return: str + """ + return self._climate_zone + + @property + def constructions(self) -> [Construction]: + """ + Get archetype constructions + :return: [Construction] + """ + return self._constructions + + @property + def construction_period(self): + """ + Get archetype construction period + :return: str + """ + return self._construction_period + + @property + def average_storey_height(self): + """ + Get archetype average storey height in m + :return: float + """ + return self._average_storey_height + + @property + def thermal_capacity(self): + """ + Get archetype thermal capacity in J/m3K + :return: float + """ + return self._thermal_capacity + + @property + def extra_loses_due_to_thermal_bridges(self): + """ + Get archetype extra loses due to thermal bridges in W/m2K + :return: float + """ + return self._extra_loses_due_to_thermal_bridges + + @property + def indirect_heated_ratio(self): + """ + Get archetype indirect heated area ratio + :return: float + """ + return self._indirect_heated_ratio + + @property + def infiltration_rate_for_ventilation_system_off(self): + """ + Get archetype infiltration rate for ventilation system off in 1/s + :return: float + """ + return self._infiltration_rate_for_ventilation_system_off + + @property + def infiltration_rate_for_ventilation_system_on(self): + """ + Get archetype infiltration rate for ventilation system on in 1/s + :return: float + """ + return self._infiltration_rate_for_ventilation_system_on + + def to_dictionary(self): + """Class content to dictionary""" + _constructions = [] + for _construction in self.constructions: + _constructions.append(_construction.to_dictionary()) + content = {'Archetype': {'id': self.id, + 'name': self.name, + 'function': self.function, + 'climate zone': self.climate_zone, + 'period of construction': self.construction_period, + 'average storey height [m]': self.average_storey_height, + 'thermal capacity [J/m3K]': self.thermal_capacity, + 'extra loses due to thermal bridges [W/m2K]': self.extra_loses_due_to_thermal_bridges, + 'indirect heated ratio': self.indirect_heated_ratio, + 'infiltration rate for ventilation off [1/s]': self.infiltration_rate_for_ventilation_system_off, + 'infiltration rate for ventilation on [1/s]': self.infiltration_rate_for_ventilation_system_on, + 'constructions': _constructions + } + } + return content From a3028221e32f8c78ff38e0235bd2629e7dd7776c Mon Sep 17 00:00:00 2001 From: p_monsalvete Date: Fri, 11 Aug 2023 10:17:02 -0400 Subject: [PATCH 4/7] added .gitignore to always ignore .idea --- .idea/.gitignore => .gitignore | 3 +- .idea/hub.iml | 12 -------- .idea/inspectionProfiles/Project_Default.xml | 30 ------------------- .../inspectionProfiles/profiles_settings.xml | 6 ---- .idea/misc.xml | 4 --- .idea/modules.xml | 8 ----- .idea/vcs.xml | 6 ---- 7 files changed, 1 insertion(+), 68 deletions(-) rename .idea/.gitignore => .gitignore (51%) delete mode 100644 .idea/hub.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.gitignore similarity index 51% rename from .idea/.gitignore rename to .gitignore index 26d33521..fd31855a 100644 --- a/.idea/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ # Default ignored files -/shelf/ -/workspace.xml +.idea \ No newline at end of file diff --git a/.idea/hub.iml b/.idea/hub.iml deleted file mode 100644 index 8b8c3954..00000000 --- a/.idea/hub.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 0c6593c6..00000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da..00000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index ef318927..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 8d1428ff..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7f..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 482c06e4c27b9a94c490476115826f13690143bc Mon Sep 17 00:00:00 2001 From: sanam Date: Wed, 20 Sep 2023 11:30:41 -0400 Subject: [PATCH 5/7] new class created --- .../stochastic_occupancy_model/archetype.py | 105 +++--------------- .../data_models/usages/lighting.py | 2 +- 2 files changed, 15 insertions(+), 92 deletions(-) diff --git a/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py b/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py index 3397c4bf..71d597d1 100644 --- a/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py +++ b/hub/catalog_factories/data_models/stochastic_occupancy_model/archetype.py @@ -1,11 +1,10 @@ """ -Construction catalog Archetype +Stochastic_occupancy catalog Archetype SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2022 Concordia CERC group -Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca """ -from hub.catalog_factories.data_models.construction.construction import Construction class Archetype: @@ -15,27 +14,14 @@ class Archetype: def __init__(self, archetype_id, name, function, - climate_zone, - construction_period, - constructions, - average_storey_height, - thermal_capacity, - extra_loses_due_to_thermal_bridges, - indirect_heated_ratio, - infiltration_rate_for_ventilation_system_off, - infiltration_rate_for_ventilation_system_on): + climate_zone, stochastic_schedule + ): self._id = archetype_id self._name = name self._function = function self._climate_zone = climate_zone - self._construction_period = construction_period - self._constructions = constructions - self._average_storey_height = average_storey_height - self._thermal_capacity = thermal_capacity - self._extra_loses_due_to_thermal_bridges = extra_loses_due_to_thermal_bridges - self._indirect_heated_ratio = indirect_heated_ratio - self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off - self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on + self._stochastic_schedule + @property def id(self): @@ -70,86 +56,23 @@ class Archetype: return self._climate_zone @property - def constructions(self) -> [Construction]: + def stchastic_schedule(self): """ - Get archetype constructions - :return: [Construction] + Get stochastic schedules from the code + :return: schedule """ - return self._constructions - - @property - def construction_period(self): - """ - Get archetype construction period - :return: str - """ - return self._construction_period - - @property - def average_storey_height(self): - """ - Get archetype average storey height in m - :return: float - """ - return self._average_storey_height - - @property - def thermal_capacity(self): - """ - Get archetype thermal capacity in J/m3K - :return: float - """ - return self._thermal_capacity - - @property - def extra_loses_due_to_thermal_bridges(self): - """ - Get archetype extra loses due to thermal bridges in W/m2K - :return: float - """ - return self._extra_loses_due_to_thermal_bridges - - @property - def indirect_heated_ratio(self): - """ - Get archetype indirect heated area ratio - :return: float - """ - return self._indirect_heated_ratio - - @property - def infiltration_rate_for_ventilation_system_off(self): - """ - Get archetype infiltration rate for ventilation system off in 1/s - :return: float - """ - return self._infiltration_rate_for_ventilation_system_off - - @property - def infiltration_rate_for_ventilation_system_on(self): - """ - Get archetype infiltration rate for ventilation system on in 1/s - :return: float - """ - return self._infiltration_rate_for_ventilation_system_on + return self._stochastic_schedule def to_dictionary(self): """Class content to dictionary""" - _constructions = [] - for _construction in self.constructions: - _constructions.append(_construction.to_dictionary()) + _stochastic_schedule = [] + for _stochastic_schedule in self.stochastic_schedule: + _stochastic_schedule.append(_stochastic_schedule.to_dictionary()) content = {'Archetype': {'id': self.id, 'name': self.name, 'function': self.function, 'climate zone': self.climate_zone, - 'period of construction': self.construction_period, - 'average storey height [m]': self.average_storey_height, - 'thermal capacity [J/m3K]': self.thermal_capacity, - 'extra loses due to thermal bridges [W/m2K]': self.extra_loses_due_to_thermal_bridges, - 'indirect heated ratio': self.indirect_heated_ratio, - 'infiltration rate for ventilation off [1/s]': self.infiltration_rate_for_ventilation_system_off, - 'infiltration rate for ventilation on [1/s]': self.infiltration_rate_for_ventilation_system_on, - 'constructions': _constructions + 'stochastic_schedule': self.stochastic_schedule } } return content diff --git a/hub/catalog_factories/data_models/usages/lighting.py b/hub/catalog_factories/data_models/usages/lighting.py index 2d9420fe..fafd5ab1 100644 --- a/hub/catalog_factories/data_models/usages/lighting.py +++ b/hub/catalog_factories/data_models/usages/lighting.py @@ -54,7 +54,7 @@ class Lighting: return self._latent_fraction @property - def schedules(self) -> Union[None, List[Schedule]]: + def schedules(self) -> Union[None, List[Schedule], List[Stochastic_Schedule]]: """ Get schedules dataType = fraction From bf004f9e18c8a3a437a9b762593a24863cb02f89 Mon Sep 17 00:00:00 2001 From: sanam Date: Thu, 21 Sep 2023 14:33:13 -0400 Subject: [PATCH 6/7] Stochastic schedule folder created --- .../stochastic_occupancy_model/stochastic_schedule | 0 .../stochastic_occupancy_model/stochastic_schedule.py | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule create mode 100644 hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py diff --git a/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule b/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule new file mode 100644 index 00000000..e69de29b diff --git a/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py b/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py new file mode 100644 index 00000000..23e6ea23 --- /dev/null +++ b/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py @@ -0,0 +1,7 @@ +""" +Stochastic_occupancy catalog stochastic schedules +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2022 Concordia CERC group +Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca +""" + From 12d20f2d7a6ca7c706c14b45b79d07e1205857fa Mon Sep 17 00:00:00 2001 From: sanam Date: Fri, 22 Sep 2023 09:42:10 -0400 Subject: [PATCH 7/7] Stochastic schedule folder created --- .../stochastic_schedule.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py b/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py index 23e6ea23..6df529a0 100644 --- a/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py +++ b/hub/catalog_factories/data_models/stochastic_occupancy_model/stochastic_schedule.py @@ -5,3 +5,15 @@ Copyright © 2022 Concordia CERC group Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca """ +class StochasticSchedules: + """ + Schedule class + """ + + def __init__(self, schedule_type, values, data_type, time_step, time_range, day_types): + self._type = schedule_type + self._values = values + self._data_type = data_type + self._time_step = time_step + self._time_range = time_range + self._day_types = day_types \ No newline at end of file