288 lines
6.6 KiB
Python
288 lines
6.6 KiB
Python
"""
|
|
UsageZone module
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
|
Contributors Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
|
"""
|
|
from typing import List
|
|
from city_model_structure.attributes.internal_gains import InternalGains
|
|
from helpers.configuration_helper import ConfigurationHelper
|
|
from city_model_structure.attributes.lighting import Lighting
|
|
|
|
|
|
class UsageZone:
|
|
"""
|
|
UsageZone class
|
|
"""
|
|
def __init__(self):
|
|
self._usage = None
|
|
self._internal_gains = None
|
|
self._heating_setpoint = None
|
|
self._heating_setback = None
|
|
self._cooling_setpoint = None
|
|
self._occupancy_density = None
|
|
self._hours_day = None
|
|
self._days_year = None
|
|
self._dhw_average_volume_pers_day = None
|
|
self._dhw_preparation_temperature = None
|
|
self._electrical_app_average_consumption_sqm_year = None
|
|
# todo: mechanical_air_change must come from library, talk to Rabeeh
|
|
# todo: check to code clean and un used attributes
|
|
self._mechanical_air_change = ConfigurationHelper().min_air_change
|
|
self._occupancy = None
|
|
self._schedules = None
|
|
self._heating_schedule = None
|
|
self._lights = None
|
|
|
|
@property
|
|
def lights(self) -> List[Lighting]:
|
|
return self._lights
|
|
|
|
@property
|
|
def internal_gains(self) -> List[InternalGains]:
|
|
"""
|
|
Get usage zone internal gains
|
|
:return: [InternalGains]
|
|
"""
|
|
return self._internal_gains
|
|
|
|
@internal_gains.setter
|
|
def internal_gains(self, value):
|
|
"""
|
|
Set usage zone internal gains
|
|
:param value: [InternalGains]
|
|
:return: None
|
|
"""
|
|
self._internal_gains = value
|
|
|
|
@property
|
|
def heating_setpoint(self):
|
|
"""
|
|
Get usage zone heating set point in celsius grads
|
|
:return: float
|
|
"""
|
|
return self._heating_setpoint
|
|
|
|
@heating_setpoint.setter
|
|
def heating_setpoint(self, value):
|
|
"""
|
|
Set usage zone heating set point in celsius grads
|
|
:param value: float
|
|
:return: None
|
|
"""
|
|
self._heating_setpoint = value
|
|
|
|
@property
|
|
def heating_setback(self):
|
|
"""
|
|
Get usage zone heating setback in celsius grads
|
|
:return: float
|
|
"""
|
|
return self._heating_setback
|
|
|
|
@heating_setback.setter
|
|
def heating_setback(self, value):
|
|
"""
|
|
Set usage zone heating setback in celsius grads
|
|
:param value: float
|
|
:return: None
|
|
"""
|
|
self._heating_setback = value
|
|
|
|
@property
|
|
def cooling_setpoint(self):
|
|
"""
|
|
Get usage zone cooling setpoint in celsius grads
|
|
:return: float
|
|
"""
|
|
return self._cooling_setpoint
|
|
|
|
@cooling_setpoint.setter
|
|
def cooling_setpoint(self, value):
|
|
"""
|
|
Set usage zone cooling setpoint in celsius grads
|
|
:param value: float
|
|
:return: None
|
|
"""
|
|
self._cooling_setpoint = value
|
|
|
|
@property
|
|
def hours_day(self):
|
|
"""
|
|
Get usage zone usage hours per day
|
|
:return: float
|
|
"""
|
|
return self._hours_day
|
|
|
|
@hours_day.setter
|
|
def hours_day(self, value):
|
|
"""
|
|
Set usage zone usage hours per day
|
|
:param value: float
|
|
:return: float
|
|
"""
|
|
self._hours_day = value
|
|
|
|
@property
|
|
def days_year(self):
|
|
"""
|
|
Get usage zone usage days per year
|
|
:return: float
|
|
"""
|
|
return self._days_year
|
|
|
|
@days_year.setter
|
|
def days_year(self, value):
|
|
"""
|
|
Set usage zone usage days per year
|
|
:param value: float
|
|
:return: None
|
|
"""
|
|
self._days_year = value
|
|
|
|
@property
|
|
def mechanical_air_change(self):
|
|
"""
|
|
Set usage zone mechanical air change in air change per hour
|
|
:return: float
|
|
"""
|
|
return self._mechanical_air_change
|
|
|
|
@mechanical_air_change.setter
|
|
def mechanical_air_change(self, value):
|
|
"""
|
|
Get usage zone mechanical air change in air change per hour
|
|
:param value: float
|
|
:return: None
|
|
"""
|
|
self._mechanical_air_change = value
|
|
|
|
@property
|
|
def usage(self):
|
|
"""
|
|
Get usage zone usage
|
|
:return: str
|
|
"""
|
|
return self._usage
|
|
|
|
@usage.setter
|
|
def usage(self, value):
|
|
"""
|
|
Get usage zone usage
|
|
:param value: str
|
|
:return: None
|
|
"""
|
|
self._usage = value
|
|
|
|
@property
|
|
def occupancy(self):
|
|
"""
|
|
Get occupancy data
|
|
:return: [Occupancy]
|
|
"""
|
|
return self._occupancy
|
|
|
|
@occupancy.setter
|
|
def occupancy(self, values):
|
|
"""
|
|
Set occupancy
|
|
:param values: [Occupancy]
|
|
"""
|
|
self._occupancy = values
|
|
|
|
@property
|
|
def schedules(self):
|
|
"""
|
|
Get schedules
|
|
:return: [Schedule_Values]
|
|
"""
|
|
return self._schedules
|
|
|
|
@schedules.setter
|
|
def schedules(self, value):
|
|
"""
|
|
occupancy schedules
|
|
:param value: schedules
|
|
"""
|
|
self._schedules = value
|
|
|
|
@property
|
|
def heating_schedule(self):
|
|
"""
|
|
Get heating schedule
|
|
:return: dict{DtaFrame(int)}
|
|
"""
|
|
return self._heating_schedule
|
|
|
|
@heating_schedule.setter
|
|
def heating_schedule(self, values):
|
|
"""
|
|
heating schedule
|
|
:param values: dict{DtaFrame(int)}
|
|
"""
|
|
self._heating_schedule = values
|
|
|
|
@property
|
|
def occupancy_density(self):
|
|
"""
|
|
Get occupancy density in persons per m2
|
|
:return: float
|
|
"""
|
|
return self._occupancy_density
|
|
|
|
@occupancy_density.setter
|
|
def occupancy_density(self, values):
|
|
"""
|
|
occupancy density in persons per m2
|
|
:param values: float
|
|
"""
|
|
self._occupancy_density = values
|
|
|
|
@property
|
|
def dhw_average_volume_pers_day(self):
|
|
"""
|
|
Get average DHW consumption in liters per person per day
|
|
:return: float
|
|
"""
|
|
return self._dhw_average_volume_pers_day
|
|
|
|
@dhw_average_volume_pers_day.setter
|
|
def dhw_average_volume_pers_day(self, values):
|
|
"""
|
|
average DHW consumption in liters per person per day
|
|
:param values: float
|
|
"""
|
|
self._dhw_average_volume_pers_day = values
|
|
|
|
@property
|
|
def dhw_preparation_temperature(self):
|
|
"""
|
|
Get preparation temperature of the DHW in degree Celsius
|
|
:return: float
|
|
"""
|
|
return self._dhw_preparation_temperature
|
|
|
|
@dhw_preparation_temperature.setter
|
|
def dhw_preparation_temperature(self, values):
|
|
"""
|
|
preparation temperature of the DHW in degree Celsius
|
|
:param values: float
|
|
"""
|
|
self._dhw_preparation_temperature = values
|
|
|
|
@property
|
|
def electrical_app_average_consumption_sqm_year(self):
|
|
"""
|
|
Get average consumption of electrical appliances in kiloWatts hour per m2 and year (kWh/m2yr)
|
|
:return: float
|
|
"""
|
|
return self._electrical_app_average_consumption_sqm_year
|
|
|
|
@electrical_app_average_consumption_sqm_year.setter
|
|
def electrical_app_average_consumption_sqm_year(self, values):
|
|
"""
|
|
average consumption of electrical appliances in kiloWatts hour per m2 and year (kWh/m2yr)
|
|
:param values: float
|
|
"""
|
|
self._electrical_app_average_consumption_sqm_year = values
|