Commit 0e19bf4
authored
Modularize status tracking for pools of components in the power distributing actor (#779)
The new design works as follows:
- reusable `ComponentPoolStatusTracker` that takes individual
`ComponentStatus` and generates `ComponentPoolStatus` objects.
- the individual `ComponentStatus` need to be generated by code specific
to the component category, because status is calculated differently for
different component categories. This code specific for a component
category has to be a class that implements the abstract
`ComponentStatusTracker` class.
- The `ComponentPoolStatusTracker` accepts implementations of
`ComponentStatusTracker`, like the `BatteryStatusTracker` (which looks
at the status of corresponding inverters also), and but is otherwise
generic.
This PR takes us part of the way towards getting the
PowerDistributingActor easily usable for other component types.
It also simplifies some implementations and replaces the use of
`MergeNamed` with `Merge` from the channels repo.File tree
14 files changed
+576
-484
lines changed- benchmarks/power_distribution
- src/frequenz/sdk
- actor/power_distributing
- microgrid
- timeseries/battery_pool
- tests
- actor
- power_distributing
- timeseries/_battery_pool
14 files changed
+576
-484
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
Lines changed: 0 additions & 214 deletions
This file was deleted.
0 commit comments