Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/12 10:55:39 (13 years ago)
Author:
svonolfe
Message:

Improved incremental evaluation (#1177)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPEvaluator.cs

    r6883 r7276  
    5050      TourInsertionInfo tourInfo = new TourInsertionInfo(solution.GetVehicleAssignment(solution.GetTourIndex(tour)));
    5151      eval.InsertionInfo.AddTourInsertionInfo(tourInfo);
     52      double originalQuality = eval.Quality;
    5253
    5354      IHeterogenousCapacitatedProblemInstance cvrpInstance = instance as IHeterogenousCapacitatedProblemInstance;
     
    99100      eval.Quality += penalty;
    100101      tourInfo.Penalty = penalty;
     102      tourInfo.Quality = eval.Quality - originalQuality;
    101103    }
    102104
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPPDTW/MDCVRPPDTWEvaluator.cs

    r6883 r7276  
    5050      TourInsertionInfo tourInfo = new TourInsertionInfo(solution.GetVehicleAssignment(solution.GetTourIndex(tour)));
    5151      eval.InsertionInfo.AddTourInsertionInfo(tourInfo);
     52      double originalQuality = eval.Quality;
    5253
    5354      IHeterogenousCapacitatedProblemInstance cvrpInstance = instance as IHeterogenousCapacitatedProblemInstance;
     
    183184      eval.Quality += time * vrptw.TimeFactor.Value;
    184185      tourInfo.Penalty = tourPenalty;
     186      tourInfo.Quality = eval.Quality - originalQuality;
    185187    }
    186188
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWEvaluator.cs

    r6883 r7276  
    5454      TourInsertionInfo tourInfo = new TourInsertionInfo(solution.GetVehicleAssignment(solution.GetTourIndex(tour)));
    5555      eval.InsertionInfo.AddTourInsertionInfo(tourInfo);
     56      double originalQuality = eval.Quality;
    5657
    5758      IHeterogenousCapacitatedProblemInstance cvrpInstance = instance as IHeterogenousCapacitatedProblemInstance;
     
    163164      eval.Quality += time * vrptw.TimeFactor.Value;
    164165      tourInfo.Penalty = tourPenalty;
     166      tourInfo.Quality = eval.Quality - originalQuality;
    165167    }
    166168
Note: See TracChangeset for help on using the changeset viewer.