57 for (
i = 1;
i <= num_gene;
i++)
58 city_table[
i].used = 0;
61 num_positions =
geqo_randint(root, 2 * num_gene / 3, num_gene / 3);
64 for (
i = 0;
i < num_positions;
i++)
68 offspring[pos] = tour1[pos];
69 city_table[(int) tour1[pos]].used = 1;
78 while (offspring_index < num_gene)
82 if (!city_table[(
int) tour1[offspring_index]].used)
86 if (!city_table[(
int) tour2[tour2_index]].used)
90 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)