Changeset 11264
- Timestamp:
- 08/04/14 15:04:58 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs
r11245 r11264 129 129 // Limit the neighborhood to the tour length 130 130 int maxNeighborhood = CurrentNeighborhoodIndexParameter.ActualValue.Value + 1; 131 int limit = initialTour.Length - 3; // neighborhood limit within [0, length-1)131 int limit = initialTour.Length - 2; // neighborhood limit within [0, changable tour length - 1) 132 132 int neighborhood = random.Next((limit > maxNeighborhood) ? maxNeighborhood : limit) + 1; 133 133 … … 169 169 // Elect the starting index of the part to be replaced 170 170 int tourSize = initialTour.Length; 171 int randomPosition = random.Next(tourSize - neighborhood - 2) + 1;171 int randomPosition = random.Next(tourSize - neighborhood - 1) + 1; 172 172 173 173 for (int position = 1; position < tourSize; position++) {
Note: See TracChangeset
for help on using the changeset viewer.