Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* `frequenz.sdk.actor.power_distributing`: the `power` attribute of the `Request` class has been updated from `int` to a `float`.
* `frequenz.sdk.microgrid`: the `set_power()` method of both the `MicrogridApiClient` and `MicrogridGrpcClient` classes now expect a `float` value for the `power_w` parameter instead of `int`.

* The `LogicalMeter` no longer takes a `component_graph` parameter.

## New Features

<!-- Here goes the main new features and examples or instructions on how to use them -->
Expand Down
1 change: 0 additions & 1 deletion examples/power_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ async def run() -> None:
logical_meter = LogicalMeter(
channel_registry,
resampling_actor_request_channel.new_sender(),
connection_manager.get().component_graph,
)
sending_actor_id: str = "SendingActor"
# Bidirectional channel is used for one sender - one receiver communication
Expand Down
1 change: 0 additions & 1 deletion src/frequenz/sdk/microgrid/_data_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def logical_meter(self) -> LogicalMeter:
self._logical_meter = LogicalMeter(
channel_registry=self._channel_registry,
resampler_subscription_sender=self._resampling_request_sender(),
component_graph=connection_manager.get().component_graph,
)
return self._logical_meter

Expand Down
5 changes: 0 additions & 5 deletions src/frequenz/sdk/timeseries/logical_meter/_logical_meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from frequenz.channels import Sender

from ...actor import ChannelRegistry, ComponentMetricRequest
from ...microgrid import ComponentGraph
from ...microgrid.component import ComponentMetricId
from .._formula_engine import FormulaEngine, FormulaEngine3Phase, FormulaEnginePool
from .._formula_engine._formula_generators import (
Expand Down Expand Up @@ -60,7 +59,6 @@ class LogicalMeter:
logical_meter = LogicalMeter(
channel_registry,
resampling_request_sender,
microgrid.get().component_graph,
)

# Get a receiver for a builtin formula
Expand All @@ -87,7 +85,6 @@ def __init__(
self,
channel_registry: ChannelRegistry,
resampler_subscription_sender: Sender[ComponentMetricRequest],
component_graph: ComponentGraph,
) -> None:
"""Create a `LogicalMeter instance`.

Expand All @@ -96,15 +93,13 @@ def __init__(
actor.
resampler_subscription_sender: A sender for sending metric requests to the
resampling actor.
component_graph: The component graph representing the microgrid.
"""
self._channel_registry = channel_registry
self._resampler_subscription_sender = resampler_subscription_sender

# Use a randomly generated uuid to create a unique namespace name for the local
# meter to use when communicating with the resampling actor.
self._namespace = f"logical-meter-{uuid.uuid4()}"
self._component_graph = component_graph
self._formula_pool = FormulaEnginePool(
self._namespace,
self._channel_registry,
Expand Down