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

Explicit demand response peak load #484

Merged
merged 68 commits into from
Jan 15, 2025

Conversation

Manish-Khanra
Copy link
Contributor

@Manish-Khanra Manish-Khanra commented Nov 16, 2024

Pull Request

Related Issue

Closes #[issue number] (if applicable)

Description

Changes Proposed

Implementation of Flexibility Measures:

  1. Cost-Based Load Shifting: Optimize operations to minimize variable costs while considering load-shifting capabilities.
  2. Congestion Management Flexibility: Adjust operations based on grid congestion signals to reduce congestion at critical nodes.
  3. Peak Load Shifting: Curtail demand during peak load periods to adhere to capacity constraints and improve grid stability.
  4. Renewable Utilisation: Align operational load increases with renewable energy availability to enhance grid sustainability.
  5. Deprecated indexing warnings for pd.Series and replaced with .iloc.

Testing

Individual test fixtures for each flexibility measure.

Checklist

Please check all applicable items:

  • Code changes are sufficiently documented (docstrings, inline comments, doc folder updates)
  • New unit tests added for new features or bug fixes
  • Existing tests pass with the changes
  • Reinforcement learning examples are operational (for DRL-related changes)
  • Code tested with both local and Docker databases
  • Code follows project style guidelines and best practices
  • Changes are backwards compatible, or deprecation notices added
  • New dependencies added to pyproject.toml
  • A note for the release notes doc/release_notes.rst of the upcoming release is included
  • Consent to release this PR's code under the GNU Affero General Public License v3.0

Additional Notes (if applicable)

[Any additional information, concerns, or areas you want reviewers to focus on]

Screenshots (if applicable)

[Add screenshots to demonstrate visual changes]

nick-harder and others added 30 commits October 17, 2024 16:24
-convert DST to classes
-add residential components
-add new tests
-refactor code
-add dst_componnets to the world
-adjust notebook 10
-fix docstrings
-remove unrequired dst base class
-add operationl_cost constraints to heatpump, boiler, and PV
-revise all tests and add complete tests for each DST component
-remove common constraint definition outside
@kim-mskw
Copy link
Contributor

kim-mskw commented Nov 21, 2024

Discussion with @Manish-Khanra we used a big-M formulation to linearise the problem formulation. The second objective loop was reformulated to include the absolute values of the shift; otherwise, the objective value was forced to 0 due to the demand covering constraint, which led to arbitrary solutions.

Note that there are no costs included in the second objective loop, leading to multiple possible solutions with the same absolute load shift that does not violate the cost increase constraints. Hence, different solvers will most likely result in different solutions.

image

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 91.53846% with 22 lines in your changes missing coverage. Please review.

Project coverage is 78.01%. Comparing base (cdaf49f) to head (e1e727b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
assume/units/dsm_load_shift.py 92.65% 13 Missing ⚠️
assume/common/forecasts.py 92.75% 5 Missing ⚠️
assume/strategies/naive_strategies.py 0.00% 3 Missing ⚠️
assume/units/hydrogen_plant.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #484      +/-   ##
==========================================
+ Coverage   77.52%   78.01%   +0.49%     
==========================================
  Files          50       50              
  Lines        6812     6938     +126     
==========================================
+ Hits         5281     5413     +132     
+ Misses       1531     1525       -6     
Flag Coverage Δ
pytest 78.01% <91.53%> (+0.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Manish-Khanra and others added 7 commits November 26, 2024 14:42
-remove changes in example.py
-refactor csv forecaster for better usability
-revise hinting in csvforecaster
-remove unused code
-fix naming of strategies
-fix tests
-small changes
Copy link
Member

@nick-harder nick-harder left a comment

Choose a reason for hiding this comment

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

@Manish-Khanra I have fixed several things and streamlined the code. Everything is fine, but there are some things you should address before we can merge this into main

assume/units/steel_plant.py Outdated Show resolved Hide resolved
assume/units/hydrogen_plant.py Outdated Show resolved Hide resolved
assume/units/hydrogen_plant.py Outdated Show resolved Hide resolved
examples/examples.py Outdated Show resolved Hide resolved
@nick-harder
Copy link
Member

@Manish-Khanra also please complete the PR form above

@nick-harder nick-harder merged commit 15e9585 into main Jan 15, 2025
6 of 7 checks passed
@nick-harder nick-harder deleted the explicit_demand_response_peak_load branch January 15, 2025 15:02
tiernan-buckley-ufr pushed a commit that referenced this pull request Jan 17, 2025
Implementation of Flexibility Measures:
1. Cost-Based Load Shifting: Optimize operations to minimize variable
costs while considering load-shifting capabilities.
2. Congestion Management Flexibility: Adjust operations based on grid
congestion signals to reduce congestion at critical nodes.
3. Peak Load Shifting: Curtail demand during peak load periods to adhere
to capacity constraints and improve grid stability.
4. Renewable Utilisation: Align operational load increases with
renewable energy availability to enhance grid sustainability.

Co-authored-by: Nick Harder <[email protected]>
Co-authored-by: Florian Maurer <[email protected]>
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.

Implicity and Explicit DSM
4 participants