Commit 6561b9b
fix(prediction): bound import/export kWh to end_record, not the full forecast horizon
run_prediction() returned the raw, whole-loop import_kwh_battery/house and
export_kwh accumulators instead of the already-computed final_* variants that
are correctly gated to end_record (matching final_metric/final_soc). Any
caller planning a longer horizon than it bills (e.g. the annual tool's 48h
lookahead billed as one day, or Compare's 48h plan billed as 24h) reported
import/export inflated by the unbilled spillover period - roughly double for
a flat load. Mirrored the same fix into the C++ kernel and bumped the parity
revision.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 400171d commit 6561b9b
9 files changed
Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
1314 | 1314 | | |
1315 | 1315 | | |
1316 | 1316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
| |||
938 | 941 | | |
939 | 942 | | |
940 | 943 | | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
941 | 947 | | |
942 | 948 | | |
943 | 949 | | |
| |||
948 | 954 | | |
949 | 955 | | |
950 | 956 | | |
951 | | - | |
952 | | - | |
953 | | - | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
954 | 960 | | |
955 | 961 | | |
956 | 962 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments