Esempio n. 1
0
def initial_population(quantity):
    pop = dict()
    for _ in range(quantity):
        new_route = Route(random_route([a, b, c, d, e, f, g, h, i, j]))
        pop[new_route] = new_route.calc_fitness()
    return pop