A knapsack problem approach for achieving efficient energy consumption in smart grid for end-users' life style