44
55import os
66import sys
7+ from typing import Dict , List
78
89import geopandas as gpd
910import pandas as pd
1011import pypsa
1112import xarray as xr
12- from typing import Dict , List
13-
14- import os
15- import sys
1613
1714sys .path .append (os .path .join (os .path .dirname (__file__ ), ".." , ".." ))
1815
@@ -156,13 +153,13 @@ def add_loads(
156153 )
157154
158155 # Adjust loads of cluster buses
159- n .loads_t .p_set .loc [
160- :, f' { subnode [ "cluster" ] } urban central heat'
161- ] -= urban_central_heat_load
156+ n .loads_t .p_set .loc [:, f" { subnode [ 'cluster' ] } urban central heat" ] -= (
157+ urban_central_heat_load
158+ )
162159
163- n .loads .loc [
164- f' { subnode [ "cluster" ] } low-temperature heat for industry' , "p_set"
165- ] -= low_temperature_heat_for_industry_load
160+ n .loads .loc [f" { subnode [ 'cluster' ] } low-temperature heat for industry" , "p_set" ] -= (
161+ low_temperature_heat_for_industry_load
162+ )
166163
167164 if lost_load > 0 :
168165 lost_load_subnode = subnode ["yearly_heat_demand_MWh" ] - (
@@ -506,6 +503,7 @@ def add_subnodes(
506503 Dictionary mapping heat sources to paths with potential data.
507504 output_path : str
508505 Path to save the subnodes_head GeoDataFrame.
506+
509507 Returns
510508 -------
511509 None
@@ -525,7 +523,7 @@ def add_subnodes(
525523
526524 # Add subnodes to network
527525 for _ , subnode in subnodes_head .iterrows ():
528- name = f' { subnode [" cluster" ]} { subnode [" Stadt" ]} urban central'
526+ name = f" { subnode [' cluster' ]} { subnode [' Stadt' ]} urban central"
529527
530528 # Add different component types
531529 add_buses (n , subnode , name )
0 commit comments