A greedy genetic algorithm for continuous variables electromagnetic optimization problems