Skip to content

Add start-up & shut-down variables #1318

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

Cerberus22
Copy link

Related issues

There is no related issue.

Changes introduces:

Variables were added to the model describing start-up and shut-down behavior of generators, if their unit commitment method is set to 3bin-., where . can be replaced with anything. Additionally, constraints were added to ensure the variables are correctly related to the existing model. Finally, a test case was added that will demonstrate all the constraints using the start-up & shut-down variables that will be added in later pull requests.

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 Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.38%. Comparing base (b56e625) to head (be80dc3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1318      +/-   ##
==========================================
+ Coverage   98.31%   98.38%   +0.06%     
==========================================
  Files          35       36       +1     
  Lines        1306     1361      +55     
==========================================
+ Hits         1284     1339      +55     
  Misses         22       22              

☔ 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.

@abelsiqueira abelsiqueira added the benchmark PR only - Run benchmark on PR label Aug 15, 2025
Copy link
Member

@abelsiqueira abelsiqueira 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 PR. I have some preliminary comments to complement the e-mail discussion.

I've enabled the workflows to run so the tests actually run. The benchmark can't run because it's from a fork, so you have to manually look into the documentation for instructions on how to run the benchmarks locally, and then paste the results here.

I haven't checked the content in details, and I won't evaluate the math behind it. Some comments on the rest:

  • The file name 3bin is not clear. It would be better to be explicit on what is supposed to be.
  • From recent experiences, I think it is better to split the 3bin file into two or three files (e.g., for simple and compact). Maybe create a folder for organisation, if you think it's necessary.
  • From recent experiences, we are trying to use Common Table Expressions (CTEs) in the query to improve readability. We don't have many examples, and not all queries require it, so maybe this is not necessary here. I leave the comment so we remember to check later.
  • Since you created a new case study, update test-case-studies with it. Otherwise, the new case study doesn't seem to be used anywhere.
  • You need documentation, at least for the formulation.
  • I don't get what the argument is 3bin-* where * is anything. Why is it left so broad?
  • It's better to first create the new case study in a separate PR with the test update. Makes it easier for reviewers.

Thanks!

@urosgluscevic
Copy link
Contributor

@abelsiqueira Thank you for the comment! I have split the 3bin.jl file into 3 files as you suggested, and given them clearer names. I have also added our case study to test-case-studies.

As for the question regarding the argument being named 3bin-*, we did this because we will be adding many different unit_commitment_methods, representing different levels of detail which can be used to model generator start-ups and shut-downs, but the constraints in this PR will be used in all of those levels of detail.

I also had a question about the benchmarks - should we change anything in the benchmarks, since we have added new variables and constraints, which only get created when the new 3bin-* argument is used?

Also, regarding your last point, is this something we should keep in mind for future PRs, or should we remove the test case from this PR?

Finally, I will hopefully push the changes tomorrow, after adding the documentation! Thank you very much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark PR only - Run benchmark on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants