updated sra to the latest version and erased unneeded lines in main
This commit is contained in:
parent
1a0ec10311
commit
a2b2ba890c
17
main.py
17
main.py
|
@ -3,7 +3,6 @@ from pathlib import Path
|
||||||
from hub.imports.geometry_factory import GeometryFactory
|
from hub.imports.geometry_factory import GeometryFactory
|
||||||
from hub.imports.construction_factory import ConstructionFactory
|
from hub.imports.construction_factory import ConstructionFactory
|
||||||
from hub.imports.usage_factory import UsageFactory
|
from hub.imports.usage_factory import UsageFactory
|
||||||
from hub.imports.weather_factory import WeatherFactory
|
|
||||||
from hub.helpers.dictionaries import Dictionaries
|
from hub.helpers.dictionaries import Dictionaries
|
||||||
from hub.imports.energy_systems_factory import EnergySystemsFactory
|
from hub.imports.energy_systems_factory import EnergySystemsFactory
|
||||||
import hub.helpers.constants as cte
|
import hub.helpers.constants as cte
|
||||||
|
@ -13,14 +12,11 @@ from sra_engine import SraEngine
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
file_path = (Path(__file__).parent / 'input_files' / 'selected_building_warehouse.geojson')
|
file_path = (Path(__file__).parent / 'input_files' / 'eilat.geojson')
|
||||||
climate_reference_city = 'Montreal'
|
climate_reference_city = 'Montreal'
|
||||||
weather_format = 'epw'
|
|
||||||
construction_format = 'nrcan'
|
construction_format = 'nrcan'
|
||||||
usage_format = 'nrcan'
|
usage_format = 'eilat'
|
||||||
energy_systems_format = 'montreal_custom'
|
energy_systems_format = 'montreal_custom'
|
||||||
attic_heated_case = 0
|
|
||||||
basement_heated_case = 1
|
|
||||||
|
|
||||||
out_path = (Path(__file__).parent / 'output_files')
|
out_path = (Path(__file__).parent / 'output_files')
|
||||||
tmp_folder = (Path(__file__).parent / 'tmp')
|
tmp_folder = (Path(__file__).parent / 'tmp')
|
||||||
|
@ -31,18 +27,15 @@ try:
|
||||||
height_field='heightmax',
|
height_field='heightmax',
|
||||||
year_of_construction_field='ANNEE_CONS',
|
year_of_construction_field='ANNEE_CONS',
|
||||||
function_field='CODE_UTILI',
|
function_field='CODE_UTILI',
|
||||||
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
function_to_hub=Dictionaries().eilat_function_to_hub_function).city
|
||||||
city.climate_reference_city = climate_reference_city
|
|
||||||
city.climate_file = (tmp_folder / f'{climate_reference_city}.cli').resolve()
|
|
||||||
print(f'city created from {file_path}')
|
print(f'city created from {file_path}')
|
||||||
WeatherFactory(weather_format, city).enrich()
|
|
||||||
print('enrich weather... done')
|
|
||||||
ConstructionFactory(construction_format, city).enrich()
|
ConstructionFactory(construction_format, city).enrich()
|
||||||
print('enrich constructions... done')
|
print('enrich constructions... done')
|
||||||
UsageFactory(usage_format, city).enrich()
|
UsageFactory(usage_format, city).enrich()
|
||||||
print('enrich usage... done')
|
print('enrich usage... done')
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
building.energy_systems_archetype_name = 'system 1 gas pv'
|
building.energy_systems_archetype_name = 'system 3 and 4 electricity'
|
||||||
EnergySystemsFactory(energy_systems_format, city).enrich()
|
EnergySystemsFactory(energy_systems_format, city).enrich()
|
||||||
print('enrich systems... done')
|
print('enrich systems... done')
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class SraEngine:
|
||||||
if platform.system() == 'Linux':
|
if platform.system() == 'Linux':
|
||||||
self._executable = 'sra'
|
self._executable = 'sra'
|
||||||
elif platform.system() == 'Windows':
|
elif platform.system() == 'Windows':
|
||||||
self._executable = 'shortwave_integer'
|
self._executable = 'sra.exe'
|
||||||
ExportsFactory('sra', self._city, output_file_path).export()
|
ExportsFactory('sra', self._city, output_file_path).export()
|
||||||
self._run()
|
self._run()
|
||||||
ResultFactory('sra', self._city, output_file_path).enrich()
|
ResultFactory('sra', self._city, output_file_path).enrich()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user