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

Energy Scheduler #2789

Merged
merged 21 commits into from
Oct 22, 2024
Merged

Energy Scheduler #2789

merged 21 commits into from
Oct 22, 2024

Conversation

sfeilmeier
Copy link
Contributor

@sfeilmeier sfeilmeier commented Sep 11, 2024

  • Introduce generically usable EnergyScheduleHandler (ESH) for executing energy simulations and applying schedules
    • Provide nice debugLog output and channel "SimulationsPerQuarter" to detect performance issues
    • Use Cache for cost of Genotypes
  • Add config property "Version" to be able to switch between old (only ESS, but fast and well tested) and new (generic ESH but slower) implementation.
    • Attention: be sure to set EnergyScheduler (Core.Energy) and Controller.Ess.Time-Of-Use-Tariff to the same Version!
  • Introduce new implementation of EnergyFlow that uses linear constraint validation and optimization
  • Implement ESHs for
    • Controller.Ess.Time-Of-Use-Tariff,
    • Controller.Ess.EmergencyCapacityReserve,
    • Controller.Ess.LimitTotalDischarge and
    • Controller.Ess.GridOptimizedCharge (MANUAL only)
  • Old implementations are moved to v1 packages and marked @deprecated and will be removed in one of the next versions of OpenEMS. Unfortunately right now this leads to some mixed code.

- Introduce generically usable EnergyScheduleHandler (ESH) for executing energy simulations and applying schedules
  - Provide nice debugLog output and channel "SimulationsPerQuarter" to detect performance issues
- Introduce new implementation of `EnergyFlow` that uses linear constraint validation and optimization
- Implement for `Controller.Ess.Time-Of-Use-Tariff`, `Controller.Ess.EmergencyCapacityReserve`, `Controller.Ess.LimitTotalDischarge` and `Controller.Ess.GridOptimizedCharge` (ALPHA)
- Add config property "Version" to be able to switch between old (only ESS, but fast and well tested) and new (generic ESH but slower) implementation.
  - Attention: be sure to set EnergyScheduler (`Core.Energy`) and `Controller.Ess.Time-Of-Use-Tariff` to the same Version!
  - Old implementations are moved to `v1` packages and marked @deprecated and will be removed in one of the next versions of OpenEMS. Unfortunately right now this leads to some mixed code.
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 47.79834% with 818 lines in your changes missing coverage. Please review.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2789      +/-   ##
=============================================
+ Coverage      56.41%   56.54%   +0.14%     
- Complexity      8673     8882     +209     
=============================================
  Files           2147     2167      +20     
  Lines          90682    91918    +1236     
  Branches        6746     6834      +88     
=============================================
+ Hits           51146    51963     +817     
- Misses         37710    38097     +387     
- Partials        1826     1858      +32     

@sfeilmeier
Copy link
Contributor Author

Impulse by Stefan Feilmeier at OpenEMS Hackathon 2024 at Slashwhy offices in Osnabrück.

2024-09-12 OpenEMS Impluse EnergyScheduler.pdf

(cherry picked from commit 0a63f37e734506ba014c5edc4e0d9f6b38336b9f)
(cherry picked from commit 73ede82017a0249a8936cd41cc87aa2577e3e317)
(cherry picked from commit 577394289d1e3dfde20da3fdaee574812a57c8c1)
(cherry picked from commit 188ee048b6a5fa5fa445425995a39b1c1ca6d438)
(cherry picked from commit 2fecaca7c04e7b4597e5b5d8fa3e10de46cd84f0)
(cherry picked from commit e9e9fc8728db7b16ae5e39cc17b358301c2cc322)
(cherry picked from commit 0e513bbcdc0ce339693e059d84a5e1d565469f58)
- Apply Schedules also for current quarter if required
- Quick Schedules: Evaluate all combinations of first period with default states and previous simulation result
- Improve logs & Javadoc

(cherry picked from commit 1dfeff4903cfedb99f0376eb076b24a05106cc7d)
(cherry picked from commit 323d3b636e7ed70025e0607a955f0ba28915e226)
(cherry picked from commit 59fbce38fcc32bba2d998818c9204886bb5400d6)
(cherry picked from commit d5d52f91e46b828017ed0a9974ece9d74437ff28)
(cherry picked from commit 17f3aa4ec571c73baea42baa433fb69a1cf4101a)
…energy-scheduler

# Conflicts:
#	io.openems.common/src/io/openems/common/worker/AbstractWorker.java
#	io.openems.edge.controller.ess.timeofusetariff/test/io/openems/edge/controller/ess/timeofusetariff/TimeOfUseTariffControllerImplTest.java
#	io.openems.edge.energy/src/io/openems/edge/energy/Config.java
#	io.openems.edge.energy/src/io/openems/edge/energy/EnergySchedulerImpl.java
#	io.openems.edge.energy/src/io/openems/edge/energy/LogVerbosity.java
#	io.openems.edge.energy/src/io/openems/edge/energy/optimizer/Optimizer.java
#	io.openems.edge.energy/test/io/openems/edge/energy/EnergySchedulerImplTest.java
#	io.openems.edge.energy/test/io/openems/edge/energy/MyConfig.java
#	io.openems.edge.energy/test/io/openems/edge/energy/optimizer/UtilsTest.java
@sfeilmeier sfeilmeier merged commit 34b5e3a into develop Oct 22, 2024
6 of 7 checks passed
@sfeilmeier sfeilmeier deleted the feature/energy-scheduler branch October 22, 2024 07:11
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