Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/04/10 17:34:02 (14 years ago)
Author:
svonolfe
Message:

Further improved the VRP design (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs

    r4150 r4154  
    3939  [Item("VRPEvaluator", "Evaluates solutions for the VRP problem.")]
    4040  [StorableClass]
    41   public sealed class VRPEvaluator : SingleSuccessorOperator, IVRPEvaluator {
     41  public sealed class VRPEvaluator : VRPOperator, IVRPEvaluator {
    4242    #region ISingleObjectiveEvaluator Members
    4343    public ILookupParameter<DoubleValue> QualityParameter {
     
    6565      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPSolution"]; }
    6666    }
    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   
    9468    public ILookupParameter<DoubleValue> FleetUsageFactor {
    9569      get { return (ILookupParameter<DoubleValue>)Parameters["FleetUsageFactor"]; }
     
    11791      Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness."));
    11892      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."));
    12893      Parameters.Add(new LookupParameter<DoubleValue>("FleetUsageFactor", "The fleet usage factor considered in the evaluation."));
    12994      Parameters.Add(new LookupParameter<DoubleValue>("TimeFactor", "The time factor considered in the evaluation."));
     
    166131
    167132        //drive there
    168         double currentDistace = VehicleRoutingProblem.GetDistance(start, end, coordinates, distanceMatrix, useDistanceMatrix);
     133        double currentDistace = VRPUtilities.GetDistance(start, end, coordinates, distanceMatrix, useDistanceMatrix);
    169134        distance += currentDistace;
    170135        time += currentDistace;
Note: See TracChangeset for help on using the changeset viewer.