Skip to content

Commit 9a685cf

Browse files
committed
Improve documentation for *pool creation methods
This clarifies that `*pool` instances should be reused within actors and should have distinct priorities when created from different actors. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent cec3a97 commit 9a685cf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/frequenz/sdk/microgrid/_data_pipeline.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,15 @@ def ev_charger_pool(
445445
When specifying priority, bigger values indicate higher priority. The default
446446
priority is the lowest possible value.
447447
448+
It is recommended to reuse the same instance of the `EVChargerPool` within the
449+
same actor, unless they are managing different sets of EV chargers.
450+
451+
In deployments with multiple actors managing the same set of EV chargers, it is
452+
recommended to use different priorities to distinguish between them. If not,
453+
a random prioritization will be imposed on them to resolve conflicts, which may
454+
lead to unexpected behavior like longer duration to converge on the desired
455+
power.
456+
448457
Args:
449458
ev_charger_ids: Optional set of IDs of EV Chargers to be managed by the
450459
EVChargerPool. If not specified, all EV Chargers available in the
@@ -473,6 +482,15 @@ def battery_pool(
473482
When specifying priority, bigger values indicate higher priority. The default
474483
priority is the lowest possible value.
475484
485+
It is recommended to reuse the same instance of the `BatteryPool` within the
486+
same actor, unless they are managing different sets of batteries.
487+
488+
In deployments with multiple actors managing the same set of batteries, it is
489+
recommended to use different priorities to distinguish between them. If not,
490+
a random prioritization will be imposed on them to resolve conflicts, which may
491+
lead to unexpected behavior like longer duration to converge on the desired
492+
power.
493+
476494
Args:
477495
battery_ids: Optional set of IDs of batteries to be managed by the `BatteryPool`.
478496
If not specified, all batteries available in the component graph are used.

0 commit comments

Comments
 (0)