Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/19/10 16:51:30 (14 years ago)
Author:
svonolfe
Message:

Added prins encoding (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs

    r4230 r4268  
    101101      IVRPEncoding vrpSolution = VRPToursParameter.ActualValue;
    102102
    103       return vrpSolution.GetTours().Count;
     103      return vrpSolution.GetTours(DistanceMatrixParameter, VehiclesParameter.ActualValue.Value).Count;
    104104    }
    105105
     
    178178    }
    179179
    180     public static TourEvaluation Evaluate(IVRPEncoding solution, DoubleArray dueTimeArray,
     180    public static TourEvaluation Evaluate(IVRPEncoding solution, IntValue vehicles, DoubleArray dueTimeArray,
    181181      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
    182182      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor, DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
     
    190190      sumEval.Tardiness = 0;
    191191
    192       foreach (Tour tour in solution.GetTours()) {
     192      foreach (Tour tour in solution.GetTours(distanceMatrix)) {
    193193        TourEvaluation eval = EvaluateTour(tour, dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
    194194          fleetUsageFactor, timeFactor, distanceFactor, overloadPenalty, tardinessPenalty,
     
    208208      IVRPEncoding solution = VRPToursParameter.ActualValue;
    209209
    210       TourEvaluation sumEval = Evaluate(solution, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
     210      TourEvaluation sumEval = Evaluate(solution, VehiclesParameter.ActualValue, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
    211211        DemandParameter.ActualValue, CapacityParameter.ActualValue,
    212212        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue,
Note: See TracChangeset for help on using the changeset viewer.