In this paper we develop and test a distributed algorithm providing Energy Consumption Schedules (ECS) in smart grids for a residential district. The goal is to achieve a given aggregate load profile. The NP-hard constrained optimization problem reduces to a distributed unconstrained formulation by means of Lagrangian Relaxation technique, and a meta-heuristic algorithm based on a Quantum inspired Particle Swarm with Levy flights. A centralized iterative reputation-reward mechanism is proposed for end-users to cooperate to avoid power peaks and reduce global overload, based on random distributions simulating human behaviors and penalties on the effective ECS differing from the suggested ECS. Numerical results show the protocols effectiveness.