batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Not calculating best plan after 8.1.0

Open Philhews opened this issue 1 year ago • 4 comments

Describe the bug Tomorrows agile rates are negative in the afternoon, and the solar forecast is not enough to max out my inverter so freeze discharging before and using some negative grid to charge later is the best cost. This is the plan that is selected on 8.1.0

However when upgrading past that version (anything up to latest) the plan no longer utilises the AC negative rates and just does solar charge with a demonstrably worse 'best' cost value.

Expected behavior Best plan should be selected on newer versions

Predbat version 8.1.0

Environment details

Hybrid 3.6 Gen2, 9.5kWh battery RPI4 with HAOS and standalone predbat

Screenshots Plan on 8.1.0 image Cost on 8.1.0 image Battery graph on 8.1.0 image

Plan on 8.1.1 image Cost on 8.1.1 image Battery graph on 8.1.1 image

Log file Update from 8.1.0 to 8.1.1 happened at 20:53 so log from before then is working as I would expect, and immediately after is the problem predbat.log

Philhews avatar Jul 05 '24 19:07 Philhews

You might find that an inverter loss of 7% is too high as this means 7% + 3% battery loss on charge and then 7% + 3% on discharge which is overall 20%.

You also have combine_discharge_slots set to True which may prevent discharge if you have a fixed rate export

Please try inverter loss of 4% and combine discharge as False.

set_discharge_during_charge(True) combine_charge_slots(False) combine_discharge_slots(True) combine_rate_threshold(0.0) best_soc_min(0.0 kWh) best_soc_max(0.0 kWh) best_soc_keep(1.3 kWh) inverter_loss(7 %) battery_loss(3 %) battery_loss_discharge (3 %) inverter_hybrid(True) metric_min_improvement(-0.2 p) metric_min_improvement_discharge(0.3 p)

springfall2008 avatar Jul 06 '24 18:07 springfall2008

I'll see how that affects the current plans, obviously the rates are different now so it's not a direct comparison.

Did something change between the two versions mentioned that would make these settings more/less important in the calculation to result in the differences I was seeing?

Philhews avatar Jul 06 '24 18:07 Philhews

8.1.1 still tending towards less charging, requires more solar to refill the battery rather than using grid at 7 or 9p

8.1.0 plan Screenshot_2024-07-06-23-01-25-73_c3a231c25ed346e59462e84656a70e50

8.1.1 plan Screenshot_2024-07-06-23-05-14-50_c3a231c25ed346e59462e84656a70e50

Log file, update to .1 at 23.02 predbat.log

Philhews avatar Jul 06 '24 22:07 Philhews

I'll see how that affects the current plans, obviously the rates are different now so it's not a direct comparison.

Did something change between the two versions mentioned that would make these settings more/less important in the calculation to result in the differences I was seeing?

Yes, there were bugs in the code which mean it wasn't always applying losses correctly.

springfall2008 avatar Jul 13 '24 14:07 springfall2008

As this ticket is old I'm going to close it, please re-open if the issue is there on latest.

springfall2008 avatar Jan 01 '25 19:01 springfall2008