Cluster class defined

This commit is contained in:
sanam 2023-09-29 14:53:37 -04:00
parent 286e5c190c
commit 72e14799fe
2 changed files with 37 additions and 8 deletions

View File

@ -12,12 +12,14 @@ class Archetype:
""" """
def __init__(self, archetype_id, def __init__(self, archetype_id,
name, name,
function, building_type,
building_subtype,
climate_zone climate_zone
): ):
self._id = archetype_id self._id = archetype_id
self._name = name self._name = name
self._function = function self._building_type = building_type
self._building_subtype = building_subtype
self._climate_zone = climate_zone self._climate_zone = climate_zone
self._clusters = clusters self._clusters = clusters
@ -38,12 +40,20 @@ class Archetype:
return self._name return self._name
@property @property
def function(self): def building_type(self):
""" """
Get archetype function Get archetype type
:return: str :return: str
""" """
return self._function return self._building_type
@property
def building_subtype(self):
"""
Get archetype type
:return: str
"""
return self._building_subtype
@property @property
def climate_zone(self): def climate_zone(self):
@ -58,7 +68,8 @@ class Archetype:
_stochastic_schedule = [] _stochastic_schedule = []
content = {'Archetype': {'id': self.id, content = {'Archetype': {'id': self.id,
'name': self.name, 'name': self.name,
'function': self.function, 'building_type': self.building_type,
'building_subtype': self.building_subtype,
'climate zone': self.climate_zone 'climate zone': self.climate_zone
} }
} }

View File

@ -1,14 +1,32 @@
"""
Stochastic_occupancy catalog Clusters
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca
"""
from hub.catalog_factories.data_models.usages.schedule import Schedule from hub.catalog_factories.data_models.usages.schedule import Schedule
class Cluster: class Cluster:
""" """
Archetype class Clusters class
""" """
def __init__(self): def __init__(self, day_type,
schedules
):
self._day_type = day_type self._day_type = day_type
self._schedules = schedules self._schedules = schedules
@property
def day_type(self):
"""
Get type of day (Weekday or Weekend)
:return: str
"""
return self._day_type
@property @property
def schedules(self) -> [Schedule]: def schedules(self) -> [Schedule]:
return self._schedules return self._schedules