Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/30/11 15:46:29 (13 years ago)
Author:
svonolfe
Message:

Fixed small issue in the customer relocation manipulator (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinCustomerRelocationManipulator.cs

    r6856 r6859  
    161161
    162162          for (int i = 0; i < route1.Stops.Count; i++) {
    163             int start = route1.Stops[i - 1];
     163            int start = 0;
     164            if (i > 0)
     165              start = route1.Stops[i - 1];
    164166            int end = route1.Stops[i];
    165167
     
    181183            time += currentWaitingTime;
    182184
    183             //service
    184             double currentServiceTime = serviceTimes[end - 1];
    185             time += currentServiceTime;
     185            if (end > 0) {
     186              //service
     187              double currentServiceTime = serviceTimes[end - 1];
     188              time += currentServiceTime;
     189            }
    186190          }
    187191
Note: See TracChangeset for help on using the changeset viewer.