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 stores with generators #1372

Open
wants to merge 51 commits into
base: ariadne2
Choose a base branch
from
Open

Conversation

cpschau
Copy link
Contributor

@cpschau cpschau commented Oct 18, 2024

Closes #1336

Changes proposed in this Pull Request

As the Generator component is extended in PyPSA/PyPSA#1047, it can replace the bioenergy Store components. 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 is addressed through the new e_sum_min attribute.

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.

amos-schledorn and others added 30 commits September 12, 2024 15:24
Co-authored-by: Fabian Neumann <[email protected]>
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/psf/black-pre-commit-mirror: 24.8.0 → 24.10.0](psf/black-pre-commit-mirror@24.8.0...24.10.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
fneum and others added 11 commits October 10, 2024 08:06
Add option to reduce central heating supply temperatures annually (defaults to 1%/a)
* prepare for pypsa `0.31.0`

* Update mock_snakemake (#1345)

* test: log env diff (#1338)

* Update mock_snakemake

---------

Co-authored-by: Lukas Trippe <[email protected]>
Co-authored-by: Fabian Neumann <[email protected]>

* resolve other deprecations

---------

Co-authored-by: Davide Fioriti <[email protected]>
Co-authored-by: Fabian Neumann <[email protected]>
* [create-pull-request] automated change

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: lkstrp <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@cpschau cpschau requested a review from lindnemi October 18, 2024 11:59
# Set e_sum_max to the potential to limit the faux biomass transport
n.generators.loc[
n.generators.carrier == "unsustainable solid biomass", "e_sum_max"
] = unsustainable_solid_biomass_potentials_spatial.sum()
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is the right constraint. There is one generator for every bus, and if every bus has access to the sum of the total potential wouldn't we get n_buses * total_potential of import capacity?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah i see, the GlobalConstraint is just below and remains there. Then the questions if, if this e_sum_max constraint is still needed or only a duplicate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you are right that it is not only redundant, but actually false. The e_sum_max set at the original generator intialization in

e_sum_max=unsustainable_solid_biomass_potentials_spatial,
should remain. All the generation needed beyond that local limit must be provided by the other "artifical" generator, that also takes into account the transport costs.

@lindnemi
Copy link
Contributor

So far, you changed only the unsustainable stores to generators. Didn't we discuss with @fneum that now all Biomass stores should be changed to generators (which would save the storage constraints, and avoid the possibility that the unsustainable biomass flows through the stores due to numerical inaccuracies)?

@cpschau
Copy link
Contributor Author

cpschau commented Oct 23, 2024

So far, you changed only the unsustainable stores to generators. Didn't we discuss with @fneum that now all Biomass stores should be changed to generators (which would save the storage constraints, and avoid the possibility that the unsustainable biomass flows through the stores due to numerical inaccuracies)?

You are right! This was just a quick draft to resolve the solvability issues for ariadne. All other stores will be replaced in #1373.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants