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

Update pypsa version (to 0.25.2) #663

Closed ulfmueller closed 7 months ago

ulfmueller commented 9 months ago

In general it is good to be state-of-the-art again and in particular I want to use the optimize_with_rolling_horizon() functionality (see #664 )...

I think it will be crucial then to mainly switch from lopf() to optimize() since many functionalities are no longer developed for the lopf()...

ClaraBuettner commented 9 months ago

This will also require updating pandas and python (now >=3.9) We should also decide if we want to use the new model-building option which would require adding our extra functionalities in this syntax.

ClaraBuettner commented 8 months ago

There is already pypsa 0.25.2 that includes some bugfixes, so I would directly switch to that version

ClaraBuettner commented 8 months ago

Changes in the clustering of pypsa require that all lines and transformers have an r != 0 assigned. For lines, this will be done in the data model. But so far, no transformer has an r value. We should decide if we can/want to fix this in the data model creation or within etrago.

ClaraBuettner commented 7 months ago

Check arguments:

Plots will be checked in #685

ClaraBuettner commented 7 months ago

The current version of the feature branch is working fine with the parameters that are already checked in the list above. You can use the branch for some tests when you take into account that the other setting (eg. ehv clustering) are not working or not checked yet.

ClaraBuettner commented 7 months ago

The problems that occurred when using ehv clustering were actually not a real bug, but a new behaviour in pypsa's clustering: When all time series values are the default value, the time series is dropped because it is the same as the static default value. Especially in test cases with only a few snapshots, the p__max_pu time series of some wind offshore generators is always 1. But eTraGos function "weighting_for_scenario" was always looking for a time series if the carrier was one of ["solar", "wind_onshore", "wind offshore"] which was not compatible with the new pypsa behaviour. I will adjust our function in eTraGo.