@@ -29,6 +29,7 @@ def add_subnodes(
29
29
direct_heat_source_utilisation_profile : xr .DataArray ,
30
30
head : int = 40 ,
31
31
dynamic_ptes_capacity : bool = False ,
32
+ limit_ptes_potential_mother_nodes : bool = True ,
32
33
) -> None :
33
34
"""
34
35
Add largest district heating systems subnodes to the network.
@@ -197,8 +198,6 @@ def add_subnodes(
197
198
"ptes_pot_mwh"
198
199
]
199
200
200
- #
201
-
202
201
if dynamic_ptes_capacity :
203
202
e_max_pu_static = stores .e_max_pu
204
203
e_max_pu = (
@@ -217,6 +216,17 @@ def add_subnodes(
217
216
else :
218
217
n .add ("Store" , stores .index , ** stores )
219
218
219
+ # Limit storage potential in mother nodes
220
+ if limit_ptes_potential_mother_nodes :
221
+ mother_nodes_ptes_pot = subnodes_rest .groupby ("cluster" ).ptes_pot_mwh .sum ()
222
+
223
+ mother_nodes_ptes_pot .index = (
224
+ mother_nodes_ptes_pot .index + " urban central water pits"
225
+ )
226
+ n .stores .loc [mother_nodes_ptes_pot .index , "e_nom_max" ] = (
227
+ mother_nodes_ptes_pot
228
+ )
229
+
220
230
# Replicate district heating storage units of mother node for subnodes
221
231
storage_units = (
222
232
n .storage_units .filter (like = f"{ subnode ['cluster' ]} urban central" , axis = 0 )
@@ -458,6 +468,9 @@ def extend_heating_distribution(
458
468
dynamic_ptes_capacity = snakemake .params .district_heating ["ptes" ][
459
469
"dynamic_capacity"
460
470
],
471
+ limit_ptes_potential_mother_nodes = snakemake .params .district_heating ["subnodes" ][
472
+ "limit_ptes_potential"
473
+ ]["limit_mother_nodes" ],
461
474
)
462
475
463
476
if snakemake .wildcards .planning_horizons == str (snakemake .params ["baseyear" ]):
0 commit comments