Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/10 15:01:48 (14 years ago)
Author:
svonolfe
Message:

Fixed some problems in the VRP implementation (#1039)

File:
1 edited

Legend:

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

    r3938 r3947  
    8484      get { return (ILookupParameter<DoubleValue>)Parameters["Capacity"]; }
    8585    }
    86     /*public ILookupParameter<DoubleValue> MaxTravelTimeParameter {
    87       get { return (ILookupParameter<DoubleValue>)Parameters["MaxTravelTime"]; }
    88     } */
    8986    public ILookupParameter<DoubleArray> DemandParameter {
    9087      get { return (ILookupParameter<DoubleArray>)Parameters["Demand"]; }
     
    9996      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
    10097    }
    101     public IValueParameter<DoubleValue> FleetUsageFactor {
    102       get { return (IValueParameter<DoubleValue>)Parameters["FleetUsageFactor"]; }
    103     }
    104     public IValueParameter<DoubleValue> TimeFactor {
    105       get { return (IValueParameter<DoubleValue>)Parameters["TimeFactor"]; }
    106     }
    107     public IValueParameter<DoubleValue> DistanceFactor {
    108       get { return (IValueParameter<DoubleValue>)Parameters["DistanceFactor"]; }
    109     }
    110     /*public IValueParameter<DoubleValue> TimePenalty {
    111       get { return (IValueParameter<DoubleValue>)Parameters["TimePenalty"]; }
    112     } */
    113     public IValueParameter<DoubleValue> OverloadPenalty {
    114       get { return (IValueParameter<DoubleValue>)Parameters["OverloadPenalty"]; }
    115     }
    116     public IValueParameter<DoubleValue> TardinessPenalty {
    117       get { return (IValueParameter<DoubleValue>)Parameters["TardinessPenalty"]; }
     98    public ILookupParameter<DoubleValue> FleetUsageFactor {
     99      get { return (ILookupParameter<DoubleValue>)Parameters["FleetUsageFactor"]; }
     100    }
     101    public ILookupParameter<DoubleValue> TimeFactor {
     102      get { return (ILookupParameter<DoubleValue>)Parameters["TimeFactor"]; }
     103    }
     104    public ILookupParameter<DoubleValue> DistanceFactor {
     105      get { return (ILookupParameter<DoubleValue>)Parameters["DistanceFactor"]; }
     106    }
     107    public ILookupParameter<DoubleValue> OverloadPenalty {
     108      get { return (ILookupParameter<DoubleValue>)Parameters["OverloadPenalty"]; }
     109    }
     110    public ILookupParameter<DoubleValue> TardinessPenalty {
     111      get { return (ILookupParameter<DoubleValue>)Parameters["TardinessPenalty"]; }
    118112    }
    119113
     
    132126      Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The number of vehicles."));
    133127      Parameters.Add(new LookupParameter<DoubleValue>("Capacity", "The capacity of each vehicle."));
    134       //Parameters.Add(new LookupParameter<DoubleValue>("MaxTravelTime", "The maximum travel time of each route."));
    135128      Parameters.Add(new LookupParameter<DoubleArray>("Demand", "The demand of each customer."));
    136129      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
    137130      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
    138131      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
    139       Parameters.Add(new ValueParameter<DoubleValue>("FleetUsageFactor", "The fleet usage factor considered in the evaluation.", new DoubleValue(0)));
    140       Parameters.Add(new ValueParameter<DoubleValue>("TimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0)));
    141       Parameters.Add(new ValueParameter<DoubleValue>("DistanceFactor", "The distance factor considered in the evaluation.", new DoubleValue(1)));
    142       //Parameters.Add(new ValueParameter<DoubleValue>("TimePenalty", "The time penalty considered in the evaluation.", new DoubleValue(10)));
    143       Parameters.Add(new ValueParameter<DoubleValue>("OverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(50)));
    144       Parameters.Add(new ValueParameter<DoubleValue>("TardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(50)));
     132      Parameters.Add(new LookupParameter<DoubleValue>("FleetUsageFactor", "The fleet usage factor considered in the evaluation."));
     133      Parameters.Add(new LookupParameter<DoubleValue>("TimeFactor", "The time factor considered in the evaluation."));
     134      Parameters.Add(new LookupParameter<DoubleValue>("DistanceFactor", "The distance factor considered in the evaluation."));
     135      Parameters.Add(new LookupParameter<DoubleValue>("OverloadPenalty", "The overload penalty considered in the evaluation."));
     136      Parameters.Add(new LookupParameter<DoubleValue>("TardinessPenalty", "The tardiness penalty considered in the evaluation."));
    145137    }
    146138
     
    289281      }
    290282
    291       if (sumEval.Quality < sumEval.Distance) {
    292       }
    293 
    294283      return sumEval;
    295284    }
     
    299288
    300289      TourEvaluation sumEval = Evaluate(solution, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
    301         DemandParameter.ActualValue, CapacityParameter.ActualValue, 
    302         FleetUsageFactor.Value, TimeFactor.Value, DistanceFactor.Value, OverloadPenalty.Value, TardinessPenalty.Value,
     290        DemandParameter.ActualValue, CapacityParameter.ActualValue,
     291        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue,
    303292        CoordinatesParameter.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
    304293
Note: See TracChangeset for help on using the changeset viewer.