Changeset 3232 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/PreventRemovalInversionMoveTabuChecker.cs
- Timestamp:
- 03/29/10 18:49:55 (15 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/PreventRemovalInversionMoveTabuChecker.cs
r3229 r3232 29 29 30 30 namespace HeuristicLab.Encodings.PermutationEncoding { 31 [Item(" TwoOptPreventEdgeRemoval", "Prevents deleting of previously added edges.")]31 [Item("PreventRemovalInversionMoveTabuChecker", "Prevents deleting of previously added edges.")] 32 32 [StorableClass] 33 public class Prevent DeleteTwoOptTabuMoveEvaluator : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, ITabuMoveEvaluator {33 public class PreventRemovalInversionMoveTabuChecker : SingleSuccessorOperator, IPermutationInversionMoveOperator, ITabuChecker { 34 34 public override bool CanChangeName { 35 35 get { return false; } 36 36 } 37 public ILookupParameter< TwoOptMove> TwoOptMoveParameter {38 get { return (LookupParameter< TwoOptMove>)Parameters["TwoOptMove"]; }37 public ILookupParameter<InversionMove> InversionMoveParameter { 38 get { return (LookupParameter<InversionMove>)Parameters["InversionMove"]; } 39 39 } 40 40 public ILookupParameter<Permutation> PermutationParameter { … … 51 51 } 52 52 53 public Prevent DeleteTwoOptTabuMoveEvaluator()53 public PreventRemovalInversionMoveTabuChecker() 54 54 : base() { 55 Parameters.Add(new LookupParameter< TwoOptMove>("TwoOptMove", "The move to evaluate."));55 Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "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 TwoOptMove move = TwoOptMoveParameter.ActualValue;64 InversionMove move = InversionMoveParameter.ActualValue; 65 65 Permutation permutation = PermutationParameter.ActualValue; 66 66 int length = permutation.Length; … … 72 72 if (!isTabu) { 73 73 foreach (IItem tabuMove in tabuList) { 74 TwoOptTabuMoveAttribute attribute = (tabuMove as TwoOptTabuMoveAttribute);74 InversionMoveAttribute attribute = (tabuMove as InversionMoveAttribute); 75 75 if (attribute != null) { 76 76 // if previously added Edge1Source-Edge2Source is deleted
Note: See TracChangeset
for help on using the changeset viewer.