properties documented

This commit is contained in:
Pilar Monsalvete 2023-08-08 15:59:06 -04:00
parent aeedbd370c
commit e58d8d4cc9
2 changed files with 157 additions and 8 deletions

View File

@ -33,14 +33,26 @@ class Building:
@property @property
def function(self): def function(self):
"""
Get building function
:return: str
"""
return self._function return self._function
@property @property
def volume(self): def volume(self):
"""
Get building volume in m3
:return: float
"""
return self._volume return self._volume
@property @property
def thermal_zones(self): def thermal_zones(self) -> [ThermalZone]:
"""
Get building thermal zones
:return: [ThermalZone]
"""
ground = ThermalBoundary() ground = ThermalBoundary()
ground.type = 'Ground' ground.type = 'Ground'
ground.opaque_area = self._area ground.opaque_area = self._area
@ -57,7 +69,11 @@ class Building:
return [thermal_zone] return [thermal_zone]
@property @property
def roofs(self): def roofs(self) -> [Roof]:
"""
Get building roofs
:return: [Roof]
"""
polygon = Polygon() polygon = Polygon()
polygon.area = self._roof_area polygon.area = self._roof_area
roof = Roof() roof = Roof()
@ -67,38 +83,74 @@ class Building:
@property @property
def heating_consumption(self): def heating_consumption(self):
"""
Get building heating consumption in J
:return: dict
"""
return self._heating_consumption return self._heating_consumption
@property @property
def cooling_consumption(self): def cooling_consumption(self):
"""
Get building cooling consumption in J
:return: dict
"""
return self._cooling_consumption return self._cooling_consumption
@property @property
def domestic_hot_water_consumption(self): def domestic_hot_water_consumption(self):
"""
Get building domestic hot water consumption in J
:return: dict
"""
return self._domestic_hot_water_consumption return self._domestic_hot_water_consumption
@property @property
def lighting_electrical_demand(self): def lighting_electrical_demand(self):
"""
Get building lighting demand in J
:return: dict
"""
return self._lighting_electrical_demand return self._lighting_electrical_demand
@property @property
def appliances_electrical_demand(self): def appliances_electrical_demand(self):
"""
Get building appliances electrical demand in J
:return: dict
"""
return self._appliances_electrical_demand return self._appliances_electrical_demand
@property @property
def heating_peak_load(self): def heating_peak_load(self):
"""
Get building heating peak load in W
:return: dict
"""
return self._heating_peak_load return self._heating_peak_load
@property @property
def cooling_peak_load(self): def cooling_peak_load(self):
"""
Get building cooling peak load in W
:return: dict
"""
return self._cooling_peak_load return self._cooling_peak_load
@property @property
def onsite_electrical_production(self): def onsite_electrical_production(self):
"""
Get building onsite electrical production in J
:return: dict
"""
return self._onsite_electrical_production return self._onsite_electrical_production
@property @property
def energy_systems(self): def energy_systems(self) -> [EnergySystem]:
"""
Get building energy systems
:return: [EnergySystem]
"""
_energy_systems = [] _energy_systems = []
for system in self._catalog_archetype.systems: for system in self._catalog_archetype.systems:

View File

