Skip to content

Refactor DistibutionAlgorithm to segregate different algorithms #415

Open
@daniel-zullo-frequenz

Description

@daniel-zullo-frequenz

What's needed?

There is a need to differentiate between two types of algorithms currently present in the DistributionAlgorithm implementation. This distinction is necessary to prevent confusion and improve clarity.

Proposed solution

To address this issue, the following improvements can be implemented:

  1. Transform DistributionAlgorithm into an abstract base class.
  2. Introduce two new subclasses: SoCBalancingAlgorithm and BlindDivisionAlgorithm and BlindAverageAlgorithm (name to be defined).

Additionally, it is suggested to reorganize the power package hierarchy by adding another level. This would result in classes such as power.distribution.Algorithm, power.distribution.SoCBalancingAlgorithm, etc. This restructure enables convenient usage like from ...power import distribution, distribution.SoCBalancingAlgorithm.

Additional context

For more detailed context, please refer to the initial discussion at #365 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:power-managementAffects the management of battery power and distributiontype:enhancementNew feature or enhancement visitble to users

    Type

    No type

    Projects

    Status

    To do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions