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

Added Batteries #300

Merged
merged 3 commits into from
Feb 3, 2025
Merged

Conversation

DanteNiewenhuis
Copy link
Contributor

Summary

This PR adds batteries to OpenDC. Batteries are an alternate power source that can be charged and discharged depending on a BatteryPolicy.

The main use case for batteries is to reduce the carbon emissions of a data center.
The battery is charged when green energy is available.
Later, the energy stored in the battery is used when no green energy is available.

Batteries fit into the FlowGraph in the following way:

battery_model-Page-1 drawio

battery_model-Page-2 drawio

Adding a battery adds four new nodes:

  • A Battery of type SimBattery which can store energy
  • An extra distributor that can distribute energy between the battery and the hosts
  • An aggregator that takes energy from either the powerSource, or the battery
  • A Battery Policy that decides when the battery is charging, discharging, or idle

Currently, a single battery policy is implemented.
This policy works with a single carbon threshold.
If the carbon intensity is lower than the threshold, the battery is being charged.
Otherwise, the battery is being discharged.

The topology json schema is extended with an optional "battery" field.

Simply specify none (N/A) if not applicable.

…ng larger workloads.

Added mock files for the Battery implementation. Updated the Carbon Model to allow for multiple receivers of CarbonIntensity
@DanteNiewenhuis DanteNiewenhuis merged commit df1028c into atlarge-research:master Feb 3, 2025
4 checks passed
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (f471d06) to head (e9de393).
Report is 1 commits behind head on master.

Additional details and impacted files
@@      Coverage Diff      @@
##   master   #300   +/-   ##
=============================
=============================

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

@DanteNiewenhuis DanteNiewenhuis deleted the batteries branch February 3, 2025 12: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.

2 participants