Compare commits

...

21 Commits

Author SHA1 Message Date
4ecb18db90 feat: small test to check pv outputs is added 2024-12-05 10:29:31 +01:00
960f638e88 Merge remote-tracking branch 'origin/feature/cmm_project' into feature/cmm_project
# Conflicts:
#	crs_conversion.py
#	hub/city_model_structure/building.py
#	hub/imports/geometry/geojson.py
#	hub/imports/geometry_factory.py
#	hub/imports/results/archetype_based_demand.py
#	main.py
#	pv_assessment/electricity_demand_calculator.py
#	pv_assessment/pv_system_assessment.py
#	random_assignation.py
2024-12-05 09:47:39 +01:00
a20b45205f feat: installed_capacity attribute added to PvGeneration class and implemented in the code 2024-11-27 18:35:29 +01:00
6ec598218c feat: pv calculation code added and tested 2024-11-26 11:43:11 +01:00
4cd79c2125 Merge remote-tracking branch 'origin/feature/cmm_project' into feature/cmm_project 2024-11-26 09:38:36 +01:00
8f332baad6 feat: add README.md file 2024-11-25 17:49:00 -05:00
0c82389950 feat: add result factory for archetype mapping 2024-11-25 17:48:59 -05:00
53cd8586ea feat: add postal code to simplified building 2024-11-25 17:48:48 -05:00
6ac9110bf0 feat: add more code to MontrealFunctionToHubFunction dict
Just as a note, these added codes must be checked with HQ codes and correct funtion must be assigned to them.
2024-11-25 17:48:48 -05:00
f4655353df feat: add centroid to the attributes of the simplified building 2024-11-25 17:48:47 -05:00
5f1c895e31 chore: add main file and building data points 2024-11-25 17:48:47 -05:00
fa0773ffc5 feat: add csv handler to geometry factory 2024-11-25 17:48:47 -05:00
e0f74e3440 feat: add simplified building and city to city model structure 2024-11-25 17:48:47 -05:00
2f71ca7d79 feat: add README.md file 2024-11-19 11:25:01 -05:00
826b222082 feat: add result factory for archetype mapping 2024-11-19 11:11:50 -05:00
7fdcf45a42 feat: add postal code to simplified building 2024-11-18 09:34:09 -05:00
6dbd37d6cd feat: add more code to MontrealFunctionToHubFunction dict
Just as a note, these added codes must be checked with HQ codes and correct funtion must be assigned to them.
2024-11-18 09:34:09 -05:00
1b18159c5b feat: add centroid to the attributes of the simplified building 2024-11-18 09:34:09 -05:00
082b32da68 chore: add main file and building data points 2024-11-18 09:34:08 -05:00
340b84817a feat: add csv handler to geometry factory 2024-11-18 09:34:08 -05:00
b57803e7ad feat: add simplified building and city to city model structure 2024-11-18 09:34:08 -05:00
3 changed files with 26 additions and 1 deletions

7
data/cmm_test.geojson Normal file
View File

@ -0,0 +1,7 @@
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "cerc_id": 10000000, "provinc_id": "72015684390246800000000", "matricu_18": "684390246800000000", "feature_id": "905021fe-faed-40cb-a193-8b8b9863eb6e", "contr_year": "1986", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "attached", "lot_name": "1461297", "lot_area": 1247.7, "build_area": 145.3, "build_type": "1", "floor_num": 1, "unit_num": 2, "region": "layer_80", "g_objectid": 1169999.0, "g_co_mrc": "720", "g_code_mun": "72015", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.959074500485556, 45.526439602454957 ], [ -73.95906913536642, 45.52644040687705 ], [ -73.959067332931753, 45.526434277213156 ], [ -73.959072648380882, 45.526433504485176 ], [ -73.959074500485556, 45.526439602454957 ] ] ], [ [ [ -73.959284044103711, 45.526434113367664 ], [ -73.959285089854276, 45.526437239705743 ], [ -73.959323607759771, 45.526430905630932 ], [ -73.959339294217543, 45.526477977063195 ], [ -73.959365136004763, 45.526473721285491 ], [ -73.959384577774543, 45.526470522456577 ], [ -73.95939879848838, 45.526513191459713 ], [ -73.95918505777766, 45.526548375245248 ], [ -73.95915412932338, 45.526455490326235 ], [ -73.959284044103711, 45.526434113367664 ] ] ], [ [ [ -73.959318219290097, 45.526552949174281 ], [ -73.959334062104787, 45.526613722737721 ], [ -73.959216751906709, 45.5266288329885 ], [ -73.959200273841773, 45.52656565039198 ], [ -73.95922525487974, 45.526562432921921 ], [ -73.959220722410464, 45.526545052740744 ], [ -73.959294284368852, 45.526535583122445 ], [ -73.959299435528266, 45.526555364285208 ], [ -73.959318219290097, 45.526552949174281 ] ] ], [ [ [ -73.959361589683013, 45.526663537853317 ], [ -73.959418160975417, 45.526683936473432 ], [ -73.959367699213033, 45.526753086934306 ], [ -73.959311113787507, 45.526732688346264 ], [ -73.959361589683013, 45.526663537853317 ] ] ] ] } }
]
}

