Skip to content

Fix: Inconsistent MW vs MWh Units in Battery Environment #71

@ADGEfficiency

Description

@ADGEfficiency

Description

The battery environment currently has inconsistencies in how it handles power (MW) and energy (MWh) units, leading to incorrect energy accounting and potentially unrealistic battery behavior.

Background

In battery modeling, it's crucial to maintain consistent units:

  • Power (MW) represents instantaneous capacity to charge/discharge
  • Energy (MWh) represents accumulated charge over time

Currently, the code has several TODOs related to unit conversion and is directly adding power values (MW) to energy values (MWh) without proper conversion, which is physically incorrect.

Proposed Changes

  • Implement proper conversion between MW and MWh based on the time interval (MW * hours = MWh)
  • Fix the battery losses model to utilize the efficiency_pct parameter that's currently unused
  • Ensure reward calculation correctly uses energy (MWh) not power (MW)
  • Add tests verifying correct energy balance and unit conversions
  • Update documentation to clarify unit conventions throughout the battery model

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions