Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/16/17 15:16:55 (7 years ago)
Author:
abeham
Message:

#2205: added results tab to solution view to analyze vrp solution in more detail

  • reorganized insertion infos and adapted some evaluators and instances
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/SingleDepotVRPEvaluator.cs

    r14185 r14677  
    3131  public class SingleDepotVRPEvaluator : VRPEvaluator {
    3232    protected override void EvaluateTour(VRPEvaluation eval, IVRPProblemInstance instance, Tour tour, IVRPEncoding solution) {
    33       TourInsertionInfo tourInfo = new TourInsertionInfo(solution.GetVehicleAssignment(solution.GetTourIndex(tour)));
     33      var tourInfo = new TourInsertionInfo(solution.GetVehicleAssignment(solution.GetTourIndex(tour)));
    3434      eval.InsertionInfo.AddTourInsertionInfo(tourInfo);
    3535
     
    4747
    4848        //drive there
    49         double currentDistace = instance.GetDistance(start, end, solution);
    50         distance += currentDistace;
     49        double currentDistance = instance.GetDistance(start, end, solution);
     50        distance += currentDistance;
    5151
    52         StopInsertionInfo stopInfo = new StopInsertionInfo(start, end);
     52        var stopInfo = new StopInsertionInfo(start, end, currentDistance);
    5353        tourInfo.AddStopInsertionInfo(stopInfo);
    5454      }
     
    6868    protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer,
    6969      out bool feasible) {
    70       StopInsertionInfo insertionInfo = tourInsertionInfo.GetStopInsertionInfo(index);
     70      var insertionInfo = tourInsertionInfo.GetStopInsertionInfo(index);
    7171
    7272      double costs = 0;
Note: See TracChangeset for help on using the changeset viewer.