Skip to content

Add low bound to the sum of flows for transport flows #1172

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

Closed
wants to merge 5 commits into from

Conversation

gnawin
Copy link
Member

@gnawin gnawin commented Apr 25, 2025

Model

  • Enforce free signs only for transport flows, the rest flows will have a low bound of 0.
  • Add a lower bound of 0 for the sum of outgoing flows, if one of them is a transport flow, for producers, conversions, and storages. Exclude assets with UC because the bound is already applied by constraint min_output_flow_with_unit_commitment.
  • Add a lower bound of 0 for the sum of incoming flows, if one of them is a transport flow, for conversions, and storages. Since UC does not have bounds for incoming flows, so assets with UC are not excluded.

Documentation

  • Update concepts.
  • Update mathematical formulation.

Related issues

Closes #1159, #1168

Checklist

  • I am following the contributing guidelines

  • Tests are passing

  • Lint workflow is passing

  • Docs were updated and workflow is passing

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.66%. Comparing base (4d26355) to head (fa3ad37).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/variables/flows.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1172      +/-   ##
==========================================
- Coverage   97.78%   97.66%   -0.13%     
==========================================
  Files          30       30              
  Lines        1131     1158      +27     
==========================================
+ Hits         1106     1131      +25     
- Misses         25       27       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gnawin gnawin closed this Apr 28, 2025
@gnawin gnawin force-pushed the 1159-add-lower-bound branch from b0d6fdb to fa3ad37 Compare April 28, 2025 12:40
@gnawin gnawin reopened this Apr 28, 2025
@gnawin gnawin marked this pull request as ready for review April 28, 2025 12:46
@gnawin gnawin requested a review from datejada April 28, 2025 12:47
@gnawin
Copy link
Member Author

gnawin commented Apr 28, 2025

For some reason, codecov complains. However, when I run generate_coverage() locally, there is no difference between main and this branch - all % match. Codecov says there is less coverage for ramping-and-unit-commitment.jl, but it is 100%.

Here is the report for main:
main

Here is the report for this branch:
branch

Copy link
Member

@datejada datejada left a comment

Choose a reason for hiding this comment

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

@gnawin Thanks for the changes, they look good. Minor comments on the text and two main comments:

  1. One for now: I see that you are not testing the new constraints, aren't you? I mean, you don't change any data in the case studies that are actually generating these constraints. I am saying this because I was expecting changes in the MPS files of one of the case studies (Norse, perhaps?). Any particular reason that I might be missing? otherwise I would suggest testing the new constraints by modifying the Norse.
  2. long-term, so not in this PR (for future record): some constraints might be just bounds, if the asset only has one input or output. So, if we identify those cases beforehand, we can avoid creating constraints that are actually bounds. As I said, for the future 😃

@gnawin
Copy link
Member Author

gnawin commented Apr 28, 2025

Closed in favor of #1178

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.

Lower bound for the capacity constraints
2 participants