forked from s_ranjbar/city_retrofit
122 lines
3.1 KiB
Python
122 lines
3.1 KiB
Python
|
"""
|
||
|
Occupancy module
|
||
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||
|
Copyright © 2022 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||
|
"""
|
||
|
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_radiant_internal_gain = None
|
||
|
self._latent_internal_gain = None
|
||
|
self._occupancy_schedule = None
|
||
|
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
|
||
|
def sensible_radiant_internal_gain(self) -> Union[None, float]:
|
||
|
"""
|
||
|
Get sensible radiant internal gain in Watts per m2
|
||
|
:return: None or float
|
||
|
"""
|
||
|
return self._sensible_radiant_internal_gain
|
||
|
|
||
|
@sensible_radiant_internal_gain.setter
|
||
|
def sensible_radiant_internal_gain(self, value):
|
||
|
"""
|
||
|
Set sensible radiant internal gain in Watts per m2
|
||
|
:param value: float
|
||
|
"""
|
||
|
if value is not None:
|
||
|
self._sensible_radiant_internal_gain = float(value)
|
||
|
|
||
|
@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_schedule(self) -> Union[None, Schedule]:
|
||
|
"""
|
||
|
Get occupancy schedule
|
||
|
:return: None or Schedule
|
||
|
"""
|
||
|
return self._occupancy_schedule
|
||
|
|
||
|
@occupancy_schedule.setter
|
||
|
def occupancy_schedule(self, value):
|
||
|
"""
|
||
|
Set occupancy schedule
|
||
|
:param value: Schedule
|
||
|
"""
|
||
|
self._occupancy_schedule = value
|
||
|
|
||
|
@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
|