fixup! base_network: Don't update the capacity of TYNDP links from links_p_nom
This commit is contained in:
parent
3edc075628
commit
6f3b44e5e4
@ -218,7 +218,7 @@ def _set_electrical_parameters_links(links):
|
|||||||
|
|
||||||
p_nom = links_p_nom.dropna(subset=["j"]).set_index("j")["Power (MW)"]
|
p_nom = links_p_nom.dropna(subset=["j"]).set_index("j")["Power (MW)"]
|
||||||
# Don't update p_nom if it's already set
|
# Don't update p_nom if it's already set
|
||||||
p_nom_unset = p_nom.drop(links.index[links.p_nom.notnull()], errors='ignore')
|
p_nom_unset = p_nom.drop(links.index[links.p_nom.notnull()], errors='ignore') if "p_nom" in links else p_nom
|
||||||
links.loc[p_nom_unset.index, "p_nom"] = p_nom_unset
|
links.loc[p_nom_unset.index, "p_nom"] = p_nom_unset
|
||||||
|
|
||||||
return links
|
return links
|
||||||
|
Loading…
Reference in New Issue
Block a user