Commit d6ae10c
authored
Fix log when multiple batteries are attached to an inverter (#1262)
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.File tree
2 files changed
+22
-11
lines changed- src/frequenz/sdk/microgrid/_power_distributing/_component_managers
2 files changed
+22
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
Lines changed: 20 additions & 11 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 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
280 | 289 | | |
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
284 | 293 | | |
285 | 294 | | |
286 | 295 | | |
287 | | - | |
| 296 | + | |
288 | 297 | | |
289 | 298 | | |
290 | 299 | | |
| |||
294 | 303 | | |
295 | 304 | | |
296 | 305 | | |
297 | | - | |
| 306 | + | |
298 | 307 | | |
299 | 308 | | |
300 | 309 | | |
| |||
0 commit comments