+ iteration++;
+
+ struct individual **swp = population1;
+ population1 = population2;
+ population2 = swp;
+ pop2_ind = 0;
+ }
+*/
+
+ dump_individual(population1[0]);
+dump_bitmaps(population1[0]);
+
+ for (uns i=0; i<GARY_SIZE(population1[0]->placements); i++)
+ {
+printf("Coping with %d\n", population1[0]->placements[i].request->type);
+
+ struct symbol *s = NULL;
+ z_index_t zindex = 0;
+ switch (population1[0]->placements[i].request->type)
+ {
+ case REQUEST_POINT: ;
+ struct request_point *rp = (struct request_point *) population1[0]->placements[i].request;
+ s = rp->sym;
+ zindex = rp->zindex;
+ printf("%u\n", zindex);
+ break;
+ case REQUEST_SEGMENT: ;
+ struct request_segment *rs = (struct request_segment *) population1[0]->placements[i].request;
+ s = rs->label;
+ printf("Assigned label to s\n");
+ zindex = rs->zindex;
+ printf("%u\n", zindex);
+ break;
+ case REQUEST_AREA: ;
+ struct request_area *ra = (struct request_area *) population1[0]->placements[i].request;
+ s = ra->label;
+ zindex = ra->zindex;
+ printf("%u\n", zindex);
+ break;
+ default:
+ ASSERT(population1[0]->placements[i].request != REQUEST_INVALID);
+ printf("Yep, in default, continuing\n");
+ continue;
+ }
+
+printf("Will plan symbol on %u\n", zindex);
+
+ switch (s->type)
+ {
+ case SYMBOLIZER_POINT: ;
+ struct sym_point *sp = (struct sym_point *) s;
+ sp->x = population1[0]->placements[i].x;
+ sp->y = population1[0]->placements[i].y;
+ sym_plan((struct symbol *) sp, zindex);
+ break;
+ case SYMBOLIZER_ICON: ;
+ struct sym_icon *si = (struct sym_icon *) s;
+ si->sir.x = population1[0]->placements[i].x;
+ si->sir.y = population1[0]->placements[i].y;
+ sym_plan((struct symbol *) si, zindex);
+ break;
+ case SYMBOLIZER_TEXT: ;
+ struct sym_text *st = (struct sym_text *) s;
+ st->x = population1[0]->placements[i].x;
+ st->y = population1[0]->placements[i].y;
+ st->next_duplicate = NULL;
+ sym_plan((struct symbol *) st, zindex);
+ break;
+ default:
+ ASSERT(s->type != SYMBOLIZER_INVALID);
+ }
+
+
+
+/***
+ switch (population1[0]->placements[i].request->type)
+ {
+ case REQUEST_POINT: ;
+ struct request_point *rp = (struct request_point *) population1[0]->placements[i].request;
+ switch (rp->sym->type)
+ {
+ case SYMBOLIZER_POINT: ;
+ printf("Moving point to final destination\n");
+ struct sym_point *sp = (struct sym_point *) rp->sym;
+ sp->x = population1[0]->placements[i].x;
+ sp->y = population1[0]->placements[i].y;
+ sym_plan((struct symbol *) sp, rp->zindex);
+ break;
+ case SYMBOLIZER_ICON: ;
+ printf("Moving icon to final destination\n");
+ struct sym_icon *si = (struct sym_icon *) rp->sym;
+ si->sir.x = population1[0]->placements[i].x;
+ si->sir.y = population1[0]->placements[i].y;
+ sym_plan((struct symbol *) si, rp->zindex);
+ break;
+ default:
+ printf("Haúúú 1\n");
+ ;
+ }
+ break;
+ case REQUEST_AREA: ;
+ struct request_area *ra = (struct request_area *) population1[0]->placements[i].request;
+ switch (ra->label->type)
+ {
+ case SYMBOLIZER_ICON
+ case SYMBOLIZER_TEXT: ;
+ struct sym_text *st = (struct sym_text *) ra->label;
+ st->x = population1[0]->placements[i].x;
+ st->y = population1[0]->placements[i].y;
+ break;
+ default:
+ // FIXME
+ ;
+ }
+ if (ra->label->type == SYMBOLIZER_INVALID) printf("Haúúú 2\n");
+ sym_plan((struct symbol *) ra->label, ra->zindex);
+ break;
+
+ case REQUEST_LINE: ;
+ struct request_line *rl = (struct request_line *) population1[0]->placements[i].request;
+ for (uns j=0; j<GARY_SIZE(rl->segments); j++)
+ {
+ switch (rl->segments[j].label->type)
+ {
+ case SYMBOLIZER_TEXT:
+ ((struct sym_text *) rl->segments[j].label)->next_duplicate = NULL;
+ ((struct sym_text *) rl->segments[j].label)->next_in_tile = NULL;
+ printf("Planning text ");
+ print_label(rl->segments[j].label);
+ default:
+ printf("Haúúú 3\n");
+ // FIXME
+ ;
+ }
+ sym_plan((struct symbol *) rl->segments[j].label, rl->segments[j].zindex); // FIXME: z-index
+ }
+ break;
+
+ case REQUEST_SEGMENT: ;
+ //struct request_segment *rs = (struct request_segment *) population1[0]->placements[i].request;
+ printf("Segment!\n");
+
+ default:
+ ASSERT(population1[0]->placements[i].request->type != REQUEST_INVALID);
+ }
+***/
+
+ }
+
+ return;
+
+ while (! shall_terminate())
+ {
+ iteration++;
+