Changeset 6710 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestSolution/Capacitated
- Timestamp:
- 09/06/11 13:00:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestSolution/Capacitated/BestCapacitatedVRPSolutionAnalyzer.cs
r4752 r6710 70 70 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Overload", "The overloads of the VRP solutions which should be analyzed.")); 71 71 72 Parameters.Add(new LookupParameter<VRPSolution>("BestSolution", "The best TSP solution."));72 Parameters.Add(new LookupParameter<VRPSolution>("BestSolution", "The best VRP solution.")); 73 73 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best VRP solution should be stored.")); 74 74 } … … 91 91 int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index; 92 92 93 IVRPEncoding best = solutions[i] as IVRPEncoding;94 93 VRPSolution solution = BestSolutionParameter.ActualValue; 95 if (!results.ContainsKey("Best VRP Solution Overload")) { 96 results.Add(new Result("Best VRP Solution Overload", new DoubleValue(overloads[i].Value))); 97 } else { 98 if (qualities[i].Value <= solution.Quality.Value) { 99 (results["Best VRP Solution Overload"].Value as DoubleValue).Value = overloads[i].Value; 94 if (solution != null) { 95 if (!results.ContainsKey("Best VRP Solution Overload")) { 96 results.Add(new Result("Best VRP Solution Overload", new DoubleValue(overloads[i].Value))); 97 } else { 98 if (qualities[i].Value <= solution.Quality.Value) { 99 (results["Best VRP Solution Overload"].Value as DoubleValue).Value = overloads[i].Value; 100 } 100 101 } 101 102 }
Note: See TracChangeset
for help on using the changeset viewer.