Changeset 3232 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/PreventReaddAndRemovalTranslocationMoveTabuChecker.cs
- Timestamp:
- 03/29/10 18:49:55 (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/PreventReaddAndRemovalTranslocationMoveTabuChecker.cs
r3231 r3232 29 29 30 30 namespace HeuristicLab.Encodings.PermutationEncoding { 31 [Item(" ThreeOptPreventEdgeRemovalAndReadding", "Prevents readding of previously deleted edges as well as deleting previously added edges.")]31 [Item("PreventReaddAndRemovalTranslocationMoveTabuChecker", "Prevents readding of previously deleted edges as well as deleting previously added edges.")] 32 32 [StorableClass] 33 public class PreventReadd DeleteThreeOptTabuMoveEvaluator : SingleSuccessorOperator, IThreeOptPermutationMoveOperator, ITabuMoveEvaluator {33 public class PreventReaddAndRemovalTranslocationMoveTabuChecker : SingleSuccessorOperator, IPermutationTranslocationMoveOperator, ITabuChecker { 34 34 public override bool CanChangeName { 35 35 get { return false; } 36 36 } 37 public ILookupParameter<T hreeOptMove> ThreeOptMoveParameter {38 get { return (LookupParameter<T hreeOptMove>)Parameters["ThreeOptMove"]; }37 public ILookupParameter<TranslocationMove> TranslocationMoveParameter { 38 get { return (LookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; } 39 39 } 40 40 public ILookupParameter<Permutation> PermutationParameter { … … 51 51 } 52 52 53 public PreventReadd DeleteThreeOptTabuMoveEvaluator()53 public PreventReaddAndRemovalTranslocationMoveTabuChecker() 54 54 : base() { 55 Parameters.Add(new LookupParameter<T hreeOptMove>("ThreeOptMove", "The move to evaluate."));55 Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate.")); 56 56 Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu.")); 57 57 Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation.")); … … 62 62 public override IOperation Apply() { 63 63 ItemList<IItem> tabuList = TabuListParameter.ActualValue; 64 T hreeOptMove move = ThreeOptMoveParameter.ActualValue;64 TranslocationMove move = TranslocationMoveParameter.ActualValue; 65 65 Permutation permutation = PermutationParameter.ActualValue; 66 66 int length = permutation.Length; … … 83 83 if (!isTabu) { 84 84 foreach (IItem tabuMove in tabuList) { 85 T hreeOptTabuMoveAttribute attribute = (tabuMove as ThreeOptTabuMoveAttribute);85 TranslocationMoveAttribute attribute = (tabuMove as TranslocationMoveAttribute); 86 86 if (attribute != null) { 87 87 // if previously deleted Edge1Source-Target is readded
Note: See TracChangeset
for help on using the changeset viewer.