2022-03-08 19:19:52 -05:00
|
|
|
"""
|
|
|
|
Occupancy module
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
2022-04-08 09:35:33 -04:00
|
|
|
Copyright © 2022 Concordia CERC group
|
|
|
|
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
2022-03-08 19:19:52 -05:00
|
|
|
"""
|
|
|
|
from typing import Union, List
|
|
|
|
from city_model_structure.attributes.schedule import Schedule
|
|
|
|
from city_model_structure.building_demand.occupant import Occupant
|
|
|
|
|
|
|
|
|
|
|
|
class Occupancy:
|
|
|
|
"""
|
|
|
|
Occupancy class
|
|
|
|
"""
|
|
|
|
def __init__(self):
|
|
|
|
self._occupancy_density = None
|
|
|
|
self._sensible_convective_internal_gain = None
|
2022-03-17 18:49:44 -04:00
|
|
|
self._sensible_radiative_internal_gain = None
|
2022-03-08 19:19:52 -05:00
|
|
|
self._latent_internal_gain = None
|
2022-03-17 18:49:44 -04:00
|
|
|
self._occupancy_schedules = None
|
2022-03-08 19:19:52 -05:00
|
|
|
self._occupants = None
|
|
|
|
|
|
|
|
@property
|
|
|
|
def occupancy_density(self) -> Union[None, float]:
|
|
|
|
"""
|
|
|
|
Get density in m2 per person
|
|
|
|
:return: None or float
|
|
|
|
"""
|
|
|
|
return self._occupancy_density
|
|
|
|
|
|
|
|
@occupancy_density.setter
|
|
|
|
def occupancy_density(self, value):
|
|
|
|
"""
|
|
|
|
Set density in m2 per persons
|
|
|
|
:param value: float
|
|
|
|
"""
|
|
|
|
if value is not None:
|
|
|
|
self._occupancy_density = float(value)
|
|
|
|
|
|
|
|
@property
|
|
|
|
def sensible_convective_internal_gain(self) -> Union[None, float]:
|
|
|
|
"""
|
|
|
|
Get sensible convective internal gain in Watts per m2
|
|
|
|
:return: None or float
|
|
|
|
"""
|
|
|
|
return self._sensible_convective_internal_gain
|
|
|
|
|
|
|
|
@sensible_convective_internal_gain.setter
|
|
|
|
def sensible_convective_internal_gain(self, value):
|
|
|
|
"""
|
|
|
|
Set sensible convective internal gain in Watts per m2
|
|
|
|
:param value: float
|
|
|
|
"""
|
|
|
|
if value is not None:
|
|
|
|
self._sensible_convective_internal_gain = float(value)
|
|
|
|
|
|
|
|
@property
|
2022-03-17 18:49:44 -04:00
|
|
|
def sensible_radiative_internal_gain(self) -> Union[None, float]:
|
2022-03-08 19:19:52 -05:00
|
|
|
"""
|
|
|
|
Get sensible radiant internal gain in Watts per m2
|
|
|
|
:return: None or float
|
|
|
|
"""
|
2022-03-17 18:49:44 -04:00
|
|
|
return self._sensible_radiative_internal_gain
|
2022-03-08 19:19:52 -05:00
|
|
|
|
2022-03-17 18:49:44 -04:00
|
|
|
@sensible_radiative_internal_gain.setter
|
|
|
|
def sensible_radiative_internal_gain(self, value):
|
2022-03-08 19:19:52 -05:00
|
|
|
"""
|
|
|
|
Set sensible radiant internal gain in Watts per m2
|
|
|
|
:param value: float
|
|
|
|
"""
|
|
|
|
if value is not None:
|
2022-03-17 18:49:44 -04:00
|
|
|
self._sensible_radiative_internal_gain = float(value)
|
2022-03-08 19:19:52 -05:00
|
|
|
|
|
|
|
@property
|
|
|
|
def latent_internal_gain(self) -> Union[None, float]:
|
|
|
|
"""
|
|
|
|
Get latent internal gain in Watts per m2
|
|
|
|
:return: None or float
|
|
|
|
"""
|
|
|
|
return self._latent_internal_gain
|
|
|
|
|
|
|
|
@latent_internal_gain.setter
|
|
|
|
def latent_internal_gain(self, value):
|
|
|
|
"""
|
|
|
|
Set latent internal gain in Watts per m2
|
|
|
|
:param value: float
|
|
|
|
"""
|
|
|
|
if value is not None:
|
|
|
|
self._latent_internal_gain = float(value)
|
|
|
|
|
|
|
|
@property
|
2022-03-17 18:49:44 -04:00
|
|
|
def occupancy_schedules(self) -> Union[None, List[Schedule]]:
|
2022-03-08 19:19:52 -05:00
|
|
|
"""
|
2022-03-17 18:49:44 -04:00
|
|
|
Get occupancy schedules
|
|
|
|
:return: None or [Schedule]
|
2022-03-08 19:19:52 -05:00
|
|
|
"""
|
2022-03-17 18:49:44 -04:00
|
|
|
return self._occupancy_schedules
|
2022-03-08 19:19:52 -05:00
|
|
|
|
2022-03-17 18:49:44 -04:00
|
|
|
@occupancy_schedules.setter
|
|
|
|
def occupancy_schedules(self, value):
|
2022-03-08 19:19:52 -05:00
|
|
|
"""
|
2022-03-17 18:49:44 -04:00
|
|
|
Set occupancy schedules
|
|
|
|
:param value: [Schedule]
|
2022-03-08 19:19:52 -05:00
|
|
|
"""
|
2022-03-17 18:49:44 -04:00
|
|
|
self._occupancy_schedules = value
|
2022-03-08 19:19:52 -05:00
|
|
|
|
|
|
|
@property
|
|
|
|
def occupants(self) -> Union[None, List[Occupant]]:
|
|
|
|
"""
|
|
|
|
Get list of occupants
|
|
|
|
:return: None or List of Occupant
|
|
|
|
"""
|
|
|
|
return self._occupants
|
|
|
|
|
|
|
|
@occupants.setter
|
|
|
|
def occupants(self, value):
|
|
|
|
"""
|
|
|
|
Set list of occupants
|
|
|
|
:param value: [Occupant]
|
|
|
|
"""
|
|
|
|
self._occupants = value
|