Skip to content

Commit e506603

Browse files
author
cpschau
committed
revert restriction of mother node ptes potentials
1 parent 643ea21 commit e506603

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

scripts/pypsa-de/add_district_heating_subnodes.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def add_subnodes(
2929
direct_heat_source_utilisation_profile: xr.DataArray,
3030
head: int = 40,
3131
dynamic_ptes_capacity: bool = False,
32+
limit_ptes_potential_mother_nodes: bool = True,
3233
) -> None:
3334
"""
3435
Add largest district heating systems subnodes to the network.
@@ -197,8 +198,6 @@ def add_subnodes(
197198
"ptes_pot_mwh"
198199
]
199200

200-
#
201-
202201
if dynamic_ptes_capacity:
203202
e_max_pu_static = stores.e_max_pu
204203
e_max_pu = (
@@ -217,6 +216,17 @@ def add_subnodes(
217216
else:
218217
n.add("Store", stores.index, **stores)
219218

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+
220230
# Replicate district heating storage units of mother node for subnodes
221231
storage_units = (
222232
n.storage_units.filter(like=f"{subnode['cluster']} urban central", axis=0)
@@ -458,6 +468,9 @@ def extend_heating_distribution(
458468
dynamic_ptes_capacity=snakemake.params.district_heating["ptes"][
459469
"dynamic_capacity"
460470
],
471+
limit_ptes_potential_mother_nodes=snakemake.params.district_heating["subnodes"][
472+
"limit_ptes_potential"
473+
]["limit_mother_nodes"],
461474
)
462475

463476
if snakemake.wildcards.planning_horizons == str(snakemake.params["baseyear"]):

0 commit comments

Comments
 (0)