Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/01/10 11:13:46 (14 years ago)
Author:
svonolfe
Message:

Merged r4351 of the VRP feature branch into trunk (#1039)

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting

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

    r4179 r4352  
    101101      IVRPEncoding vrpSolution = VRPToursParameter.ActualValue;
    102102
    103       return vrpSolution.Tours.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.Tours) {
     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.