45 lines
1.8 KiB
Python
45 lines
1.8 KiB
Python
from pathlib import Path
|
|
from scripts.district_heating_network.simultinity_factor import DemandShiftProcessor
|
|
from scripts.ep_run_enrich import energy_plus_workflow
|
|
from hub.imports.geometry_factory import GeometryFactory
|
|
from hub.helpers.dictionaries import Dictionaries
|
|
from hub.imports.construction_factory import ConstructionFactory
|
|
from hub.imports.usage_factory import UsageFactory
|
|
from hub.imports.weather_factory import WeatherFactory
|
|
from scripts.district_heating_network.road_processor import road_processor
|
|
from scripts.district_heating_network.district_heating_network_creator import DistrictHeatingNetworkCreator
|
|
from scripts.district_heating_network.geojson_graph_creator import networkx_to_geojson
|
|
import hub.helpers.constants as cte
|
|
|
|
file_path = (Path(__file__).parent / 'input_files' / 'new.geojson')
|
|
|
|
output_path = (Path(__file__).parent / 'out_files').resolve()
|
|
|
|
# Create city object from GeoJSON file
|
|
# city = GeometryFactory('geojson',
|
|
# path=file_path,
|
|
# height_field='height',
|
|
# year_of_construction_field='year_of_construction',
|
|
# function_field='function',
|
|
# function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
|
#
|
|
# # Enrich city data
|
|
# ConstructionFactory('nrcan', city).enrich()
|
|
# UsageFactory('nrcan', city).enrich()
|
|
# WeatherFactory('epw', city).enrich()
|
|
#
|
|
# # energy_plus_workflow(city)
|
|
#
|
|
# processor = DemandShiftProcessor(city)
|
|
# processor.process_demands()
|
|
|
|
location = [45.436749057834206, -73.66282803816682]
|
|
|
|
roads_file = './input_files/processed_roads_output.geojson'
|
|
|
|
dhn_creator = DistrictHeatingNetworkCreator(file_path, roads_file)
|
|
network_graph = dhn_creator.run()
|
|
|
|
networkx_to_geojson(network_graph)
|
|
|
|
dhn_creator.plot_network_graph() |