Compare commits
3 Commits
deb04cbe2d
...
e1ca39950f
Author | SHA1 | Date | |
---|---|---|---|
|
e1ca39950f | ||
|
02a03b8239 | ||
|
9094c286c4 |
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
12
.idea/hub.iml
Normal file
12
.idea/hub.iml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="PyDocumentationSettings">
|
||||||
|
<option name="format" value="PLAIN" />
|
||||||
|
<option name="myDocStringFormat" value="Plain" />
|
||||||
|
</component>
|
||||||
|
</module>
|
30
.idea/inspectionProfiles/Project_Default.xml
Normal file
30
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredPackages">
|
||||||
|
<value>
|
||||||
|
<list size="9">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="pandas" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="geopy" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="geographiclib" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="reverse_geocoder" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="stl" />
|
||||||
|
<item index="5" class="java.lang.String" itemvalue="numpy-stl" />
|
||||||
|
<item index="6" class="java.lang.String" itemvalue="esoreader" />
|
||||||
|
<item index="7" class="java.lang.String" itemvalue="pyny3d" />
|
||||||
|
<item index="8" class="java.lang.String" itemvalue="triangle" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredErrors">
|
||||||
|
<list>
|
||||||
|
<option value="E111" />
|
||||||
|
<option value="E114" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
4
.idea/misc.xml
Normal file
4
.idea/misc.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (hub)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/hub.iml" filepath="$PROJECT_DIR$/.idea/hub.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,155 @@
|
|||||||
|
"""
|
||||||
|
Construction catalog Archetype
|
||||||
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
|
Copyright © 2022 Concordia CERC group
|
||||||
|
Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||||
|
"""
|
||||||
|
|
||||||
|
from hub.catalog_factories.data_models.construction.construction import Construction
|
||||||
|
|
||||||
|
|
||||||
|
class Archetype:
|
||||||
|
"""
|
||||||
|
Archetype class
|
||||||
|
"""
|
||||||
|
def __init__(self, archetype_id,
|
||||||
|
name,
|
||||||
|
function,
|
||||||
|
climate_zone,
|
||||||
|
construction_period,
|
||||||
|
constructions,
|
||||||
|
average_storey_height,
|
||||||
|
thermal_capacity,
|
||||||
|
extra_loses_due_to_thermal_bridges,
|
||||||
|
indirect_heated_ratio,
|
||||||
|
infiltration_rate_for_ventilation_system_off,
|
||||||
|
infiltration_rate_for_ventilation_system_on):
|
||||||
|
self._id = archetype_id
|
||||||
|
self._name = name
|
||||||
|
self._function = function
|
||||||
|
self._climate_zone = climate_zone
|
||||||
|
self._construction_period = construction_period
|
||||||
|
self._constructions = constructions
|
||||||
|
self._average_storey_height = average_storey_height
|
||||||
|
self._thermal_capacity = thermal_capacity
|
||||||
|
self._extra_loses_due_to_thermal_bridges = extra_loses_due_to_thermal_bridges
|
||||||
|
self._indirect_heated_ratio = indirect_heated_ratio
|
||||||
|
self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off
|
||||||
|
self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on
|
||||||
|
|
||||||
|
@property
|
||||||
|
def id(self):
|
||||||
|
"""
|
||||||
|
Get archetype id
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._id
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self):
|
||||||
|
"""
|
||||||
|
Get archetype name
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def function(self):
|
||||||
|
"""
|
||||||
|
Get archetype function
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._function
|
||||||
|
|
||||||
|
@property
|
||||||
|
def climate_zone(self):
|
||||||
|
"""
|
||||||
|
Get archetype climate zone
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._climate_zone
|
||||||
|
|
||||||
|
@property
|
||||||
|
def constructions(self) -> [Construction]:
|
||||||
|
"""
|
||||||
|
Get archetype constructions
|
||||||
|
:return: [Construction]
|
||||||
|
"""
|
||||||
|
return self._constructions
|
||||||
|
|
||||||
|
@property
|
||||||
|
def construction_period(self):
|
||||||
|
"""
|
||||||
|
Get archetype construction period
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._construction_period
|
||||||
|
|
||||||
|
@property
|
||||||
|
def average_storey_height(self):
|
||||||
|
"""
|
||||||
|
Get archetype average storey height in m
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._average_storey_height
|
||||||
|
|
||||||
|
@property
|
||||||
|
def thermal_capacity(self):
|
||||||
|
"""
|
||||||
|
Get archetype thermal capacity in J/m3K
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._thermal_capacity
|
||||||
|
|
||||||
|
@property
|
||||||
|
def extra_loses_due_to_thermal_bridges(self):
|
||||||
|
"""
|
||||||
|
Get archetype extra loses due to thermal bridges in W/m2K
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._extra_loses_due_to_thermal_bridges
|
||||||
|
|
||||||
|
@property
|
||||||
|
def indirect_heated_ratio(self):
|
||||||
|
"""
|
||||||
|
Get archetype indirect heated area ratio
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._indirect_heated_ratio
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_for_ventilation_system_off(self):
|
||||||
|
"""
|
||||||
|
Get archetype infiltration rate for ventilation system off in 1/s
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._infiltration_rate_for_ventilation_system_off
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_for_ventilation_system_on(self):
|
||||||
|
"""
|
||||||
|
Get archetype infiltration rate for ventilation system on in 1/s
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._infiltration_rate_for_ventilation_system_on
|
||||||
|
|
||||||
|
def to_dictionary(self):
|
||||||
|
"""Class content to dictionary"""
|
||||||
|
_constructions = []
|
||||||
|
for _construction in self.constructions:
|
||||||
|
_constructions.append(_construction.to_dictionary())
|
||||||
|
content = {'Archetype': {'id': self.id,
|
||||||
|
'name': self.name,
|
||||||
|
'function': self.function,
|
||||||
|
'climate zone': self.climate_zone,
|
||||||
|
'period of construction': self.construction_period,
|
||||||
|
'average storey height [m]': self.average_storey_height,
|
||||||
|
'thermal capacity [J/m3K]': self.thermal_capacity,
|
||||||
|
'extra loses due to thermal bridges [W/m2K]': self.extra_loses_due_to_thermal_bridges,
|
||||||
|
'indirect heated ratio': self.indirect_heated_ratio,
|
||||||
|
'infiltration rate for ventilation off [1/s]': self.infiltration_rate_for_ventilation_system_off,
|
||||||
|
'infiltration rate for ventilation on [1/s]': self.infiltration_rate_for_ventilation_system_on,
|
||||||
|
'constructions': _constructions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return content
|
Loading…
Reference in New Issue
Block a user