Commit d6770e5
fix(plan): don't offer Freeze Export for inverters that always charge from PV surplus (#4207)
Alternative to the stale #4425 (which patched the prediction model instead
- reworking it here per that PR's own follow-up discussion): on an inverter
with inverter_can_charge_during_export=true (the default), PV surplus
charges the battery regardless of what mode Predbat has commanded, so
Freeze Export (hold SoC flat, export the rest) can never actually be
achieved - it collapses to identical behaviour as Idle. Rather than teach
the prediction model to simulate a distinction that doesn't exist in
reality, stop the optimiser offering/selecting freeze for these inverters
in the first place:
- optimise_export(): allow_freeze is now also forced off when the inverter
can charge during export, alongside the existing set_export_freeze check.
- optimise_solar() ("Export more solar"): sets export limits to 99.0
(freeze) directly, bypassing optimise_export()'s search entirely, so it
needs the same gate independently or it reintroduces the bug through the
back door.
No prediction.py or kernel changes needed - this is purely a search-space
restriction, not a modelling change, so no parity bump or binary rebuild.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 7ae4318 commit d6770e5
2 files changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2126 | 2126 | | |
2127 | 2127 | | |
2128 | 2128 | | |
2129 | | - | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
2130 | 2134 | | |
2131 | 2135 | | |
2132 | 2136 | | |
| |||
3048 | 3052 | | |
3049 | 3053 | | |
3050 | 3054 | | |
3051 | | - | |
3052 | | - | |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
3053 | 3059 | | |
3054 | 3060 | | |
3055 | 3061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
164 | 180 | | |
165 | 181 | | |
166 | 182 | | |
| |||
0 commit comments