Optimization of Electrical Energy Consumption using a Genetic Algorithms