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/PickupAndDelivery/BestPickupAndDeliveryVRPSolutionAnalyzer.cs

    r8053 r8497  
    3030using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3131using HeuristicLab.Problems.VehicleRouting.Variants;
     32using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting {
     
    8788
    8889    public override IOperation Apply() {
     90      IVRPProblemInstance problemInstance = ProblemInstanceParameter.ActualValue;
    8991      ItemArray<IVRPEncoding> solutions = VRPToursParameter.ActualValue;
    9092      ResultCollection results = ResultsParameter.ActualValue;
     
    101103          results.Add(new Result("Best VRP Solution PickupViolations", new DoubleValue(pickupViolations[i].Value)));
    102104        } else {
    103           if (qualities[i].Value <= solution.Quality.Value) {
     105          VRPEvaluation eval = problemInstance.Evaluate(solution.Solution);
     106          if (qualities[i].Value <= eval.Quality) {
    104107            (results["Best VRP Solution PickupViolations"].Value as DoubleValue).Value = pickupViolations[i].Value;
    105108          }
Note: See TracChangeset for help on using the changeset viewer.