Achieving scalability in energy management