Commit ddca86b
committed
Fix log when multiple batteries are attached to an inverter
Without this, when 10 kW is distributed to 3 batteries, 2 of them
attached to a single inverter, the debug log displayed the same power
for the two batteries, totalling to higher than what was requested,
which is misleading (formatted for readability):
Distributing power 10 kW between the batteries {
ComponentId(1005): Power(value=6720.751321413104, exponent=0),
ComponentId(1004): Power(value=6720.751321413104, exponent=0),
ComponentId(1001): Power(value=3279.248678586895, exponent=0)
}
With this change, the log looks like this:
Distributing power 10 kW between the batteries: (CID1004, CID1005): 6.72 kW, CID1001: 3.28 kW
Also improved the formatting.
Signed-off-by: Sahas Subramanian <[email protected]>1 parent 16887b1 commit ddca86b
File tree
1 file changed
+16
-9
lines changed- src/frequenz/sdk/microgrid/_power_distributing/_component_managers
1 file changed
+16
-9
lines changedLines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
282 | 289 | | |
283 | 290 | | |
284 | 291 | | |
| |||
0 commit comments