just changed pilar_monsalvete@yahoo.es with pilar.monsalvete@concordia.ca
This commit is contained in:
parent
e4cf62b2ff
commit
e5cc627ce4
|
@ -201,7 +201,7 @@ class Occupants:
|
||||||
self._complete_year_schedule = []
|
self._complete_year_schedule = []
|
||||||
for i in range(1, 13):
|
for i in range(1, 13):
|
||||||
month_range = cal.monthrange(2015, i)[1]
|
month_range = cal.monthrange(2015, i)[1]
|
||||||
for day in range(1, month_range[1]+1):
|
for day in range(1, month_range+1):
|
||||||
if cal.weekday(2015, i, day) < 5:
|
if cal.weekday(2015, i, day) < 5:
|
||||||
for j in range(0, 24):
|
for j in range(0, 24):
|
||||||
week_schedule = schedules['WD'][j]
|
week_schedule = schedules['WD'][j]
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Surface:
|
||||||
self._inclination = None
|
self._inclination = None
|
||||||
self._area_above_ground = None
|
self._area_above_ground = None
|
||||||
self._area_below_ground = None
|
self._area_below_ground = None
|
||||||
|
# todo @Guille: what is parent?????????????
|
||||||
self._parent = None
|
self._parent = None
|
||||||
self._lower_corner = None
|
self._lower_corner = None
|
||||||
self._upper_corner = None
|
self._upper_corner = None
|
||||||
|
@ -55,6 +56,10 @@ class Surface:
|
||||||
raise ValueError('Undefined surface id')
|
raise ValueError('Undefined surface id')
|
||||||
return self._id
|
return self._id
|
||||||
|
|
||||||
|
@property
|
||||||
|
def share_surfaces(self):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
@id.setter
|
@id.setter
|
||||||
def id(self, value):
|
def id(self, value):
|
||||||
self._id = value
|
self._id = value
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
bixi_feature module
|
bixi_feature module
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from city_model_structure.city_object import CityObject
|
from city_model_structure.city_object import CityObject
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Composting plant module
|
Composting plant module
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from city_model_structure.city_object import CityObject
|
from city_model_structure.city_object import CityObject
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.mons
|
||||||
|
|
||||||
from typing import List, TypeVar
|
from typing import List, TypeVar
|
||||||
from city_model_structure.city_objects_cluster import CityObjectsCluster
|
from city_model_structure.city_objects_cluster import CityObjectsCluster
|
||||||
CityObject = TypeVar['CityObject']
|
CityObject = TypeVar('CityObject')
|
||||||
|
|
||||||
|
|
||||||
class PartsConsistingBuilding(CityObjectsCluster):
|
class PartsConsistingBuilding(CityObjectsCluster):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Subway entrance module
|
Subway entrance module
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from city_model_structure.city_object import CityObject
|
from city_model_structure.city_object import CityObject
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Tree module
|
Tree module
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from city_model_structure.city_object import CityObject
|
from city_model_structure.city_object import CityObject
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
monthly_to_hourly_demand module
|
monthly_to_hourly_demand module
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from city_model_structure.attributes.occupants import Occupants
|
from city_model_structure.attributes.occupants import Occupants
|
||||||
|
@ -44,7 +44,7 @@ class MonthlyToHourlyDemand:
|
||||||
for month in range(1, 13):
|
for month in range(1, 13):
|
||||||
temp_grad_month = 0
|
temp_grad_month = 0
|
||||||
month_range = cal.monthrange(2015, month)[1]
|
month_range = cal.monthrange(2015, month)[1]
|
||||||
for day in range(1, month_range[1]+1):
|
for day in range(1, month_range+1):
|
||||||
external_temp_med = 0
|
external_temp_med = 0
|
||||||
for hour in range(0, 24):
|
for hour in range(0, 24):
|
||||||
external_temp_med += external_temp[key][i]/24
|
external_temp_med += external_temp[key][i]/24
|
||||||
|
@ -66,7 +66,7 @@ class MonthlyToHourlyDemand:
|
||||||
temp_grad_month += temp_grad_day[i]
|
temp_grad_month += temp_grad_day[i]
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
for day in range(1, month_range[1] + 1):
|
for day in range(1, month_range + 1):
|
||||||
for hour in range(0, 24):
|
for hour in range(0, 24):
|
||||||
# monthly_demand = self._building.heating[cte.MONTH]['INSEL'][month-1] or maybe:
|
# monthly_demand = self._building.heating[cte.MONTH]['INSEL'][month-1] or maybe:
|
||||||
# monthly_demand = self._building.heating[cte.MONTH].INSEL[month-1]
|
# monthly_demand = self._building.heating[cte.MONTH].INSEL[month-1]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
CaPhysicsParameters import the construction and material information for Canada
|
CaPhysicsParameters import the construction and material information for Canada
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
NrelBuildingArchetype stores construction information by building archetypes
|
NrelBuildingArchetype stores construction information by building archetypes
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from typing import List
|
from typing import List
|
||||||
from imports.construction.data_classes.nrel_thermal_boundary_archetype import NrelThermalBoundaryArchetype
|
from imports.construction.data_classes.nrel_thermal_boundary_archetype import NrelThermalBoundaryArchetype
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
NrelLayerArchetype stores layer and materials information, complementing the NrelBuildingArchetype class
|
NrelLayerArchetype stores layer and materials information, complementing the NrelBuildingArchetype class
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
NrelThermalBoundaryArchetype stores thermal boundaries information, complementing the NrelBuildingArchetype class
|
NrelThermalBoundaryArchetype stores thermal boundaries information, complementing the NrelBuildingArchetype class
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
NrelThermalOpeningArchetype stores thermal openings information, complementing the NrelBuildingArchetype class
|
NrelThermalOpeningArchetype stores thermal openings information, complementing the NrelBuildingArchetype class
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,14 +47,13 @@ class ConstructionHelper:
|
||||||
'Fairbanks': 'ASHRAE_2004:8A'
|
'Fairbanks': 'ASHRAE_2004:8A'
|
||||||
}
|
}
|
||||||
nrel_window_types = ['window', 'door', 'skylight']
|
nrel_window_types = ['window', 'door', 'skylight']
|
||||||
# todo: review with the same idea, to define a internal set and do the conversion to NREL
|
|
||||||
nrel_construction_types = {
|
nrel_construction_types = {
|
||||||
'Wall': 'exterior wall',
|
'Wall': 'exterior wall',
|
||||||
'interior wall': 'interior wall',
|
'Interior wall': 'interior wall',
|
||||||
'ground wall': 'ground wall',
|
'Ground wall': 'ground wall',
|
||||||
'Ground': 'exterior slab',
|
'Ground': 'exterior slab',
|
||||||
'attic floor': 'attic floor',
|
'Attic floor': 'attic floor',
|
||||||
'interior slab': 'interior slab',
|
'Interior slab': 'interior slab',
|
||||||
'Roof': 'roof'
|
'Roof': 'roof'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,13 +75,12 @@ class ConstructionHelper:
|
||||||
}
|
}
|
||||||
nrcan_function_default_value = 'residential'
|
nrcan_function_default_value = 'residential'
|
||||||
nrcan_window_types = ['window']
|
nrcan_window_types = ['window']
|
||||||
# todo: review with the same idea, to define a internal set and do the conversion to NREL
|
|
||||||
nrcan_construction_types = {
|
nrcan_construction_types = {
|
||||||
'Wall': 'wall',
|
'Wall': 'wall',
|
||||||
'ground wall': 'basement_wall',
|
'Ground wall': 'basement_wall',
|
||||||
'Ground': 'floor',
|
'Ground': 'floor',
|
||||||
'attic floor': 'attic floor',
|
'Attic floor': 'attic floor',
|
||||||
'interior slab': 'interior slab',
|
'Interior slab': 'interior slab',
|
||||||
'Roof': 'roof'
|
'Roof': 'roof'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Nrel-based interface, it reads format defined within the CERC team based on NREL structure
|
Nrel-based interface, it reads format defined within the CERC team based on NREL structure
|
||||||
and enriches the city with archetypes and materials
|
and enriches the city with archetypes and materials
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
import xmltodict
|
import xmltodict
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
UsPhysicsParameters import the construction and material information for US
|
UsPhysicsParameters import the construction and material information for US
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||||
Contributors Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Contributors Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ class GeometryHelper:
|
||||||
}
|
}
|
||||||
|
|
||||||
# usage
|
# usage
|
||||||
fuction_to_usage = {
|
function_to_usage = {
|
||||||
'full service restaurant': 'restaurant',
|
'full service restaurant': 'restaurant',
|
||||||
'highrise apartment': 'residential',
|
'highrise apartment': 'residential',
|
||||||
'hospital': 'health care',
|
'hospital': 'health care',
|
||||||
|
@ -292,7 +292,7 @@ class GeometryHelper:
|
||||||
:param building_function: str
|
:param building_function: str
|
||||||
:return: str
|
:return: str
|
||||||
"""
|
"""
|
||||||
return GeometryHelper.fuction_to_usage[building_function]
|
return GeometryHelper.function_to_usage[building_function]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def to_points_matrix(points):
|
def to_points_matrix(points):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
HftInternalGainsArchetype stores internal gains information, complementing the HftUsageZoneArchetype class
|
HftInternalGainsArchetype stores internal gains information, complementing the HftUsageZoneArchetype class
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
HftUsageZoneArchetype stores usage information by building archetypes
|
HftUsageZoneArchetype stores usage information by building archetypes
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from typing import List
|
from typing import List
|
||||||
from imports.usage.data_classes.hft_internal_gains_archetype import HftInternalGainsArchetype
|
from imports.usage.data_classes.hft_internal_gains_archetype import HftInternalGainsArchetype
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
DatWeatherParameters class to extract weather parameters from a defined region in .dat format
|
DatWeatherParameters class to extract weather parameters from a defined region in .dat format
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
weather helper
|
weather helper
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
import math
|
import math
|
||||||
import helpers.constants as cte
|
import helpers.constants as cte
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
XlsWeatherParameters class to extract weather parameters from a defined region in .xls format
|
XlsWeatherParameters class to extract weather parameters from a defined region in .xls format
|
||||||
defined and used by the norm iso 52016-1:2017
|
defined and used by the norm iso 52016-1:2017
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
|
@ -64,10 +64,10 @@ class TestExports(TestCase):
|
||||||
ExportsFactory(export_type, self._complete_city, self._output_path).export()
|
ExportsFactory(export_type, self._complete_city, self._output_path).export()
|
||||||
|
|
||||||
def test_obj_export(self):
|
def test_obj_export(self):
|
||||||
self._export('obj', True)
|
self._export('obj', False)
|
||||||
|
|
||||||
def test_stl_export(self):
|
def test_stl_export(self):
|
||||||
self._export('stl', True)
|
self._export('stl', False)
|
||||||
|
|
||||||
def test_energy_ade_export(self):
|
def test_energy_ade_export(self):
|
||||||
self._export('energy_ade')
|
self._export('energy_ade')
|
||||||
|
|
|
@ -50,17 +50,6 @@ class TestGeometryFactory(TestCase):
|
||||||
return new_function
|
return new_function
|
||||||
|
|
||||||
# citygml_classes
|
# citygml_classes
|
||||||
def test_stuttgart_gml(self):
|
|
||||||
file = 'ConcordiaSWGcampus.gml'
|
|
||||||
city = self._get_citygml(file)
|
|
||||||
print(f'city name: {city.name}')
|
|
||||||
print(f'number of buildings: {len(city.buildings)}')
|
|
||||||
for building in city.buildings:
|
|
||||||
print(f'building {building.name} has {len(building.surfaces)} surfaces')
|
|
||||||
print(f'building {building.name} has {building.volume} m3')
|
|
||||||
print(f'Found {len(city.buildings)} buildings')
|
|
||||||
self.assertTrue(True)
|
|
||||||
|
|
||||||
def test_citygml_buildings(self):
|
def test_citygml_buildings(self):
|
||||||
"""
|
"""
|
||||||
Test city objects in the city
|
Test city objects in the city
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -73,3 +73,14 @@ class TestGeometryFactory(TestCase):
|
||||||
counter += 1
|
counter += 1
|
||||||
self.assertEqual(counter, 1, f'{counter} buildings had errors when triangulating surfaces')
|
self.assertEqual(counter, 1, f'{counter} buildings had errors when triangulating surfaces')
|
||||||
|
|
||||||
|
def test_stuttgart_gml(self):
|
||||||
|
file = '20190815_mitte_out_MC_FloursurfaceADD.gml'
|
||||||
|
city = self._get_citygml(file)
|
||||||
|
print(f'city name: {city.name}')
|
||||||
|
print(f'number of buildings: {len(city.buildings)}')
|
||||||
|
for building in city.buildings:
|
||||||
|
print(f'building {building.name} has {len(building.surfaces)} surfaces')
|
||||||
|
print(f'building {building.name} has {building.volume} m3')
|
||||||
|
print(f'Found {len(city.buildings)} buildings')
|
||||||
|
self.assertTrue(True)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
TestWeatherFactory test and validate the city model structure weather parameters
|
TestWeatherFactory test and validate the city model structure weather parameters
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es
|
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
Loading…
Reference in New Issue
Block a user