51 int num_gene,
City * city_table)
60 for (
i = 1;
i <= num_gene;
i++)
62 city_table[
i].
used = 0;
71 offspring[start_pos] = tour1[start_pos];
75 city_table[(int) tour1[start_pos]].used = 1;
84 while (tour2[curr_pos] != tour1[start_pos])
86 city_table[(int) tour2[curr_pos]].used = 1;
87 curr_pos = city_table[(int) tour2[curr_pos]].tour1_position;
88 offspring[curr_pos] = tour1[curr_pos];
98 for (
i = 1;
i <= num_gene;
i++)
100 if (!city_table[
i].used)
103 tour2[(int) city_table[
i].tour2_position];
113 if (count < num_gene)
117 for (
i = 0;
i < num_gene;
i++)
118 if (tour1[
i] != offspring[
i])
int geqo_randint(PlannerInfo *root, int upper, int lower)
int cx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)