Optimizing power allocation to electrical appliances with an algorithm for the knapsack problem | IEEE Conference Publication | IEEE Xplore