View File

@ -0,0 +1,7 @@
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "cerc_id": 10000000, "provinc_id": "72015684390246800000000", "matricu_18": "684390246800000000", "feature_id": "905021fe-faed-40cb-a193-8b8b9863eb6e", "contr_year": "1986", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "attached", "lot_name": "1461297", "lot_area": 1247.7, "build_area": 145.3, "build_type": "1", "floor_num": 1, "unit_num": 2, "region": "layer_80", "g_objectid": 1169999.0, "g_co_mrc": "720", "g_code_mun": "72015", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.959074500485556, 45.526439602454957 ], [ -73.959072648380882, 45.526433504485176 ], [ -73.959067332931753, 45.526434277213156 ], [ -73.95906913536642, 45.52644040687705 ], [ -73.959074500485556, 45.526439602454957 ] ] ], [ [ [ -73.959284044103711, 45.526434113367664 ], [ -73.95915412932338, 45.526455490326235 ], [ -73.95918505777766, 45.526548375245248 ], [ -73.95939879848838, 45.526513191459713 ], [ -73.959384577774543, 45.526470522456577 ], [ -73.959365136004763, 45.526473721285491 ], [ -73.959339294217543, 45.526477977063195 ], [ -73.959323607759771, 45.526430905630932 ], [ -73.959285089854276, 45.526437239705743 ], [ -73.959284044103711, 45.526434113367664 ] ] ], [ [ [ -73.959318219290097, 45.526552949174281 ], [ -73.959299435528266, 45.526555364285208 ], [ -73.959294284368852, 45.526535583122445 ], [ -73.959220722410464, 45.526545052740744 ], [ -73.95922525487974, 45.526562432921921 ], [ -73.959200273841773, 45.52656565039198 ], [ -73.959216751906709, 45.5266288329885 ], [ -73.959334062104787, 45.526613722737721 ], [ -73.959318219290097, 45.526552949174281 ] ] ], [ [ [ -73.959361589683013, 45.526663537853317 ], [ -73.959311113787507, 45.526732688346264 ], [ -73.959367699213033, 45.526753086934306 ], [ -73.959418160975417, 45.526683936473432 ], [ -73.959361589683013, 45.526663537853317 ] ] ] ] } }
]
}

13
main.py
View File

@ -11,6 +11,7 @@ from pv_assessment.solar_calculator import SolarCalculator
import random_assignation import random_assignation
import subprocess import subprocess
from pathlib import Path from pathlib import Path
import hub.helpers.constants as cte
input_file = "data/selected_buildings.geojson" input_file = "data/selected_buildings.geojson"
demand_file = "data/energy_demand_data.csv" demand_file = "data/energy_demand_data.csv"
@ -71,7 +72,17 @@ for building in city.buildings:
facade_coverage_percentage=0, facade_coverage_percentage=0,
csv_output=False, csv_output=False,
output_path=pv_assessment_path).enrich() output_path=pv_assessment_path).enrich()
for building in city.buildings:
energy_systems = building.energy_systems
for energy_system in energy_systems:
generation_systems = energy_system.generation_systems
for generation_system in generation_systems:
if generation_system.system_type == cte.PHOTOVOLTAIC:
max_installed_capacity = generation_system.installed_capacity
print(f'The SRA output for building {building.name} is {building.roofs[0].global_irradiance[cte.YEAR][0] / 1000} kW/m2')
print(
f'The total tilted irradiance for building {building.name} is {building.roofs[0].global_irradiance_tilted[cte.YEAR][0] / 1000} kW/m2')
print(f'PV specific output of building {building.name} is {building.pv_generation[cte.YEAR][0] / max_installed_capacity} kW/kWp')
r = [] r = []
for building in city.buildings: for building in city.buildings:
r.append((building.build_area - building.lot_area) / building.thermal_zones_from_internal_zones[0].total_floor_area) r.append((building.build_area - building.lot_area) / building.thermal_zones_from_internal_zones[0].total_floor_area)