-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adaption of multilink implementation #549
Comments
I'm a bit sceptical, but interested to hear what others think. My thoughts:
|
The problems we currently encounter when using multilink is: The corresponding relationship between bus0, bus1, bus2, bus3 and efficiency, eff2, eff3 is not clear, it is easy to confuse, and some output or input need to use the positive and negative difference of eff, it is recommended to use a parameter to distinguish, similar to I think a brand new component would be better than extending |
Q: Should we refactor the multilink representation from wide table format to a long table format?
Some discussion points:
Not or partially supported functionalities and problematic extensions with current multilinks implementation:
IO
Atm we have to
use override_component_attrs
to load any pypsa-eur-sec network. There are also overrides not related to multilinks (https://github.com/PyPSA/pypsa-eur-sec/tree/master/data/override_component_attrs) but these are actually not necessarily needed as tracked by the IO of pypsa anyway (custom static columns are exported and imported). We discussed how to automatically support overrides when loading from disk #321 but it is tedious and requires deep dive into theio.py
module. For each data format we would need aparse_override
function to be called in the__init__
of the network before the override section and awrite_override
for each export.This becomes problematic as soon as we want to publish sector networks on Zenodo as stand alone files.
Clustering
Clustering does not support multilinks. This would need to be done when adding multilinks at an earlier stage in PyPSA-EUR.
Plotting
It is not possible to plot secondary links in the plotting routine. One had to create a new network in order to show intersector links and the sub topology of a location. Hiding links in the plot on the other hand is easy.
Statics
The statistics module is not aware of multilinks. Biggest hurdles are groupbys and negative efficiency's and emtpy rows. This would require quite some case distinctions and unnecessarily bloated code.
Power flow
The PF calculation does not support p_set of multilinks. In our workflows, we do not have electricity as secondary outputs, but users might rely on it.
Time-dependent efficiency's
This will be quiet tricky to generalize. Efficiency's would also be needed to go into the time series dict eventually with a subset of the link index. The
get_switchable_as_dense
function would need to be adapted quite clevery.Possible advantages of the alternative data structure using a
coupling
column:n.links[n.links.coupling.isnull()]
) and after the clustering a mapping of thecoupling
column to the linkmap.n.links.groupby(n.links.coupling.fillna(n.links.index)).marginal_cost.sum()
Possible disadvantages:
p0
has a subset of the link index in presence of secondary links.capital_cost
and need warning messages when used.the new patters would be
@fneum @nworbmot @lisazeyen
The text was updated successfully, but these errors were encountered: