Skip to content

Commit e00cc91

Browse files
committed
Make FormulaEngines generic over Quantity types
This commit also updates the generated formulas to use the right generic types like Power and Current, for power and current formulas respectively. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent ba1bec5 commit e00cc91

21 files changed

+284
-164
lines changed

examples/power_distribution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from frequenz.sdk.actor import ResamplerConfig
2323
from frequenz.sdk.actor.power_distributing import Result, Success
2424
from frequenz.sdk.timeseries import Sample
25-
from frequenz.sdk.timeseries._quantities import Quantity
25+
from frequenz.sdk.timeseries._quantities import Power
2626

2727
_logger = logging.getLogger(__name__)
2828
HOST = "microgrid.sandbox.api.frequenz.io" # it should be the host name.
@@ -98,7 +98,7 @@ class DataCollectingActor:
9898
def __init__(
9999
self,
100100
request_channel: Sender[List[float]],
101-
active_power_data: Receiver[Sample[Quantity]],
101+
active_power_data: Receiver[Sample[Power]],
102102
) -> None:
103103
"""Create actor instance.
104104

0 commit comments

Comments
 (0)