fix in add_heating_capacities_installed_before_baseyear to account for case when there is no rural heating demand for some nodes in network
This commit is contained in:
parent
cfa99cb327
commit
407037a799
@ -439,6 +439,11 @@ def add_heating_capacities_installed_before_baseyear(
|
|||||||
+ n.loads_t.p_set.sum()[f"{node} services rural heat"]
|
+ n.loads_t.p_set.sum()[f"{node} services rural heat"]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
# if rural heating demand for one of the nodes doesn't exist,
|
||||||
|
# then columns were dropped before and heating demand share should be 0.0
|
||||||
|
if (f"{node} residential rural heat" in n.loads_t.p_set.sum().index)
|
||||||
|
& (f"{node} services rural heat" in n.loads_t.p_set.sum().index)
|
||||||
|
else 0.0
|
||||||
for node in nodal_df.index
|
for node in nodal_df.index
|
||||||
],
|
],
|
||||||
index=nodal_df.index,
|
index=nodal_df.index,
|
||||||
|
Loading…
Reference in New Issue
Block a user