The growth of world energy demand combined with global warming and climate change is one of the most urgent global challenges and induced policy measures to foster the use of renewable energy sources. In order to cope with the intrinsic variability of solar and wind, active management of distribution networks and customers is required, if the creation of the so called Smart Grid is desired. This paper focuses on the strategies to enable prosumers (i.e. customers able to self-generate all or part of their energy needs) to optimally manage their generation and loads in order to minimize their energy bill and, at the same time, support the distribution grid stability by responding flexibly to its requirements in terms of active load management...