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

Refactor DistibutionAlgorithm to segregate different algorithms #415

Open
daniel-zullo-frequenz opened this issue May 30, 2023 · 0 comments
Labels
part:power-management Affects the management of battery power and distribution type:enhancement New feature or enhancement visitble to users
Milestone

Comments

@daniel-zullo-frequenz
Copy link
Contributor

daniel-zullo-frequenz commented May 30, 2023

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)

@daniel-zullo-frequenz daniel-zullo-frequenz added part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed type:enhancement New feature or enhancement visitble to users labels May 30, 2023
@daniel-zullo-frequenz daniel-zullo-frequenz changed the title Refactor DistibutionAlgorithm to segregate different distribution algorithms Refactor DistibutionAlgorithm to segregate different algorithms May 30, 2023
@llucax llucax added this to the post-v1.0 milestone Aug 8, 2023
@llucax llucax added part:power-management Affects the management of battery power and distribution and removed priority:❓ We need to figure out how soon this should be addressed part:❓ We need to figure out which part is affected labels Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:power-management Affects the management of battery power and distribution type:enhancement New feature or enhancement visitble to users
Projects
Status: To do
Development

No branches or pull requests

2 participants