- Timestamp:
- 07/08/10 11:23:02 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs
r3938 r4015 41 41 get { return (ScopeTreeLookupParameter<IVRPEncoding>)Parameters["VRPSolution"]; } 42 42 } 43 public ILookupParameter<DoubleMatrix> DistanceMatrixParameter { 44 get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; } 45 } 46 public ILookupParameter<BoolValue> UseDistanceMatrixParameter { 47 get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; } 48 } 43 49 public LookupParameter<DoubleMatrix> CoordinatesParameter { 44 50 get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; } 51 } 52 public ILookupParameter<DoubleArray> ReadyTimeParameter { 53 get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; } 54 } 55 public ILookupParameter<DoubleArray> DueTimeParameter { 56 get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; } 57 } 58 public ILookupParameter<DoubleArray> ServiceTimeParameter { 59 get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; } 45 60 } 46 61 public ScopeTreeLookupParameter<DoubleValue> QualityParameter { … … 73 88 Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("VRPSolution", "The VRP solutions which should be evaluated.")); 74 89 Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities.")); 90 Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities.")); 91 Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false.")); 92 Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer.")); 93 Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer.")); 94 Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer.")); 95 75 96 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the VRP solutions which should be analyzed.")); 76 97 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Distance", "The distances of the VRP solutions which should be analyzed.")); … … 101 122 solution = new VRPSolution(coordinates, best.Clone() as IVRPEncoding, new DoubleValue(qualities[i].Value), 102 123 new DoubleValue(distances[i].Value), new DoubleValue(overloads[i].Value), new DoubleValue(tardinesses[i].Value), 103 new DoubleValue(travelTimes[i].Value), new DoubleValue(vehiclesUtilizations[i].Value)); 124 new DoubleValue(travelTimes[i].Value), new DoubleValue(vehiclesUtilizations[i].Value), 125 DistanceMatrixParameter.ActualValue, UseDistanceMatrixParameter.ActualValue, 126 ReadyTimeParameter.ActualValue, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue); 104 127 BestSolutionParameter.ActualValue = solution; 105 128 results.Add(new Result("Best VRP Solution", solution)); … … 114 137 solution.TravelTime.Value = travelTimes[i].Value; 115 138 solution.VehicleUtilization.Value = vehiclesUtilizations[i].Value; 116 117 if (solution.Quality.Value < solution.Distance.Value) { 118 } 139 solution.DistanceMatrix = DistanceMatrixParameter.ActualValue; 140 solution.UseDistanceMatrix = UseDistanceMatrixParameter.ActualValue; 141 solution.ReadyTime = ReadyTimeParameter.ActualValue; 142 solution.DueTime = DueTimeParameter.ActualValue; 143 solution.ServiceTime = ServiceTimeParameter.ActualValue; 119 144 } 120 145 }
Note: See TracChangeset
for help on using the changeset viewer.