Merge remote-tracking branch 'origin/Stochastic_occupancy_model' into energy_plus_result_factory

# Conflicts:
#	.gitignore
This commit is contained in:
Pilar Monsalvete 2023-09-25 03:35:51 -04:00
commit e3c9c64e9f
4 changed files with 98 additions and 1 deletions

View File

@ -0,0 +1,78 @@
"""
Stochastic_occupancy catalog Archetype
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Sanam Dabirian sanam.dabirian@mail.concordia.ca
"""
class Archetype:
"""
Archetype class
"""
def __init__(self, archetype_id,
name,
function,
climate_zone, stochastic_schedule
):
self._id = archetype_id
self._name = name
self._function = function
self._climate_zone = climate_zone
self._stochastic_schedule
@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 stchastic_schedule(self):
"""
Get stochastic schedules from the code
:return: schedule
"""
return self._stochastic_schedule
def to_dictionary(self):
"""Class content 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,
'stochastic_schedule': self.stochastic_schedule
}
}
return content

View File

@ -0,0 +1,19 @@
"""
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
"""
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

View File

@ -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