Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7859


Ignore:
Timestamp:
05/21/12 15:29:04 (13 years ago)
Author:
svonolfe
Message:

Fixed issue in best solution analyzer (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestSolution/BestVRPSolutionAnalyzer.cs

    r7854 r7859  
    153153        VRPSolution validSolution = BestValidSolutionParameter.ActualValue;
    154154        if (validSolution == null) {
    155           if (ProblemInstanceParameter.ActualValue.Feasible(best)) {
    156             validSolution = new VRPSolution(problemInstance, best.Clone() as IVRPEncoding, new DoubleValue(qualities[j].Value));
    157             BestValidSolutionParameter.ActualValue = validSolution;
    158             if (results.ContainsKey("Best valid VRP Solution"))
    159               results["Best valid VRP Solution"].Value = validSolution;
    160             else
    161               results.Add(new Result("Best valid VRP Solution", validSolution));
     155          validSolution = new VRPSolution(problemInstance, best.Clone() as IVRPEncoding, new DoubleValue(qualities[j].Value));
     156          BestValidSolutionParameter.ActualValue = validSolution;
     157          if (results.ContainsKey("Best valid VRP Solution"))
     158            results["Best valid VRP Solution"].Value = validSolution;
     159          else
     160            results.Add(new Result("Best valid VRP Solution", validSolution));
    162161
    163             results.Add(new Result("Best valid VRP Solution Distance", new DoubleValue(distances[j].Value)));
    164             results.Add(new Result("Best valid VRP Solution VehicleUtilization", new DoubleValue(vehiclesUtilizations[j].Value)));
    165           }
     162          results.Add(new Result("Best valid VRP Solution Distance", new DoubleValue(distances[j].Value)));
     163          results.Add(new Result("Best valid VRP Solution VehicleUtilization", new DoubleValue(vehiclesUtilizations[j].Value)));
    166164        } else {
    167165          if (qualities[j].Value <= validSolution.Quality.Value) {
Note: See TracChangeset for help on using the changeset viewer.