- Timestamp:
- 08/20/14 13:23:50 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs
r11266 r11293 128 128 if (initialTour.Length > 2) { 129 129 // Limit the neighborhood to the tour length 130 int maxNeighborhood = CurrentNeighborhoodIndexParameter.ActualValue.Value + 1; 131 int limit = initialTour.Length - 2; // neighborhood limit within [0, changable tour length - 1) 132 int neighborhood = random.Next((limit > maxNeighborhood) ? maxNeighborhood : limit) + 1; 130 int currentNeighborhood = CurrentNeighborhoodIndexParameter.ActualValue.Value + 1; 131 int maximumNeighborhood = initialTour.Length - 2; // neighborhood limit within [0, changable tour length - 1) 132 maximumNeighborhood = (maximumNeighborhood > currentNeighborhood) ? currentNeighborhood : maximumNeighborhood; 133 int neighborhood = maximumNeighborhood;//random.Next(maximumNeighborhood) + 1; 133 134 134 135 // Find all points that are not yet included in the tour and are
Note: See TracChangeset
for help on using the changeset viewer.