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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.