Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6881 for branches/VRP


Ignore:
Timestamp:
10/06/11 11:39:21 (13 years ago)
Author:
svonolfe
Message:

Fixed small issue in PFIH (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs

    r6870 r6881  
    213213      List<int> unroutedCustomers = new List<int>();
    214214      for (int i = 1; i <= problemInstance.Cities.Value; i++) {
    215         if (pdp == null ||
    216            (problemInstance.GetDemand(i) >= 0 ||
    217             pdp.GetPickupDeliveryLocation(i) <= 0))
     215        if (pdp == null || (problemInstance.GetDemand(i) >= 0))
    218216          unroutedCustomers.Add(i);
    219217      }
     
    271269
    272270      tour.Stops.Add(currentCustomer);
    273       if (pdp != null && pdp.GetPickupDeliveryLocation(currentCustomer) > 0) {
     271      if (pdp != null) {
    274272        tour.Stops.Add(pdp.GetPickupDeliveryLocation(currentCustomer));
    275273      }
     
    291289            double tourCost = eval.Quality - originalCosts;
    292290
    293             if (pdp != null && pdp.GetPickupDeliveryLocation(unrouted) > 0) {
     291            if (pdp != null) {
    294292              for (int j = i + 1; j <= tour.Stops.Count; j++) {
    295293                bool feasible;
     
    326324        if (indexOfMinimumCost != -1) {
    327325          tour.Stops.Insert(indexOfMinimumCost, customer);
    328           if (pdp != null && pdp.GetPickupDeliveryLocation(customer) > 0) {
     326          if (pdp != null) {
    329327            tour.Stops.Insert(indexOfMinimumCost2, pdp.GetPickupDeliveryLocation(customer));
    330328          }
     
    349347
    350348          tour.Stops.Add(currentCustomer);
    351           if (pdp != null && pdp.GetPickupDeliveryLocation(currentCustomer) > 0) {
     349          if (pdp != null) {
    352350            tour.Stops.Add(pdp.GetPickupDeliveryLocation(currentCustomer));
    353351          }
Note: See TracChangeset for help on using the changeset viewer.