A system for managing devices ( 110(i)) supplied through a power grid, each device being configured to consume over time electric power according to at least one respective power profile when operating, the system comprising at least one unit ( 130; 132; 135; 155) interfaced with the devices for exchanging data, the at least one unit being configured to: - collect power profile data indicative of the power profiles of said devices; - generate a time schedule of the device operations by distributing over time start times of the power profiles in such a way that at any time the total power consumption of the devices is kept under a maximum power threshold of the power grid, wherein: the at least one unit is configured to generate said time schedule through a particle swarm optimization approach by: a) randomly generating a population of candidate time schedules within a search space comprising a set of the possible candidate time schedules; b) subdividing the population of candidate time schedules in a first group of candidate time schedules and in a second group of candidate time schedules; c) performing phases d) and e) at least once; d) moving the candidate time schedules of the first group in the search space following a random walk based on a stable probability distribution having an infinite variance; e) moving the candidate time schedules of the second group in the search space following a random walk based on a probability distribution having a finite variance; f) selecting a candidate time schedule based on a cost of said candidate time schedule corresponding to its position in the search space calculated by means of a cost function. - collect power profile data indicative of the power profiles of said devices; - generate a time schedule of the device operations by distributing over time start times of the power profiles in such a way that at any time the total power consumption of the devices is kept under a maximum power threshold of the power grid, wherein: the at least one unit is configured to generate said time schedule through a particle swarm optimization approach by: a) randomly generating a population of candidate time schedules within a search space comprising a set of the possible candidate time schedules; b) subdividing the population of candidate time schedules in a first group of candidate time schedules and in a second group of candidate time schedules; c) performing phases d) and e) at least once; d) moving the candidate time schedules of the first group in the search space following a random walk based on a stable probability distribution having an infinite variance; e) moving the candidate time schedules of the second group in the search space following a random walk based on a probability distribution having a finite variance; f) selecting a candidate time schedule based on a cost of said candidate time schedule corresponding to its position in the search space calculated by means of a cost function. a) randomly generating a population of candidate time schedules within a search space comprising a set of the possible candidate time schedules; b) subdividing the population of candidate time schedules in a first group of candidate time schedules and in a second group of candidate time schedules; c) performing phases d) and e) at least once; d) moving the candidate time schedules of the first group in the search space following a random walk based on a stable probability distribution having an infinite variance; e) moving the candidate time schedules of the second group in the search space following a random walk based on a probability distribution having a finite variance; f) selecting a candidate time schedule based on a cost of said candidate time schedule corresponding to its position in the search space calculated by means of a cost function.