Skip to content

Commit 200fd72

Browse files
committed
Add a EVChargerManager that can plug into the PowerDistributor
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 427e5eb commit 200fd72

File tree

5 files changed

+651
-0
lines changed

5 files changed

+651
-0
lines changed

src/frequenz/sdk/actor/power_distributing/_component_managers/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
from ._battery_manager import BatteryManager
77
from ._component_manager import ComponentManager
8+
from ._ev_charger_manager import EVChargerManager
89

910
__all__ = [
1011
"BatteryManager",
1112
"ComponentManager",
13+
"EVChargerManager",
1214
]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# License: MIT
2+
# Copyright © 2024 Frequenz Energy-as-a-Service GmbH
3+
4+
"""Manage ev chargers for the power distributor."""
5+
6+
from ._ev_charger_manager import EVChargerManager
7+
8+
__all__ = [
9+
"EVChargerManager",
10+
]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# License: MIT
2+
# Copyright © 2024 Frequenz Energy-as-a-Service GmbH
3+
4+
"""Configuration for the power distributor's EV charger manager."""
5+
6+
from collections import abc
7+
from dataclasses import dataclass, field
8+
from datetime import timedelta
9+
10+
from .....timeseries import Current
11+
12+
13+
@dataclass(frozen=True)
14+
class EVDistributionConfig:
15+
"""Configuration for the power distributor's EV charger manager."""
16+
17+
component_ids: abc.Set[int]
18+
"""The component ids of the EV chargers."""
19+
20+
min_current: Current = field(default_factory=lambda: Current.from_amperes(6.0))
21+
"""The minimum current that can be allocated to an EV charger."""
22+
23+
initial_current: Current = field(default_factory=lambda: Current.from_amperes(10.0))
24+
"""The initial current that can be allocated to an EV charger."""
25+
26+
increase_power_interval: timedelta = timedelta(seconds=60)
27+
"""The interval at which the power can be increased for an EV charger."""

0 commit comments

Comments
 (0)