Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/06/10 16:08:46 (14 years ago)
Author:
svonolfe
Message:

Refactored VRP, added some Potvin operators (WIP) (#1039)

File:
1 edited

Legend:

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

    r4154 r4174  
    104104    }
    105105
    106     private static TourEvaluation EvaluateTour(Tour tour, DoubleArray dueTimeArray,
     106    internal static TourEvaluation EvaluateTour(Tour tour, DoubleArray dueTimeArray,
    107107      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
    108108      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor, DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
     
    122122
    123123      //simulate a tour, start and end at depot
    124       for (int i = 0; i <= tour.Count; i++) {
     124      for (int i = 0; i <= tour.Cities.Count; i++) {
    125125        int start = 0;
    126126        if(i > 0)
    127           start = tour[i - 1].Value;
     127          start = tour.Cities[i - 1];
    128128        int end = 0;
    129         if(i < tour.Count)
    130           end = tour[i].Value;
     129        if (i < tour.Cities.Count)
     130          end = tour.Cities[i];
    131131
    132132        //drive there
Note: See TracChangeset for help on using the changeset viewer.