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

Calculations in plotting functions: calc_ac_loading, calc_dc_loading, plot_grid #741

Open pl0via opened 1 month ago

pl0via commented 1 month ago

There seem to be some incorrect calculation steps in the mentioned functions.

calc_ac_loading: Instead of taking the absolute sum, the individual directed power flows are offset against each other. As a result, existing power flows are partially omitted. The approach of calc_dc_loadings should be used:

calc_ac vs  calc_dc

Also, there seem to be calculation steps in reversed order when using calc_ac_loading and calc_dc_loading in combination with plot_grid(line_colors="line_loading"). When calculating the average power utilization, the sum value of all time steps is divided by the nominal power value (s_nom_opt for AC, p_nom_opt for DC), although it should be the rep_snapshots value:

average In order to calculate the share of the optimum power, the average power should be divided by s_nom_opt or p_nom_opt instead of rep_snapshots:

plot_grid