api_v1.4/hub_api/mockup/properties.py

268 lines
5.1 KiB
Python
Raw Normal View History

"""
Properties module to be used by mockup building
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
2023-08-08 15:59:06 -04:00
from __future__ import annotations
class EnergySystem:
"""
EnergySystem class
"""
def __init__(self):
self._generation_system = None
self._demand_types = None
@property
2023-08-08 15:59:06 -04:00
def generation_system(self) -> GenerationSystem:
"""
Get building generation system
:return: GenerationSystem
"""
return self._generation_system
@generation_system.setter
def generation_system(self, value):
2023-08-08 15:59:06 -04:00
"""
Set building generation system
:param value: GenerationSystem
"""
self._generation_system = value
@property
def demand_types(self):
2023-08-08 15:59:06 -04:00
"""
Get demand types covered by an energy system
:return: [str]
"""
return self._demand_types
@demand_types.setter
def demand_types(self, value):
2023-08-08 15:59:06 -04:00
"""
Set demand types covered by an energy system
:param value: [str]
"""
self._demand_types = value
class GenerationSystem:
"""
GenerationSystem class
"""
def __init__(self):
self._generic_generation_system = None
@property
2023-08-08 15:59:06 -04:00
def generic_generation_system(self) -> GenericGenerationSystem:
"""
Get generic generation system
:return: GenericGenerationSystem
"""
return self._generic_generation_system
@generic_generation_system.setter
def generic_generation_system(self, value):
2023-08-08 15:59:06 -04:00
"""
Set generic generation system
:param value: GenericGenerationSystem
"""
self._generic_generation_system = value
class GenericGenerationSystem:
"""
GenericGenerationSystem class
"""
def __init__(self):
self._fuel_type = None
@property
def fuel_type(self):
2023-08-08 15:59:06 -04:00
"""
Get fuel type of generic generation system
:return: str
"""
return self._fuel_type
@fuel_type.setter
def fuel_type(self, value):
2023-08-08 15:59:06 -04:00
"""
Set fuel type of generic generation system
:param value: str
"""
self._fuel_type = value
class ThermalZone:
"""
ThermalZone class
"""
def __init__(self):
self._thermal_boundaries = None
self._total_floor_area = None
@property
2023-08-08 15:59:06 -04:00
def thermal_boundaries(self) -> [ThermalBoundary]:
"""
Get thermal boundaries
:return: [ThermalBoundary]
"""
return self._thermal_boundaries
@thermal_boundaries.setter
def thermal_boundaries(self, value):
2023-08-08 15:59:06 -04:00
"""
Set thermal boundaries
:param value: [ThermalBoundary]
"""
self._thermal_boundaries = value
@property
def total_floor_area(self):
2023-08-08 15:59:06 -04:00
"""
Get total floor area in m2
:return: float
"""
return self._total_floor_area
@total_floor_area.setter
def total_floor_area(self, value):
2023-08-08 15:59:06 -04:00
"""
Get total floor area in m2
:param value: float
"""
self._total_floor_area = value
class ThermalBoundary:
"""
ThermalBoundary class
"""
def __init__(self):
self._type = None
self._opaque_area = None
self._window_ratio = None
@property
def type(self):
2023-08-08 15:59:06 -04:00
"""
Get thermal boundary type
:return: str
"""
return self._type
@type.setter
def type(self, value):
2023-08-08 15:59:06 -04:00
"""
Set thermal boundary type
:param value: str
"""
self._type = value
@property
def opaque_area(self):
2023-08-08 15:59:06 -04:00
"""
Get thermal boundary opaque area in m2
:return: float
"""
return self._opaque_area
@opaque_area.setter
def opaque_area(self, value):
2023-08-08 15:59:06 -04:00
"""
Set thermal boundary opaque area in m2
:param value: float
"""
self._opaque_area = value
@property
def window_ratio(self):
2023-08-08 15:59:06 -04:00
"""
Get thermal boundary window ratio
:return: float
"""
return self._window_ratio
@window_ratio.setter
def window_ratio(self, value):
2023-08-08 15:59:06 -04:00
"""
Set thermal boundary window ratio
:param value: float
"""
self._window_ratio = value
class Roof:
"""
Roof class
"""
def __init__(self):
self._solid_polygon = None
self._solar_collectors_area_reduction_factor = None
@property
2023-08-08 15:59:06 -04:00
def solid_polygon(self) -> Polygon:
"""
Get solid polygon
:return: Polygon
"""
return self._solid_polygon
@solid_polygon.setter
def solid_polygon(self, value):
2023-08-08 15:59:06 -04:00
"""
Set solid polygon
:param value: Polygon
"""
self._solid_polygon = value
@property
def solar_collectors_area_reduction_factor(self):
2023-08-08 15:59:06 -04:00
"""
Get solar-collectors-area reduction factor
:return: float
"""
return self._solar_collectors_area_reduction_factor
@solar_collectors_area_reduction_factor.setter
def solar_collectors_area_reduction_factor(self, value):
2023-08-08 15:59:06 -04:00
"""
Set solar-collectors-area reduction factor
:param value: float
"""
self._solar_collectors_area_reduction_factor = value
class Polygon:
"""
Polygon class
"""
def __init__(self):
self._area = None
@property
def area(self):
2023-08-08 15:59:06 -04:00
"""
Get polygon area in m2
:return: float
"""
return self._area
@area.setter
def area(self, value):
2023-08-08 15:59:06 -04:00
"""
Set polygon area in m2
:param value: float
"""
self._area = value