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

Fix links ramp up start limit #691

Closed
wants to merge 9 commits into from
Closed

Fix links ramp up start limit #691

wants to merge 9 commits into from

Conversation

lisazeyen
Copy link
Contributor

@lisazeyen lisazeyen commented Jul 24, 2023

Closes #592.

Changes proposed in this Pull Request

This PR should set the expected behaviour of ramp_limit_start_up and ramp_limit_shut_down
ToDos:

  • activate ramping constraints also if only ramp_limit_start_up is defined and not ramp_limit_up
  • modify constraint so that ramp_limit_start_up is working as intended

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 Jul 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.19% ⚠️

Comparison is base (bea1ce7) 78.35% compared to head (367a949) 78.16%.

❗ Current head 367a949 differs from pull request most recent head 075e07e. Consider uploading reports for the commit 075e07e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #691      +/-   ##
==========================================
- Coverage   78.35%   78.16%   -0.19%     
==========================================
  Files          26       26              
  Lines        6758     6760       +2     
  Branches     1466     1466              
==========================================
- Hits         5295     5284      -11     
- Misses       1151     1163      +12     
- Partials      312      313       +1     
Files Changed Coverage Δ
pypsa/optimization/constraints.py 88.38% <100.00%> (-3.04%) ⬇️

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

limit_shut = assets.eval("ramp_limit_shut_down * p_nom").to_xarray()
limit_down = assets.eval("ramp_limit_down * p_nom").to_xarray()
limit_down = assets.eval("ramp_limit_down * p_nom").fillna(1.0).to_xarray()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am wondering whether the fill with 1 makes sense here, since this is in units of MW.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no it has to be filled with then "p_nom". Thanks for pointing it out. I already corrected it but haven't pushed it yet. I am currently having troubles since the problem seems to be unbounded with the new formulation of the constraint

@matlawsky
Copy link

Hello, does present changes on this branch solve the ramp up limits problem ?

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.

Links ramp_start_up_limit not behaving as expected
3 participants