Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/17/12 14:32:54 (12 years ago)
Author:
svonolfe
Message:

Fixed behavior of VRP analyzers related to constraint relaxation (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestSolution/TimeWindowed/BestTimeWindowedVRPSolutionAnalyzer.cs

    r8053 r8497  
    3030using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3131using HeuristicLab.Problems.VehicleRouting.Variants;
     32using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting {
     
    9192
    9293    public override IOperation Apply() {
     94      IVRPProblemInstance problemInstance = ProblemInstanceParameter.ActualValue;
    9395      ItemArray<IVRPEncoding> solutions = VRPToursParameter.ActualValue;
    9496      ResultCollection results = ResultsParameter.ActualValue;
     
    106108          results.Add(new Result("Best VRP Solution TravelTime", new DoubleValue(travelTimes[i].Value)));
    107109        } else {
    108           if (qualities[i].Value <= solution.Quality.Value) {
     110          VRPEvaluation eval = problemInstance.Evaluate(solution.Solution);
     111          if (qualities[i].Value <= eval.Quality) {
    109112            (results["Best VRP Solution Tardiness"].Value as DoubleValue).Value = tardinesses[i].Value;
    110113            (results["Best VRP Solution TravelTime"].Value as DoubleValue).Value = travelTimes[i].Value;
Note: See TracChangeset for help on using the changeset viewer.