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

Coupling generators #738

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Coupling generators #738

wants to merge 13 commits into from

Conversation

FabianHofmann
Copy link
Collaborator

@FabianHofmann FabianHofmann commented Sep 26, 2023

Minimal invasive alternative to #549
closes #549

From release notes:
It is now possible to couple the dispatch of generators. For this purpose, three new columns p_coupling, p_coupling_coeff and p_coupling_sign have been added to the generator component. They allow coupling the dispatch of one generator to another generator by adding a linear constraint to the optimization problem. The condition is of the form p {p_coupling_sign} {p_coupling_sign} * p_{p_coupling}. The coupling is applied only when the coupling generator is active.

See the example here: https://pypsa--738.org.readthedocs.build/en/738/examples/generator_coupling.html

This change is purely additive and does not remove any functionality. It might be quite helpful for pypsa-eur as it allows keeping the generators coming from "electricity only" and complement them via additional coupled input/output generators.

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • Newly introduced dependencies are added to environment.yaml, environment_docs.yaml and setup.py (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Attention: Patch coverage is 85.18519% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 66.31%. Comparing base (baa242b) to head (8687a8b).

Files Patch % Lines
pypsa/components.py 50.00% 1 Missing and 1 partial ⚠️
pypsa/optimization/constraints.py 90.90% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #738      +/-   ##
==========================================
+ Coverage   66.24%   66.31%   +0.06%     
==========================================
  Files          26       26              
  Lines        7063     7089      +26     
  Branches     1418     1423       +5     
==========================================
+ Hits         4679     4701      +22     
- Misses       2102     2104       +2     
- Partials      282      284       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Adaption of multilink implementation
1 participant