Comparison between time-constrained and time-unconstrained optimization for power losses minimization in Smart Grids using genetic algorithms