Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/19/11 14:24:19 (13 years ago)
Author:
svonolfe
Message:

Fixed issue related to incremental evaluation (#1177)

File:
1 edited

Legend:

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

    r6607 r6796  
    6464              //customer1 can be feasibly inserted at the location of customer2
    6565              tour.Stops[customer2Position] = customer1;
     66              route1.Stops.RemoveAt(customer1Position);
     67
    6668              if (ProblemInstance.Feasible(tour)) {
    6769                int routeIdx, place;
     
    6971                  customer2, selectedIndex, allowInfeasible, out routeIdx, out place)) {
    7072                  individual.Tours[routeIdx].Stops.Insert(place, customer2);
    71                   route1.Stops.RemoveAt(customer1Position);
    72 
    73                   if (route1.Stops.Count == 0)
    74                     individual.Tours.Remove(route1);
    7573
    7674                  //two-level exchange has been performed
     
    7977                } else {
    8078                  tour.Stops[customer2Position] = customer2;
     79                  route1.Stops.Insert(customer1Position, customer1);
    8180                }
    8281              } else {
    8382                tour.Stops[customer2Position] = customer2;
     83                route1.Stops.Insert(customer1Position, customer1);
    8484              }
    8585            }
Note: See TracChangeset for help on using the changeset viewer.