Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/29/11 15:51:56 (13 years ago)
Author:
svonolfe
Message:

Added support for multi depot CVRP instances (#1177)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/Crossovers/GVRCrossover.cs

    r4752 r6851  
    8282      for (int i = 1; i <= ProblemInstance.Cities.Value; i++) {
    8383        if (!subroute.Contains(i)) {
    84           double distance = ProblemInstance.GetDistance(subroute[0], i);
     84          double distance = ProblemInstance.GetDistance(subroute[0], i, child);
    8585
    8686          if (customer == -1 || distance < minDistance) {
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/GVREncoding.cs

    r4752 r6851  
    4242        double currentDemand = 0;
    4343
    44         DoubleArray demand = ProblemInstance.Demand;
    4544        DoubleValue capacity = new DoubleValue(double.MaxValue);
    4645        if (ProblemInstance is IHomogenousCapacitatedProblemInstance) {
     
    5049
    5150        foreach (int city in tour.Stops) {
    52           currentDemand += demand[city];
     51          currentDemand += ProblemInstance.GetDemand(city);
    5352
    5453          if (currentDemand > capacity.Value) {
     
    5857            newTour = new Tour();
    5958            newTour.Stops.Add(city);
    60             currentDemand = demand[city];
     59            currentDemand = ProblemInstance.GetDemand(city);
    6160          } else {
    6261            newTour.Stops.Add(city);
Note: See TracChangeset for help on using the changeset viewer.