The RECoS in its ELC mode controls a smart socket, e.g., Q, with a given quota, e.g., q(Q). When users set Q’s energy limit of the following 4 weeks (after referring to Q’s energy consumption in the last 4 weeks), the ELC module calculates the energy quota for Q with the parameters, including Q’s one-day, e.g. day X’s, energy consumption history, what day is X (a weekday or weekend), the Q’s priority, etc.