Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/09/10 18:08:14 (14 years ago)
Author:
svonolfe
Message:

Refactored VRP based on the code review (#1039)

File:
1 edited

Legend:

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

    r4174 r4179  
    6262    }
    6363
    64     public ILookupParameter<IVRPEncoding> VRPSolutionParameter {
    65       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPSolution"]; }
     64    public ILookupParameter<IVRPEncoding> VRPToursParameter {
     65      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
    6666    }
    6767   
    6868    public ILookupParameter<DoubleValue> FleetUsageFactor {
    69       get { return (ILookupParameter<DoubleValue>)Parameters["FleetUsageFactor"]; }
     69      get { return (ILookupParameter<DoubleValue>)Parameters["EvalFleetUsageFactor"]; }
    7070    }
    7171    public ILookupParameter<DoubleValue> TimeFactor {
    72       get { return (ILookupParameter<DoubleValue>)Parameters["TimeFactor"]; }
     72      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTimeFactor"]; }
    7373    }
    7474    public ILookupParameter<DoubleValue> DistanceFactor {
    75       get { return (ILookupParameter<DoubleValue>)Parameters["DistanceFactor"]; }
     75      get { return (ILookupParameter<DoubleValue>)Parameters["EvalDistanceFactor"]; }
    7676    }
    7777    public ILookupParameter<DoubleValue> OverloadPenalty {
    78       get { return (ILookupParameter<DoubleValue>)Parameters["OverloadPenalty"]; }
     78      get { return (ILookupParameter<DoubleValue>)Parameters["EvalOverloadPenalty"]; }
    7979    }
    8080    public ILookupParameter<DoubleValue> TardinessPenalty {
    81       get { return (ILookupParameter<DoubleValue>)Parameters["TardinessPenalty"]; }
     81      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTardinessPenalty"]; }
    8282    }
    8383
     
    9090      Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload."));
    9191      Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness."));
    92       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPSolution", "The VRP solution which should be evaluated."));
    93       Parameters.Add(new LookupParameter<DoubleValue>("FleetUsageFactor", "The fleet usage factor considered in the evaluation."));
    94       Parameters.Add(new LookupParameter<DoubleValue>("TimeFactor", "The time factor considered in the evaluation."));
    95       Parameters.Add(new LookupParameter<DoubleValue>("DistanceFactor", "The distance factor considered in the evaluation."));
    96       Parameters.Add(new LookupParameter<DoubleValue>("OverloadPenalty", "The overload penalty considered in the evaluation."));
    97       Parameters.Add(new LookupParameter<DoubleValue>("TardinessPenalty", "The tardiness penalty considered in the evaluation."));
     92      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours which should be evaluated."));
     93      Parameters.Add(new LookupParameter<DoubleValue>("EvalFleetUsageFactor", "The fleet usage factor considered in the evaluation."));
     94      Parameters.Add(new LookupParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation."));
     95      Parameters.Add(new LookupParameter<DoubleValue>("EvalDistanceFactor", "The distance factor considered in the evaluation."));
     96      Parameters.Add(new LookupParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation."));
     97      Parameters.Add(new LookupParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation."));
    9898    }
    9999
    100100    private double CalculateFleetUsage() {
    101       IVRPEncoding vrpSolution = VRPSolutionParameter.ActualValue;
     101      IVRPEncoding vrpSolution = VRPToursParameter.ActualValue;
    102102
    103103      return vrpSolution.Tours.Count;
     
    206206
    207207    public sealed override IOperation Apply() {
    208       IVRPEncoding solution = VRPSolutionParameter.ActualValue;
     208      IVRPEncoding solution = VRPToursParameter.ActualValue;
    209209
    210210      TourEvaluation sumEval = Evaluate(solution, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
Note: See TracChangeset for help on using the changeset viewer.