system_assignation/city_model_structure/building_demand/occupancy.py

125 lines
3.2 KiB
Python
Raw Normal View History

2022-03-08 19:19:52 -05:00
"""
Occupancy module
SPDX - License - Identifier: LGPL - 3.0 - or -later
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
self._sensible_radiative_internal_gain = None
2022-03-08 19:19:52 -05:00
self._latent_internal_gain = None
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 persons per m2
2022-03-08 19:19:52 -05:00
:return: None or float
"""
return self._occupancy_density
@occupancy_density.setter
def occupancy_density(self, value):
"""
Set density in persons per m2
2022-03-08 19:19:52 -05:00
: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
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
"""
return self._sensible_radiative_internal_gain
2022-03-08 19:19:52 -05: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:
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
def occupancy_schedules(self) -> Union[None, List[Schedule]]:
2022-03-08 19:19:52 -05:00
"""
Get occupancy schedules
dataType = fraction
:return: None or [Schedule]
2022-03-08 19:19:52 -05:00
"""
return self._occupancy_schedules
2022-03-08 19:19:52 -05:00
@occupancy_schedules.setter
def occupancy_schedules(self, value):
2022-03-08 19:19:52 -05:00
"""
Set occupancy schedules
dataType = fraction
:param value: [Schedule]
2022-03-08 19:19:52 -05: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