Skip to content

Conversation

@shsms
Copy link
Contributor

@shsms shsms commented Nov 20, 2023

All the battery-specific logic has been moved into a BatteryManager (which implements ComponentManager). This includes

  • component status tracking
  • bounds tracking
  • distribution algorithm
  • control methods

This allows us to add ComponentManager implementations for additional component categories, that can be used with the PowerDistributingActor.

This is never expected to happen, because the task only reads from
channels and writes to channels, and unless there's a bug in the SDK
that closes the channels, the task won't die.

Signed-off-by: Sahas Subramanian <[email protected]>
This just moves the code out, so that it becomes easier to generalize
and cleanup.

Signed-off-by: Sahas Subramanian <[email protected]>
Also rename the file _distribution_algorithm.py →
_battery_distribution_algorithm.py.

Signed-off-by: Sahas Subramanian <[email protected]>
@shsms shsms requested a review from a team as a code owner November 20, 2023 15:46
@github-actions github-actions bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:data-pipeline Affects the data pipeline part:actor Affects an actor ot the actors utilities (decorator, etc.) part:microgrid Affects the interactions with the microgrid labels Nov 20, 2023
@shsms
Copy link
Contributor Author

shsms commented Nov 20, 2023

There might be some reusable code in the BatteryManager, but that can be pulled out as we start implementing support for other categories. This is already enough to get started with those.

Copy link
Contributor

@daniel-zullo-frequenz daniel-zullo-frequenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have a couple of minor suggestions to check for.

@llucax llucax added this to the v1.0.0-rc4 milestone Nov 21, 2023
Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also only comments about release notes.

Comment on lines -29 to +31
succeeded_batteries: set[int]
"""The subset of batteries for which power was set successfully."""
succeeded_components: abc.Set[int]
"""The subset of components for which power was set successfully."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes should also go to the upgrading notes, as these types are now read-only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done here: b9c8573a

Signed-off-by: Sahas Subramanian <[email protected]>
@shsms shsms force-pushed the power-dist-generic-control branch from 253e5f7 to b9c8573 Compare November 21, 2023 11:12
Co-authored-by: daniel-zullo-frequenz <[email protected]>
Signed-off-by: Sahas Subramanian <[email protected]>
@shsms shsms added this pull request to the merge queue Nov 21, 2023
Merged via the queue into frequenz-floss:v1.x.x with commit 5af26d8 Nov 21, 2023
@shsms shsms deleted the power-dist-generic-control branch November 21, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:actor Affects an actor ot the actors utilities (decorator, etc.) part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:microgrid Affects the interactions with the microgrid part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

Development

Successfully merging this pull request may close these issues.

3 participants