Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/25/13 09:21:45 (11 years ago)
Author:
gkronber
Message:

#1591: adapted FLA branch to reference most recent version of ALGLIB (3.7.0) and VRP (3.4). Several major changes were necessary to port the implementation to the new VRP problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape.VRP/DistanceCalcualtors/VRPDistanceCalculator.cs

    r7202 r9750  
    1010using HeuristicLab.Encodings.PermutationEncoding;
    1111using HeuristicLab.Problems.VehicleRouting;
     12using HeuristicLab.Problems.VehicleRouting.Interfaces;
    1213
    1314namespace HeuristicLab.Analysis.FitnessLandscape.DistanceCalculators.VRP {
     
    6162    private HashSet<Point> GetEdgeSet(IVRPEncoding vrpSolution) {
    6263      HashSet<Point> edges = new HashSet<Point>();
    63       foreach (var tour in vrpSolution.GetTours(null)) {
    64         if (tour.Cities.Count > 0) {
    65           edges.Add(CreateUndirectedEdge(0, tour.Cities[0]));
    66           for (int i = 0; i < tour.Cities.Count - 1; i++) {
    67             edges.Add(CreateUndirectedEdge(tour.Cities[i], tour.Cities[i + 1]));
     64      foreach (var tour in vrpSolution.GetTours()) {
     65        if (tour.Stops.Count > 0) {
     66          edges.Add(CreateUndirectedEdge(0, tour.Stops[0]));
     67          for (int i = 0; i < tour.Stops.Count - 1; i++) {
     68            edges.Add(CreateUndirectedEdge(tour.Stops[i], tour.Stops[i + 1]));
    6869          }
    69           edges.Add(CreateUndirectedEdge(tour.Cities.Last(), 0));
     70          edges.Add(CreateUndirectedEdge(tour.Stops.Last(), 0));
    7071        }
    7172      }
Note: See TracChangeset for help on using the changeset viewer.