Webreaper / SolisAgileManager

Solis Inverter Manager for Octopus Agile Tariffs
MIT License
13 stars 0 forks source link

Price labelling in Charging Plan #68

Open dqj999 opened 2 weeks ago

dqj999 commented 2 weeks ago

I'm on Octopus Go which has fixed rates (27.10p/unit) from 5:30 to 00:30. I noticed in the Charging Plan that 15:30 to 19:00 was labelled as "Peak" and the rest of time as "Average".

What causes this difference in the labelling, is it the result of some history of prices? I know that on Agile these would indeed tend to be Peak charge times.

Webreaper commented 2 weeks ago

Had this question from somebody else so should probably write a faq. 😁

The algorithm assumes the peak time is about 6-8 slots. So it finds the first most expensive set of slots, and marks them as 'peak'. Of course, with Go, the price is constant for hours but all the algo cares about is the next most expensive 6-8 slots.

You'll notice that as time passes, and slots drop off into the past, each 30 minute the peak period will be recalculated - and lo and behold will still be the next 6-8 slots. So the slots marked as peak will move over time until a price trough gets to the front of the slot 'queue'.

Webreaper commented 2 weeks ago

I might make an adjustment to make this more intuitive: once the peak period has been found, look for adjoining slots at the same rate or higher than the peak average, and mark them as peak too.

This might also solve #40