@ -5,6 +5,8 @@ Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
""" """
from __future__ import annotations
class EnergySystem: class EnergySystem:
""" """
@ -15,19 +17,35 @@ class EnergySystem:
self._demand_types = None self._demand_types = None
@property @property
def generation_system(self): def generation_system(self) -> GenerationSystem:
"""
Get building generation system
:return: GenerationSystem
"""
return self._generation_system return self._generation_system
@generation_system.setter @generation_system.setter
def generation_system(self, value): def generation_system(self, value):
"""
Set building generation system
:param value: GenerationSystem
"""
self._generation_system = value self._generation_system = value
@property @property
def demand_types(self): def demand_types(self):
"""
Get demand types covered by an energy system
:return: [str]
"""
return self._demand_types return self._demand_types
@demand_types.setter @demand_types.setter
def demand_types(self, value): def demand_types(self, value):
"""
Set demand types covered by an energy system
:param value: [str]
"""
self._demand_types = value self._demand_types = value
@ -40,11 +58,19 @@ class GenerationSystem:
self._generic_generation_system = None self._generic_generation_system = None
@property @property
def generic_generation_system(self): def generic_generation_system(self) -> GenericGenerationSystem:
"""
Get generic generation system
:return: GenericGenerationSystem
"""
return self._generic_generation_system return self._generic_generation_system
@generic_generation_system.setter @generic_generation_system.setter
def generic_generation_system(self, value): def generic_generation_system(self, value):
"""
Set generic generation system
:param value: GenericGenerationSystem
"""
self._generic_generation_system = value self._generic_generation_system = value
@ -58,10 +84,18 @@ class GenericGenerationSystem:
@property @property
def fuel_type(self): def fuel_type(self):
"""
Get fuel type of generic generation system
:return: str
"""
return self._fuel_type return self._fuel_type
@fuel_type.setter @fuel_type.setter
def fuel_type(self, value): def fuel_type(self, value):
"""
Set fuel type of generic generation system
:param value: str
"""
self._fuel_type = value self._fuel_type = value
@ -75,19 +109,35 @@ class ThermalZone:
self._total_floor_area = None self._total_floor_area = None
@property @property
def thermal_boundaries(self): def thermal_boundaries(self) -> [ThermalBoundary]:
"""
Get thermal boundaries
:return: [ThermalBoundary]
"""
return self._thermal_boundaries return self._thermal_boundaries
@thermal_boundaries.setter @thermal_boundaries.setter
def thermal_boundaries(self, value): def thermal_boundaries(self, value):
"""
Set thermal boundaries
:param value: [ThermalBoundary]
"""
self._thermal_boundaries = value self._thermal_boundaries = value
@property @property
def total_floor_area(self): def total_floor_area(self):
"""
Get total floor area in m2
:return: float
"""
return self._total_floor_area return self._total_floor_area
@total_floor_area.setter @total_floor_area.setter
def total_floor_area(self, value): def total_floor_area(self, value):
"""
Get total floor area in m2
:param value: float
"""
self._total_floor_area = value self._total_floor_area = value
@ -103,26 +153,50 @@ class ThermalBoundary:
@property @property
def type(self): def type(self):
"""
Get thermal boundary type
:return: str
"""
return self._type return self._type
@type.setter @type.setter
def type(self, value): def type(self, value):
"""
Set thermal boundary type
:param value: str
"""
self._type = value self._type = value
@property @property
def opaque_area(self): def opaque_area(self):
"""
Get thermal boundary opaque area in m2
:return: float
"""
return self._opaque_area return self._opaque_area
@opaque_area.setter @opaque_area.setter
def opaque_area(self, value): def opaque_area(self, value):
"""
Set thermal boundary opaque area in m2
:param value: float
"""
self._opaque_area = value self._opaque_area = value
@property @property
def window_ratio(self): def window_ratio(self):
"""
Get thermal boundary window ratio
:return: float
"""
return self._window_ratio return self._window_ratio
@window_ratio.setter @window_ratio.setter
def window_ratio(self, value): def window_ratio(self, value):
"""
Set thermal boundary window ratio
:param value: float
"""
self._window_ratio = value self._window_ratio = value
@ -136,19 +210,35 @@ class Roof:
self._solar_collectors_area_reduction_factor = None self._solar_collectors_area_reduction_factor = None
@property @property
def solid_polygon(self): def solid_polygon(self) -> Polygon:
"""
Get solid polygon
:return: Polygon
"""
return self._solid_polygon return self._solid_polygon
@solid_polygon.setter @solid_polygon.setter
def solid_polygon(self, value): def solid_polygon(self, value):
"""
Set solid polygon
:param value: Polygon
"""
self._solid_polygon = value self._solid_polygon = value
@property @property
def solar_collectors_area_reduction_factor(self): def solar_collectors_area_reduction_factor(self):
"""
Get solar-collectors-area reduction factor
:return: float
"""
return self._solar_collectors_area_reduction_factor return self._solar_collectors_area_reduction_factor
@solar_collectors_area_reduction_factor.setter @solar_collectors_area_reduction_factor.setter
def solar_collectors_area_reduction_factor(self, value): def solar_collectors_area_reduction_factor(self, value):
"""
Set solar-collectors-area reduction factor
:param value: float
"""
self._solar_collectors_area_reduction_factor = value self._solar_collectors_area_reduction_factor = value
@ -162,9 +252,16 @@ class Polygon:
@property @property
def area(self): def area(self):
"""
Get polygon area in m2
:return: float
"""
return self._area return self._area
@area.setter @area.setter
def area(self, value): def area(self, value):
"""
Set polygon area in m2
:param value: float
"""
self._area = value self._area = value