rl-institut / oemof-B3

An open-source energy system model for Brandenburg/Berlin.
https://oemof-b3.readthedocs.io/
GNU Affero General Public License v3.0
9 stars 5 forks source link

Keep multiindex level var_name #276

Closed MaGering closed 1 year ago

MaGering commented 1 year ago

Resolves #271

Plotting removes all multiindex levels that have only 1 value. This PR allows to define levels that should be kept and uses this to keep "var_name".

Note that issue https://github.com/rl-institut/oemof-B3/issues/278 persists at the time this PR was created. In order to test this PR the following functions need to be commented out:

    plot_capacities()
    subplot_invest_out_multi_carrier(CARRIERS_WO_CH4)
    subplot_storage_invest_multi_carrier(CARRIERS_WO_CH4)
    subplot_flow_out_multi_carrier(CARRIERS_WO_CH4)
    subplot_demands(CARRIERS)
    subplot_energy_usage_multi_carrier(CARRIERS)
MaGering commented 1 year ago

@jnnr, the fix does not work yet. So this PR is not ready for a review yet.

MaGering commented 1 year ago

@jnnr, the fix does not work yet. So this PR is not ready for a review yet.

Okay I could locate the bug. It was due to empty data in plot_capacities function. In PR https://github.com/rl-institut/oemoflex/pull/74 we removed capacities from the results since it is an input parameter, not a result.

We will drop plot_capacities with the changes that resolve issue https://github.com/rl-institut/oemof-B3/issues/278.

This PR is ready for review @jnnr. To do this you'll need to comment plot_capacities out together with the subplot functions (see my comment at the top).