Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/06/11 16:57:00 (13 years ago)
Author:
svonolfe
Message:

Fixed minor bugs (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs

    r6607 r6713  
    9696
    9797      Tour currentTour = new Tour();
    98       result.Tours.Add(currentTour);
     98
    9999      int j = random.Next(customers.Count);
    100100      for (int i = 0; i < customers.Count; i++) {
     
    109109          currentTour.Stops.RemoveAt(stopIdx);
    110110
     111          if(currentTour.Stops.Count > 0)
     112            result.Tours.Add(currentTour);
    111113          currentTour = new Tour();
    112           result.Tours.Add(currentTour);
     114         
    113115          currentTour.Stops.Add(customers[index]);
    114116        }
    115117      }
     118
     119      if (currentTour.Stops.Count > 0)
     120        result.Tours.Add(currentTour);
    116121
    117122      return result;
Note: See TracChangeset for help on using the changeset viewer.