-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Issue
We want to optimize the management of devices to increase the consumption of PV energy. In fact, given the matrix probability for each device, the consumption for each device, and the production PV for each day, we want to assign the PV production to the consumption of each device as best as possible.
Proposal
The solution is inspired by the solution for the Knapsack problem. In the knapsack problem, you need to pack a set of items, with given values and sizes (such as weights), into a bag with a maximum capacity. If the total size of the items exceeds the capacity, you can't pack them all. The problem is to choose a subset of the items of maximum total value that will fit in the bag.
Here one bag is one hour (maybe in the future it will be one minute or one 5-minute). The items are the devices. The concept of value is changed by the probability of the device. The concept of value is changed by the probability of the device. So we want to choose a subset of the devices of maximum total probability that will fit in the production PV for that given hour.
Now the problem is that we have multiple "bags" in a day (we have 24 hours in a day), and the items sometimes need to be in multiple bags (for example I want to charge a specific device in the morning and in the afternoon). Furthermore, the items have different values in each bag (the probability to charge a specific device in the morning is maybe different than in the afternoon), but their size remains unchanged (the device needs the same charge in the morning and in the afternoon).
So my idea is to be greedy. So during a given day, we compute all the solutions for each bag (each hour) of the Knapsack problem (dynamic programming), we take then the bag (the hour) with the highest probability. Then we update all the probabilities given the fact that a device needs to be sometimes in multiple bags. We put this bag into a blacklist. Then we restart this process by computing all the solutions for each bag that are not in the blacklist. We continue until all the bags are in the blacklist.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status