Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/27/11 13:29:56 (13 years ago)
Author:
svonolfe
Message:

Updated interface of evaluator - added individual (#1177)

File:
1 edited

Legend:

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

    r6788 r6838  
    101101
    102102      Tour currentTour = new Tour();
     103      result.Tours.Add(currentTour);
    103104
    104105      int j = random.Next(customers.Count);
     
    114115        }
    115116
    116         CVRPEvaluation evaluation = instance.Evaluate(currentTour) as CVRPEvaluation;
     117        CVRPEvaluation evaluation = instance.EvaluateTour(currentTour, result) as CVRPEvaluation;
    117118        if (result.Tours.Count < instance.Vehicles.Value &&
    118119          ((adhereTimeWindows && !instance.Feasible(evaluation)) || ((!adhereTimeWindows) && evaluation.Overload > double.Epsilon))) {
     
    132133      }
    133134
    134       if (currentTour.Stops.Count > 0)
    135         result.Tours.Add(currentTour);
     135      if (currentTour.Stops.Count == 0)
     136        result.Tours.Remove(currentTour);
    136137
    137138      return result;
Note: See TracChangeset for help on using the changeset viewer.