Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/04/10 16:11:59 (14 years ago)
Author:
svonolfe
Message:

Refactored VRP, added Potvin encoding (WIP) (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs

    r4068 r4150  
    157157
    158158      //simulate a tour, start and end at depot
    159       for (int i = 1; i < tour.Count; i++) {
    160         int start = tour[i - 1].Value;
    161         int end = tour[i].Value;
     159      for (int i = 0; i <= tour.Count; i++) {
     160        int start = 0;
     161        if(i > 0)
     162          start = tour[i - 1].Value;
     163        int end = 0;
     164        if(i < tour.Count)
     165          end = tour[i].Value;
    162166
    163167        //drive there
Note: See TracChangeset for help on using the changeset viewer.