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

Draft: Rl strategy for household #476

Draft
wants to merge 10 commits into
base: michael_thesis
Choose a base branch
from

Conversation

HafnerMichael
Copy link
Collaborator

Pull Request

Related Issue

Closes #[issue number] (if applicable)

Description

[Provide a brief description of the changes in this PR]

Changes Proposed

  • [List the main changes or features implemented]

Testing

[Describe the testing you've done, including any specific test cases or scenarios]

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]

@HafnerMichael HafnerMichael force-pushed the RL-strategy-for-household branch 2 times, most recently from 2abd633 to ecb724c Compare November 9, 2024 14:24
@HafnerMichael
Copy link
Collaborator Author

HafnerMichael commented Nov 10, 2024

@nick-harder I created a draft PR for you to have a overview of what I changed for the household.
Just a short summary:

  • I adapted the Building class for the RL strategy (added execute_current_dispatch and set_dispatch_plan) <- no test written so far (I dont want to have double work since Manish needs to write the building tests anyways and after that I can adapt my cases) but existing code and logic got used from the storage unit
  • Added a RL strategy for the building unit. (Logic got tested)
  • I added also a new action which determines the amount of charge/discharging. If everything is working then, I also have an idea to add another action for the PV amount, therefore also the producers can adapt there produced amount. But not sure for now if this will be still part of my thesis.

But I face/faced two issues:

  1. If I run the code the following error occurs in the learning_unit_operator:
    image
    The simulation does not crash but somehow something is wrong here...
    ✅ Solved, but not sure if it was an issue on my side or if it is a general issue.
  2. First I wanted to run a simulation (EEGH_2024_single_storage) where only one household follows the RL strategy and all the others optimize via the simple strategy that should be a valid scenario right? But if it comes to training, somehow the components of a building get initialized wrong. I get an error that the components dict cannot be accessed anymore since there is not the structure e.g {pv_plant: dict} it is now {pv_plant: PVPlant} in the init of a building. Therefore i get an AttributeError in the init of a building because the existing logic does not work anymore. I debugged it already a bit but stopped it since I don't know if my scenario is even valid or not. The only thing I found out is, that only those buildings, wich do not follow the RL_strategy get initialized wrongly and the rl strategy one still has the components as dict in it. I now test the RL_strategy with all households but I thought it should be possible to mix strategies of households or is that not possible?

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.

1 participant