Changeset 7865 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveTabuCriterion.cs
- Timestamp:
- 05/22/12 09:53:07 (12 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveTabuCriterion.cs
r7774 r7865 32 32 33 33 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 34 [Item("Potvin OnePointCrossoverTabuCriterion", @"Checks if a certain customer relocationmove is tabu.")]34 [Item("PotvinTwoOptStarTabuCriterion", @"Checks if a certain two opt star move is tabu.")] 35 35 [StorableClass] 36 public class Potvin OnePointCrossoverMoveTabuCriterion : SingleSuccessorOperator, IPotvinOnePointCrossoverMoveOperator, ITabuChecker, IPotvinOperator, IVRPMoveOperator {36 public class PotvinTwoOptStarMoveTabuCriterion : SingleSuccessorOperator, IPotvinTwoOptStarMoveOperator, ITabuChecker, IPotvinOperator, IVRPMoveOperator { 37 37 public override bool CanChangeName { 38 38 get { return false; } 39 39 } 40 40 41 public ILookupParameter<Potvin OnePointCrossoverMove> OnePointCrossoverMoveParameter {42 get { return (ILookupParameter<Potvin OnePointCrossoverMove>)Parameters["PotvinOnePointCrossoverMove"]; }41 public ILookupParameter<PotvinTwoOptStarMove> TwoOptStarMoveParameter { 42 get { return (ILookupParameter<PotvinTwoOptStarMove>)Parameters["PotvinTwoOptStarMove"]; } 43 43 } 44 44 public ILookupParameter VRPMoveParameter { 45 get { return OnePointCrossoverMoveParameter; }45 get { return TwoOptStarMoveParameter; } 46 46 } 47 47 public ILookupParameter<IVRPEncoding> VRPToursParameter { … … 84 84 85 85 [StorableConstructor] 86 protected Potvin OnePointCrossoverMoveTabuCriterion(bool deserializing) : base(deserializing) { }87 protected Potvin OnePointCrossoverMoveTabuCriterion(PotvinOnePointCrossoverMoveTabuCriterion original, Cloner cloner) : base(original, cloner) { }88 public Potvin OnePointCrossoverMoveTabuCriterion()86 protected PotvinTwoOptStarMoveTabuCriterion(bool deserializing) : base(deserializing) { } 87 protected PotvinTwoOptStarMoveTabuCriterion(PotvinTwoOptStarMoveTabuCriterion original, Cloner cloner) : base(original, cloner) { } 88 public PotvinTwoOptStarMoveTabuCriterion() 89 89 : base() { 90 Parameters.Add(new LookupParameter<Potvin OnePointCrossoverMove>("PotvinOnePointCrossoverMove", "The moves that should be made."));90 Parameters.Add(new LookupParameter<PotvinTwoOptStarMove>("PotvinTwoOptStarMove", "The moves that should be made.")); 91 91 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move.")); 92 92 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); … … 104 104 105 105 public override IDeepCloneable Clone(Cloner cloner) { 106 return new Potvin OnePointCrossoverMoveTabuCriterion(this, cloner);106 return new PotvinTwoOptStarMoveTabuCriterion(this, cloner); 107 107 } 108 108 … … 112 112 bool useAspiration = UseAspirationCriterion.Value; 113 113 bool isTabu = false; 114 Potvin OnePointCrossoverMove move = OnePointCrossoverMoveParameter.ActualValue;114 PotvinTwoOptStarMove move = TwoOptStarMoveParameter.ActualValue; 115 115 116 116 List<int> segmentX1; 117 117 List<int> segmentX2; 118 Potvin OnePointCrossoverMoveMaker.GetSegments(move, out segmentX1, out segmentX2);118 PotvinTwoOptStarMoveMaker.GetSegments(move, out segmentX1, out segmentX2); 119 119 120 120 foreach (IItem tabuMove in tabuList) { 121 Potvin OnePointCrossoverMoveAttribute attribute = tabuMove as PotvinOnePointCrossoverMoveAttribute;121 PotvinTwoOptStarMoveAttribute attribute = tabuMove as PotvinTwoOptStarMoveAttribute; 122 122 123 123 if (attribute != null) {
Note: See TracChangeset
for help on using the changeset viewer.