Changeset 4154 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs
- Timestamp:
- 08/04/10 17:34:02 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs
r4150 r4154 39 39 [Item("VRPEvaluator", "Evaluates solutions for the VRP problem.")] 40 40 [StorableClass] 41 public sealed class VRPEvaluator : SingleSuccessorOperator, IVRPEvaluator {41 public sealed class VRPEvaluator : VRPOperator, IVRPEvaluator { 42 42 #region ISingleObjectiveEvaluator Members 43 43 public ILookupParameter<DoubleValue> QualityParameter { … … 65 65 get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPSolution"]; } 66 66 } 67 public ILookupParameter<DoubleMatrix> CoordinatesParameter { 68 get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; } 69 } 70 public ILookupParameter<DoubleMatrix> DistanceMatrixParameter { 71 get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; } 72 } 73 public ILookupParameter<BoolValue> UseDistanceMatrixParameter { 74 get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; } 75 } 76 public ILookupParameter<IntValue> VehiclesParameter { 77 get { return (ILookupParameter<IntValue>)Parameters["Vehicles"]; } 78 } 79 public ILookupParameter<DoubleValue> CapacityParameter { 80 get { return (ILookupParameter<DoubleValue>)Parameters["Capacity"]; } 81 } 82 public ILookupParameter<DoubleArray> DemandParameter { 83 get { return (ILookupParameter<DoubleArray>)Parameters["Demand"]; } 84 } 85 public ILookupParameter<DoubleArray> ReadyTimeParameter { 86 get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; } 87 } 88 public ILookupParameter<DoubleArray> DueTimeParameter { 89 get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; } 90 } 91 public ILookupParameter<DoubleArray> ServiceTimeParameter { 92 get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; } 93 } 67 94 68 public ILookupParameter<DoubleValue> FleetUsageFactor { 95 69 get { return (ILookupParameter<DoubleValue>)Parameters["FleetUsageFactor"]; } … … 117 91 Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness.")); 118 92 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPSolution", "The VRP solution which should be evaluated.")); 119 Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates of the cities."));120 Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));121 Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));122 Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The number of vehicles."));123 Parameters.Add(new LookupParameter<DoubleValue>("Capacity", "The capacity of each vehicle."));124 Parameters.Add(new LookupParameter<DoubleArray>("Demand", "The demand of each customer."));125 Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));126 Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));127 Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));128 93 Parameters.Add(new LookupParameter<DoubleValue>("FleetUsageFactor", "The fleet usage factor considered in the evaluation.")); 129 94 Parameters.Add(new LookupParameter<DoubleValue>("TimeFactor", "The time factor considered in the evaluation.")); … … 166 131 167 132 //drive there 168 double currentDistace = V ehicleRoutingProblem.GetDistance(start, end, coordinates, distanceMatrix, useDistanceMatrix);133 double currentDistace = VRPUtilities.GetDistance(start, end, coordinates, distanceMatrix, useDistanceMatrix); 169 134 distance += currentDistace; 170 135 time += currentDistace;
Note: See TracChangeset
for help on using the changeset viewer.