Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. for (int i = 0; i < 1000; i++) {
  2. Schedule candidate = mergeTwoTracksInOne(scheduleCurrent);
  3. if(candidate.isInvalid()) {
  4. continue;
  5. }
  6. neighbour = candidate;
  7. // while ((neighbour = mergeTwoTracksInOne(scheduleCurrent)).isInvalid()) ;
  8. double newFitness = neighbour.fitness();
  9. if (newFitness >= this.scheduleBest.fitness()) {
  10. scheduleBest = neighbour;
  11. scheduleCurrent = neighbour;
  12. System.out.println(scheduleCurrent.fitness());
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement