Add code comment to the classes
This commit is contained in:
parent
2107b0f0f9
commit
e613be147f
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
CityObject module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from matplotlib import pylab
|
||||
from city_model_structure.polyhedron import Polyhedron
|
||||
from city_model_structure.thermal_zone import ThermalZone
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
"""
|
||||
InternalGains module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
class InternalGains:
|
||||
def __init__(self):
|
||||
self._average_internal_gain_w_m2 = None
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
Layers module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from city_model_structure.material import Material
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
"""
|
||||
Material module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
class Material:
|
||||
def __init__(self):
|
||||
self._conductivity_wm_k = None
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
Polyhedron module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
import numpy as np
|
||||
import stl
|
||||
from helpers.geometry import Geometry
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
Surface module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import numpy as np
|
||||
import pyny3d.geoms as pn
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
ThermalBoundary module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from city_model_structure.thermal_opening import ThermalOpening
|
||||
from city_model_structure.thermal_zone import ThermalZone
|
||||
from city_model_structure.layer import Layer
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
ThermalOpening module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from helpers.configuration import Configuration
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
ThermalZone module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from typing import List
|
||||
from city_model_structure.thermal_boundary import ThermalBoundary
|
||||
from city_model_structure.usage_zone import UsageZone
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsageZone module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from city_model_structure.internal_gains import InternalGains
|
||||
from typing import List
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
"""
|
||||
Window module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
class Window:
|
||||
def __init__(self):
|
||||
self._conductivity_wm_k = None
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
GeometryFactory retrieve the specific geometric module to load the given format
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from geometry.geometry_feeders.city_gml import CityGml
|
||||
from city_model_structure.city import City
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
CityGml module parses citygml files and import the geometry into the city model structure
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
import xmltodict
|
||||
import numpy as np
|
||||
from city_model_structure.city import City
|
||||
|
@ -101,5 +106,3 @@ class CityGml:
|
|||
self._city.add_city_object(CityObject(name, lod, surfaces, terrains, year_of_construction, function,
|
||||
self._lower_corner))
|
||||
return self._city
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
Configuration helper
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
import configparser
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
Geometry helper
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
import math
|
||||
import numpy as np
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
PhysicsFactory retrieve the specific physics module for the given region
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from physics.physics_feeders.us_new_york_city_physics_parameters import UsNewYorkCityPhysicsParameters
|
||||
from physics.physics_feeders.us_physics_parameters import UsPhysicsParameters
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
"""
|
||||
UsPlutoToFunction helper
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
class UsPlutoToFunction:
|
||||
building_function = {
|
||||
'A0': 'single family house',
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
"""
|
||||
UsToLibraryTypes helper
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
class UsToLibraryTypes(object):
|
||||
standards = {
|
||||
'ASHRAE Std189': 1,
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
"""
|
||||
UsBasePhysicParameters, model the us archetypes and material, used by UsNewYorkCityPhysicsParameters and
|
||||
UsPhysicsParameters as base class
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
import xmltodict
|
||||
from city_model_structure.layer import Layer
|
||||
from city_model_structure.material import Material
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsNewYorkCityPhysicsParameters import the construction and material information for new york city
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from physics.physics_feeders.us_base_physics_parameters import UsBasePhysicsParameters
|
||||
from physics.physics_feeders.helpers.us_pluto_to_function import UsPlutoToFunction as Pf
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsPhysicsParameters import the construction and material information for US
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from physics.physics_feeders.us_base_physics_parameters import UsBasePhysicsParameters
|
||||
from physics.physics_feeders.helpers.us_to_library_types import UsToLibraryTypes
|
||||
|
||||
|
@ -7,4 +12,3 @@ class UsPhysicsParameters(UsBasePhysicsParameters):
|
|||
self._city = city
|
||||
self._climate_zone = UsToLibraryTypes.city_to_climate_zone(city.name)
|
||||
super().__init__(self._climate_zone, self._city.city_objects, lambda function: function, base_path)
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
TestGeometryFactory test and validate the city model structure geometric parameters
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from unittest import TestCase
|
||||
from pathlib import Path
|
||||
from geometry.geometry_factory import GeometryFactory
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
TestPhysicsFactory test and validate the city model structure physics parameters
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from unittest import TestCase
|
||||
from pathlib import Path
|
||||
from geometry.geometry_factory import GeometryFactory
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsageFactory retrieve the specific usage module for the given region
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from usage.usage_feeders.de_usage_parameters import DeUsageParameters
|
||||
from usage.usage_feeders.us_new_york_city_usage_parameters import UsNewYorkCityUsageParameters
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
DeUsageParameters model the usage properties for a German building
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
import xmltodict
|
||||
from pathlib import Path
|
||||
from usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
|
||||
|
@ -7,7 +12,7 @@ class DeUsageParameters:
|
|||
def __init__(self, city_objects):
|
||||
self._city_objects = city_objects
|
||||
|
||||
# load US Library
|
||||
# load De Library
|
||||
path = str(Path.cwd() / 'data/usage/de_library.xml')
|
||||
with open(path) as xml:
|
||||
self._library = xmltodict.parse(xml.read())
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
"""
|
||||
UsFunctionToUsage helper
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
class UsFunctionToUsage:
|
||||
building_usage = {
|
||||
'full service restaurant': 'restaurant',
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsPlutoToUsage helper
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsBaseUsageParameters base class to model the usage properties for a building in NYC and US
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
import xmltodict
|
||||
from pathlib import Path
|
||||
from city_model_structure.usage_zone import UsageZone
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsNewYorkCityUsageParameters model the usage properties for a NYC building
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from usage.usage_feeders.us_base_usage_parameters import UsBaseUsageParameters
|
||||
from usage.usage_feeders.helpers.us_pluto_to_usage import UsPlutoToUsage as Pu
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
UsUsageParameters model the usage properties for a Us building
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from usage.usage_feeders.us_base_usage_parameters import UsBaseUsageParameters
|
||||
from usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user