Changeset 11266


Ignore:
Timestamp:
08/05/14 09:54:07 (7 years ago)
Author:
pfleck
Message:

#2208

  • Changed path visualization to line strip instead of polygon since start and end point must not match
  • Used correct incremental length calculation in CleanupTour
Location:
branches/HeuristicLab.Problems.Orienteering
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs

    r11265 r11266  
    109109                  tour[i] = points[integerVector[i]];
    110110                }
    111                 graphics.DrawPolygon(Pens.Black, tour);
     111                graphics.DrawLines(Pens.Black, tour);
    112112              }
    113113
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs

    r11264 r11266  
    216216      ).ToList();
    217217
    218       //double tourLength = distances.CalculateTourLength(actualTour, fixedPenalty);
     218      double tourLength = distances.CalculateTourLength(actualTour, fixedPenalty);
    219219
    220220      // As long as the created path is infeasible, remove elements
    221       while (distances.CalculateTourLength(actualTour, fixedPenalty) > maxDistance) {
     221      while (tourLength > maxDistance) {
    222222        // Remove the point that frees the largest distance
     223        // Note, distance savings are not updated after removal
     224        tourLength -= distances.CalculateRemovementSaving(actualTour, distanceSavings[0].Index, fixedPenalty);
    223225        actualTour.RemoveAt(distanceSavings[0].Index);
    224         //tourLength -= distanceSavings[0].Saving;
    225226
    226227        // Shift indices due to removal of a point in the tour
     
    228229          if (distanceSavings[i].Index > distanceSavings[0].Index) {
    229230            distanceSavings[i].Index--;
    230             // Note, distance savings are not updated after removal
    231231          }
    232232        }
Note: See TracChangeset for help on using the changeset viewer.