Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/30/11 12:55:55 (13 years ago)
Author:
svonolfe
Message:

Added possibility to add a ready time to depots (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWEvaluator.cs

    r6851 r6855  
    7575      int pickupViolations = 0;
    7676
     77      double tourStartTime = readyTime[0];
     78      time = tourStartTime;
     79
    7780      //simulate a tour, start and end at depot
    7881      for (int i = 0; i <= tour.Stops.Count; i++) {
     
    130133
    131134        double spareCapacity = capacity - currentLoad;
    132         CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, arrivalTime, time, spareTime, waitTime, new List<int>(stops.Keys), arrivalSpareCapacity);
     135        CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, tourStartTime,
     136          arrivalTime, time, spareTime, waitTime, new List<int>(stops.Keys), arrivalSpareCapacity);
    133137        tourInfo.AddStopInsertionInfo(stopInfo);
    134138
     
    215219      if (index > 0)
    216220        time = (tourInsertionInfo.GetStopInsertionInfo(index - 1) as CVRPTWInsertionInfo).LeaveTime;
     221      else
     222        time = insertionInfo.TourStartTime;
     223
    217224      time += instance.GetDistance(insertionInfo.Start, customer, solution);
    218225      if (time > dueTime[customer]) {
Note: See TracChangeset for help on using the changeset viewer.