Ignore:
Timestamp:
05/10/12 15:31:22 (8 years ago)
Author:
svonolfe
Message:

Improved PDP moves (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuMaker.cs

    r6773 r7791  
    7373      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
    7474    }
     75    public ILookupParameter<IntValue> PickupViolationsParameter {
     76      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
     77    }
    7578
    7679    [StorableConstructor]
     
    9295        Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual"));
    9396        Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual"));
     97        Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations."));
    9498    }
    9599
     
    128132        tardiness = TardinessParameter.ActualValue.Value;
    129133
    130       tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness));
    131       tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.Replaced, distance, overload, tardiness));
     134      int pickupViolations = 0;
     135      if (PickupViolationsParameter.ActualValue != null)
     136        pickupViolations = PickupViolationsParameter.ActualValue.Value;
     137
     138      tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness, pickupViolations));
     139      tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.Replaced, distance, overload, tardiness, pickupViolations));
    132140      return base.Apply();
    133141    }
Note: See TracChangeset for help on using the changeset viewer.