diff --git a/main.py b/main.py index b2fbe6df..019a0967 100644 --- a/main.py +++ b/main.py @@ -11,6 +11,7 @@ from pv_assessment.solar_calculator import SolarCalculator import random_assignation import subprocess from pathlib import Path +import hub.helpers.constants as cte input_file = "data/selected_buildings.geojson" demand_file = "data/energy_demand_data.csv" @@ -71,7 +72,17 @@ for building in city.buildings: facade_coverage_percentage=0, csv_output=False, 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 = [] for building in city.buildings: r.append((building.build_area - building.lot_area) / building.thermal_zones_from_internal_zones[0].total_floor_area)