Keep links to store components when using ATK wildcard (#214)

* Update prepare_network.py

The new ATK wildcard removes all lines + links without further distinction; however, since storage options are now modeled as store components, the links to and from the the storage units for (dis)charge are eliminated as well. Thus, the storage options drop out of the optimisation. 
Especially when only allowing renewables as generation sources, optimisation may become infeasible for a high temporal resolution (capacity factors = 0 for certain hours; no further options to serve the load). 
This issue does not arise with the ATKc wildcard, since bus0 and bus1 of the (dis)charge links share the same country code.

The proposed change is a very quick fix in the enforce_autarky function, solely removing DC links.

* Update scripts/prepare_network.py

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>

* Update prepare_network.py

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
This commit is contained in:
Chiara Anselmetti 2021-01-11 10:27:27 +01:00 committed by GitHub
parent 8f2ace03ee
commit ed4fdc9150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ def enforce_autarky(n, only_crossborder=False):
].index
else:
lines_rm = n.lines.index
links_rm = n.links.index
links_rm = n.links.loc[n.links.carrier=="DC"].index
n.mremove("Line", lines_rm)
n.mremove("Link", links_rm)