Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace bioenergy and MSW stores with generators #1373

Merged
merged 10 commits into from
Nov 4, 2024
Merged

Conversation

cpschau
Copy link
Contributor

@cpschau cpschau commented Oct 18, 2024

Closes # (if applicable).

Changes proposed in this Pull Request

As the Generator component is extended in PyPSA/PyPSA#1047, it can replace the Store components for bioenergy and municipal solid waste. The extension of the Generator allows for a more efficient representation of finite resources, such as biomass, by eliminating the need for storage consistency constraints. Additionally, the desired model behavior to enforce the use of unsustainable bioenergy types and municipal solid waste is addressed through the new e_sum_min attribute.

bioenergy_balance

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

Copy link
Contributor

github-actions bot commented Oct 18, 2024

Validator Report

I am the Validator. Download all artifacts here.
I'll be back and edit this comment for each new commit.

General

Plots comparison
Main branch Feature branch
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Files comparison
Status NRMSE MAE (norm)
market_values.csv ⚠️Changed 0.000 0.06
weighted_prices.csv ⚠️Changed 0.446 0.37
metrics.csv ⚠️Changed 0.000 0.12
price_statistics.csv ⚠️Changed 0.001 0.15
nodal_capacities.csv ⚠️ NaN mismatch
nodal_supply_energy.csv ⚠️ NaN mismatch
nodal_cfs.csv ⚠️ NaN mismatch
supply.csv ⚠️ NaN mismatch
costs.csv ⚠️ NaN mismatch
nodal_costs.csv ⚠️ NaN mismatch
capacities.csv ⚠️ NaN mismatch
curtailment.csv ⚠️ NaN mismatch
supply_energy.csv ⚠️ NaN mismatch
cfs.csv ⚠️ NaN mismatch
energy.csv ⚠️ NaN mismatch
prices.csv ✅ Almost equal 0.024 0.03

NRMSE: Normalized (combined-min-max) Root Mean Square Error
MAE (norm): Mean Absolute Error on normalized data (min-max)
Status Threshold: MAE (norm) > 0.05 and NRMSE > 0.3

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing replace_stores_gens (996236d) with master (acf089f).
Branch is 10 commits ahead and 0 commits behind.
Last updated on 2024-11-04 14:56:46 CET.

@cpschau cpschau requested a review from fneum October 18, 2024 15:47
@p-glaum p-glaum mentioned this pull request Oct 31, 2024
7 tasks
Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed changes make sense, but some adjustments are necessary:

  • The new minimum version of PyPSA should be specified in the environment.yaml since this PR uses a new feature.
  • A release note should be added, especially since there are some hidden changes (i.e. forced use of MSW, changed carrier name for biomass transport)
  • Do you actually still need the operational limit GlobalConstraint for MSW? If you want all MSW to be used, you could also just set e_sum_min = e_sum_max, right?

@cpschau
Copy link
Contributor Author

cpschau commented Nov 4, 2024

Proposed changes make sense, but some adjustments are necessary:

* The new minimum version of PyPSA should be specified in the `environment.yaml` since this PR uses a new feature.

* A release note should be added, especially since there are some hidden changes (i.e. forced use of MSW, changed carrier name for biomass transport)

* Do you actually still need the operational limit GlobalConstraint for MSW? If you want all MSW to be used, you could also just set `e_sum_min = e_sum_max`, right?

Thanks for the review @fneum!

  1. Isn't the requirement pypsa>=0.31 already specified in the environment.yaml anyway?
  2. Done
  3. I think you need it for setups with biomass_spatial:true and biomass_transport:false when the MSW transport is mimicked using the additional Generator component. In that case the usage of MSW at a bus can be less than the bus' MSW potential (p_sum_min <= p_sum_max), as long as the difference is transported to and used at another bus using that same additional Generator as compensation. Therefore, the GlobalConstraint is still required to ensure the usage of the aggregate MSW potential.

Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation! If 0.31 is already specified, it's all good!

@fneum fneum merged commit 52b8179 into master Nov 4, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants