I'm currently working on trying to optimise a battery schedule system. The schedule is created once a day for the entire day with a half hour granularity, this means i need to create a schedule for the 48 periods. The battery can operate in 3 different modes, meaning I have a search space of 3^48. The schedule is optimised to maximise the savings made by the battery. I have a programme that can evaluate the saving of a current schedule, and savings is what i'm trying to optimise for.
Can someone point me in the right direction of what algorithm or process i should use to solve this problem? I know brut force method wont work due to the huge search space. An option i've started looking into is Genetic Algorithms to try and find a local maximum and seemingly ignore the huge search space, but I don't want to spend a week implementing something that will end up not working.
It's worth noting that I can create logic that can get a decent schedule but it's very hard to create a schedule through logic that could beat or get close to manual schedule building. This is why i thought GA could be a good approach as i can give it a good starting point.
Optimisation is possible because our users have varying electricity costs throughout the day, and all users have solar generation so we want to take advantage of this free power. My evaluation programme takes in the forecasted power generation, forecasted solar generation, electricity prices, and battery schedule.
battery modes:
- charge: charges the battery from grid or excess solar
- discharge: discharges the battery to meet user load
- normal: if there is excess solar charge, if there is user load discharge
Example of schedules:
first schedule:
[{"state":"charge","start":"00:00:00","end":"00:30:00"},
{"state":"disable","start":"00:30:00","end":"01:30:00"},
{"state":"charge","start":"01:30:00","end":"02:00:00"},
{"state":"normal","start":"02:00:00","end":"05:00:00"},
{"state":"charge","start":"05:00:00","end":"06:00:00"},
{"state":"normal","start":"06:00:00","end":"10:00:00"},
{"state":"charge","start":"10:00:00","end":"13:00:00"},
{"state":"normal","start":"13:00:00","end":"22:00:00"}]
savings: $10.2
final schedule:
[{"state":"disable","start":"00:00:00","end":"05:30:00"},
{"state":"charge","start":"05:30:00","end":"07:30:00"},
{"state":"normal","start":"07:30:00","end":"17:00:00"},
{"state":"charge","start":"17:00:00","end":"18:00:00"},
{"state":"normal","start":"18:00:00","end":"22:00:00"},
{"state":"disable","start":"22:00:00","end":"00:00:00"}]
savings: $15.9
I've tried brut force search but due to the search space size this isn't practical.