Commit f0496eb
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 a4a0cbd commit f0496eb
2 files changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2158 | 2158 | | |
2159 | 2159 | | |
2160 | 2160 | | |
2161 | | - | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
2162 | 2166 | | |
2163 | 2167 | | |
2164 | 2168 | | |
| |||
3080 | 3084 | | |
3081 | 3085 | | |
3082 | 3086 | | |
3083 | | - | |
3084 | | - | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
3085 | 3091 | | |
3086 | 3092 | | |
3087 | 3093 | | |
| |||
| 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