openego / eTraGo

Optimization of flexibility options for transmission grids based on PyPSA
GNU Affero General Public License v3.0
30 stars 13 forks source link

Fix disaggregation #674

Closed ClaraBuettner closed 8 months ago

ClaraBuettner commented 9 months ago

The original PR to disaggregate links and stores (#629) included some problems, e.g. https://github.com/openego/eTraGo/pull/629/commits/95c22f016fba3dfb22074fa7b5c0c7832a089482 assumed that etrago.clustering.busmapis a pandas.Series, but it is a dictionary. In addition, some commits from https://github.com/openego/eTraGo/tree/features/disaggregate-links-and-stores-update-busmap were not part of the merged branch. I fixed those problems in this branch. This branch also solves #644

ClaraBuettner commented 8 months ago

The problems when disaggregating load_shedding generators after the pf_post_lopf occur because the control strategies for generators are set multiple times, and sometimes different. That resulted in different control strategies for load_shedding generators in the aggregated and the disaggregated network. I think it is the best solution to set the control strategies only once, and at a central place. I will look for that, change the code and inform you when it is done.

ClaraBuettner commented 8 months ago

I tested this branch and it ran OK. It was not tested when PF post LOPF is activated.

I fixed the problems, it now also works when the pf was executed.