openego / eDisGo

Optimization of flexibility options and grid expansion for distribution grids based on PyPSA
GNU Affero General Public License v3.0
37 stars 14 forks source link

Wp flex changed reinforcement #395

Closed birgits closed 4 months ago

birgits commented 6 months ago

Description

This PR mainly changes the implementation of reduced_analysis. reduced_analysis can be used to conduct the grid reinforcement on a reduced number of time steps to avoid running the power flow for all time steps, including ones without grid issues, and thus speed up calculations. As it was implemented so far, the reduced_analysis could not be used to run the reinforcement for single LV grids or a subset of time steps. The latter is needed to use it in the catch_convergence_reinforce_grid function to conduct grid reinforcement for the converged time steps first.

The PR also now allows to weight time steps by estimated grid expansion costs analogous to how it was already possible in the selection of the most critical time intervals. This can be useful to further reduce the number of time steps to the most relevant ones.

Further, a fixes small bug in selection of time intervals.

Type of change

Checklist:

birgits commented 5 months ago

Thank you so much @AnyaHe for your valuable comments. I implemented some of your suggestions and also have a few points I would like to discuss further. See comments above :)

AnyaHe commented 4 months ago

Thanks @birgits for addressing all the comments and the improvements in this PR. From my side, you can merge now. Great work! :)