59 for (
i = 1;
i <= num_gene;
i++)
60 city_table[
i].used = 0;
63 num_positions =
geqo_randint(root, 2 * num_gene / 3, num_gene / 3);
66 for (
i = 0;
i < num_positions;
i++)
70 offspring[pos] = tour1[pos];
71 city_table[(int) tour1[pos]].used = 1;
80 while (offspring_index < num_gene)
84 if (!city_table[(
int) tour1[offspring_index]].used)
88 if (!city_table[(
int) tour2[tour2_index]].used)
92 offspring[offspring_index] = tour2[tour2_index];
int geqo_randint(PlannerInfo *root, int upper, int lower)
void px(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)