Free cookie consent management tool by TermsFeed Policy Generator

Opened 10 years ago

Closed 10 years ago

#1834 closed defect (done)

TranslocationMoveEvaluator miscalculates MoveQuality in some cases

Reported by: abeham Owned by: abeham
Priority: high Milestone: HeuristicLab 3.3.7
Component: Problems.TravelingSalesman Version: 3.3.7
Keywords: Cc:


Attachments (1)

SA bug.hl (56.2 KB) - added by abeham 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by abeham

comment:1 Changed 10 years ago by abeham


  • fixed the cases where the move quality would not change
  • added unit tests for translocation and inversion move evaluators

comment:2 Changed 10 years ago by abeham

  • Status changed from new to accepted

comment:3 Changed 10 years ago by abeham

  • Owner changed from abeham to mkommend
  • Status changed from accepted to reviewing

comment:4 Changed 10 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from reviewing to readytorelease

If I reviewed the changes correctly, the only difference is that beside a design change, the following line was removed from the check if the permutations are the same:

move.Index2 - move.Index1 >= permutation.Length - 2

I am not completely sure, if I understand what this check does, but I tested the sample as well as the created unit test and everything works fine.

comment:5 Changed 10 years ago by abeham

This was based on the assumption that the permutation doesn't change when you're moving all but one city, however the length of the movement isn't important, rather if it's being moved from first to last or vice versa. You probably have also noticed that the check for placing at the end was also wrong in that it compared against length - 1, when it's actually the length of the part left when removing the part between index1 and index2.

Last edited 10 years ago by abeham (previous) (diff)

comment:6 Changed 10 years ago by gkronber

  • Resolution set to done
  • Status changed from readytorelease to closed
  • Version changed from 3.3.6 to 3.3.7
Note: See TracTickets for help on using tickets.