Genetic algorithm simulation for optimizing a distribution