Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3232 for trunk/sources


Ignore:
Timestamp:
03/29/10 18:49:55 (15 years ago)
Author:
abeham
Message:

Renamed operators according to the underlying operation #889

Location:
trunk/sources
Files:
6 added
6 deleted
9 edited
29 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs

    r3201 r3232  
    6363      get { return (ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>)Parameters["MoveEvaluator"]; }
    6464    }
    65     private ConstrainedValueParameter<ITabuMoveEvaluator> TabuMoveEvaluatorParameter {
    66       get { return (ConstrainedValueParameter<ITabuMoveEvaluator>)Parameters["TabuMoveEvaluator"]; }
    67     }
    68     private ConstrainedValueParameter<ITabuMoveMaker> TabuMoveMakerParameter {
    69       get { return (ConstrainedValueParameter<ITabuMoveMaker>)Parameters["TabuMoveMaker"]; }
     65    private ConstrainedValueParameter<ITabuChecker> TabuMoveEvaluatorParameter {
     66      get { return (ConstrainedValueParameter<ITabuChecker>)Parameters["TabuMoveEvaluator"]; }
     67    }
     68    private ConstrainedValueParameter<ITabuMaker> TabuMoveMakerParameter {
     69      get { return (ConstrainedValueParameter<ITabuMaker>)Parameters["TabuMoveMaker"]; }
    7070    }
    7171    private ValueParameter<IntValue> TabuTenureParameter {
     
    101101      set { MoveEvaluatorParameter.Value = value; }
    102102    }
    103     public ITabuMoveEvaluator TabuMoveEvaluator {
     103    public ITabuChecker TabuMoveEvaluator {
    104104      get { return TabuMoveEvaluatorParameter.Value; }
    105105      set { TabuMoveEvaluatorParameter.Value = value; }
    106106    }
    107     public ITabuMoveMaker TabuMoveMaker {
     107    public ITabuMaker TabuMoveMaker {
    108108      get { return TabuMoveMakerParameter.Value; }
    109109      set { TabuMoveMakerParameter.Value = value; }
     
    137137      Parameters.Add(new ConstrainedValueParameter<IMoveMaker>("MoveMaker", "The operator used to perform a move."));
    138138      Parameters.Add(new ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>("MoveEvaluator", "The operator used to evaluate a move."));
    139       Parameters.Add(new ConstrainedValueParameter<ITabuMoveEvaluator>("TabuMoveEvaluator", "The operator to evaluate whether a move is tabu or not."));
    140       Parameters.Add(new ConstrainedValueParameter<ITabuMoveMaker>("TabuMoveMaker", "The operator used to insert attributes of a move into the tabu list."));
     139      Parameters.Add(new ConstrainedValueParameter<ITabuChecker>("TabuMoveEvaluator", "The operator to evaluate whether a move is tabu or not."));
     140      Parameters.Add(new ConstrainedValueParameter<ITabuMaker>("TabuMoveMaker", "The operator used to insert attributes of a move into the tabu list."));
    141141      Parameters.Add(new ValueParameter<IntValue>("TabuTenure", "The length of the tabu list.", new IntValue(10)));
    142142      Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000)));
     
    193193        op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
    194194      }
    195       foreach (ITabuMoveEvaluator op in Problem.Operators.OfType<ITabuMoveEvaluator>()) {
     195      foreach (ITabuChecker op in Problem.Operators.OfType<ITabuChecker>()) {
    196196        op.MoveTabuParameter.ActualNameChanged += new EventHandler(TabuMoveEvaluator_MoveTabuParameter_ActualNameChanged);
    197197      }
     
    234234        op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
    235235      }
    236       foreach (ITabuMoveEvaluator op in Problem.Operators.OfType<ITabuMoveEvaluator>()) {
     236      foreach (ITabuChecker op in Problem.Operators.OfType<ITabuChecker>()) {
    237237        op.MoveTabuParameter.ActualNameChanged -= new EventHandler(TabuMoveEvaluator_MoveTabuParameter_ActualNameChanged);
    238238        op.MoveTabuParameter.ActualNameChanged += new EventHandler(TabuMoveEvaluator_MoveTabuParameter_ActualNameChanged);
     
    310310      IMoveMaker oldMoveMaker = MoveMaker;
    311311      ISingleObjectiveMoveEvaluator oldMoveEvaluator = MoveEvaluator;
    312       ITabuMoveEvaluator oldTabuMoveEvaluator = TabuMoveEvaluator;
    313       ITabuMoveMaker oldTabuMoveMaker = TabuMoveMaker;
     312      ITabuChecker oldTabuMoveEvaluator = TabuMoveEvaluator;
     313      ITabuMaker oldTabuMoveMaker = TabuMoveMaker;
    314314      ClearMoveParameters();
    315315      if (MoveGenerator != null) {
     
    325325          foreach (ISingleObjectiveMoveEvaluator moveEvaluator in operators.OfType<ISingleObjectiveMoveEvaluator>())
    326326            MoveEvaluatorParameter.ValidValues.Add(moveEvaluator);
    327           foreach (ITabuMoveEvaluator tabuMoveEvaluator in operators.OfType<ITabuMoveEvaluator>())
     327          foreach (ITabuChecker tabuMoveEvaluator in operators.OfType<ITabuChecker>())
    328328            TabuMoveEvaluatorParameter.ValidValues.Add(tabuMoveEvaluator);
    329           foreach (ITabuMoveMaker tabuMoveMaker in operators.OfType<ITabuMoveMaker>())
     329          foreach (ITabuMaker tabuMoveMaker in operators.OfType<ITabuMaker>())
    330330            TabuMoveMakerParameter.ValidValues.Add(tabuMoveMaker);
    331331        }
     
    339339        }
    340340        if (oldTabuMoveMaker != null) {
    341           ITabuMoveMaker tmm = TabuMoveMakerParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldTabuMoveMaker.GetType());
     341          ITabuMaker tmm = TabuMoveMakerParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldTabuMoveMaker.GetType());
    342342          if (tmm != null) TabuMoveMaker = tmm;
    343343        }
    344344        if (oldTabuMoveEvaluator != null) {
    345           ITabuMoveEvaluator tme = TabuMoveEvaluatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldTabuMoveEvaluator.GetType());
     345          ITabuChecker tme = TabuMoveEvaluatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldTabuMoveEvaluator.GetType());
    346346          if (tme != null) TabuMoveEvaluator = tme;
    347347        }
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipTabuMoveMaker.cs

    r3119 r3232  
    3131  [Item("OneBitflipTabuMoveMaker", "Declares a given one bitflip move as tabu, by adding its attributes to the tabu list. It also removes the oldest entry in the tabu list when its size is greater than tenure.")]
    3232  [StorableClass]
    33   public class OneBitflipTabuMoveMaker : TabuMoveMaker, IOneBitflipMoveOperator {
     33  public class OneBitflipTabuMoveMaker : TabuMaker, IOneBitflipMoveOperator {
    3434    public ILookupParameter<BinaryVector> BinaryVectorParameter {
    3535      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/PreventOneBitflipTabuMoveEvaluator.cs

    r3117 r3232  
    3131  [Item("PreventOneBitflipTabuMoveEvaluator", "Prevents peforming a one bitflip move again.")]
    3232  [StorableClass]
    33   public class PreventOneBitflipTabuMoveEvaluator : SingleSuccessorOperator, IOneBitflipMoveOperator, ITabuMoveEvaluator {
     33  public class PreventOneBitflipTabuMoveEvaluator : SingleSuccessorOperator, IOneBitflipMoveOperator, ITabuChecker {
    3434    public ILookupParameter<OneBitflipMove> OneBitflipMoveParameter {
    3535      get { return (LookupParameter<OneBitflipMove>)Parameters["OneBitflipMove"]; }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLab.Encodings.PermutationEncoding-3.3.csproj

    r3231 r3232  
    9898    <Compile Include="Interfaces\IPermutationMoveOperator.cs" />
    9999    <Compile Include="Interfaces\IPermutationOperator.cs" />
    100     <Compile Include="Interfaces\IThreeOptPermutationMoveOperator.cs" />
    101     <Compile Include="Interfaces\ITwoOptPermutationMoveOperator.cs" />
     100    <Compile Include="Interfaces\IPermutationTranslocationMoveOperator.cs" />
     101    <Compile Include="Interfaces\IPermutationInversionMoveOperator.cs" />
    102102    <Compile Include="Manipulators\InsertionManipulator.cs" />
    103103    <Compile Include="Manipulators\InversionManipulator.cs" />
     
    108108    <Compile Include="Manipulators\TranslocationManipulator.cs" />
    109109    <Compile Include="Moves\ThreeIndexMove.cs" />
    110     <Compile Include="Moves\ThreeOpt\Insertion\ExhaustiveInsertionMoveGenerator.cs">
     110    <Compile Include="Moves\ThreeOpt\ExhaustiveInsertionMoveGenerator.cs">
    111111      <SubType>Code</SubType>
    112112    </Compile>
    113     <Compile Include="Moves\ThreeOpt\PreventDeleteThreeOptTabuMoveEvaluator.cs">
    114       <SubType>Code</SubType>
    115     </Compile>
    116     <Compile Include="Moves\ThreeOpt\PreventReaddDeleteThreeOptTabuMoveEvaluator.cs">
    117       <SubType>Code</SubType>
    118     </Compile>
    119     <Compile Include="Moves\ThreeOpt\PreventReaddThreeOptTabuMoveEvaluator.cs">
    120       <SubType>Code</SubType>
    121     </Compile>
    122     <Compile Include="Moves\ThreeOpt\StochasticThreeOptMultiMoveGenerator.cs">
    123       <SubType>Code</SubType>
    124     </Compile>
    125     <Compile Include="Moves\ThreeOpt\StochasticThreeOptSingleMoveGenerator.cs">
    126       <SubType>Code</SubType>
    127     </Compile>
    128     <Compile Include="Moves\ThreeOpt\ThreeOptMove.cs">
    129       <SubType>Code</SubType>
    130     </Compile>
    131     <Compile Include="Moves\ThreeOpt\ThreeOptMoveGenerator.cs">
    132       <SubType>Code</SubType>
    133     </Compile>
    134     <Compile Include="Moves\ThreeOpt\ThreeOptMoveMaker.cs">
    135       <SubType>Code</SubType>
    136     </Compile>
    137     <Compile Include="Moves\ThreeOpt\ThreeOptTabuMoveAttribute.cs">
    138       <SubType>Code</SubType>
    139     </Compile>
    140     <Compile Include="Moves\ThreeOpt\ThreeOptTabuMoveMaker.cs">
    141       <SubType>Code</SubType>
    142     </Compile>
     113    <Compile Include="Moves\ThreeOpt\PreventReaddAndRemovalTranslocationMoveTabuChecker.cs" />
     114    <Compile Include="Moves\ThreeOpt\PreventReaddTranslocationMoveTabuChecker.cs" />
     115    <Compile Include="Moves\ThreeOpt\PreventRemovalTranslocationMoveTabuChecker.cs" />
     116    <Compile Include="Moves\ThreeOpt\StochasticTranslocationMultiMoveGenerator.cs" />
     117    <Compile Include="Moves\ThreeOpt\StochasticTranslocationSingleMoveGenerator.cs" />
     118    <Compile Include="Moves\ThreeOpt\TranslocationMove.cs" />
     119    <Compile Include="Moves\ThreeOpt\TranslocationMoveAttribute.cs" />
     120    <Compile Include="Moves\ThreeOpt\TranslocationMoveGenerator.cs" />
     121    <Compile Include="Moves\ThreeOpt\TranslocationMoveMaker.cs" />
     122    <Compile Include="Moves\ThreeOpt\TranslocationMoveTabuMaker.cs" />
    143123    <Compile Include="Moves\TwoIndexMove.cs">
    144124      <SubType>Code</SubType>
    145125    </Compile>
    146     <Compile Include="Moves\TwoOpt\ExhaustiveTwoOptMoveGenerator.cs">
    147       <SubType>Code</SubType>
    148     </Compile>
    149     <Compile Include="Moves\TwoOpt\PreventDeleteTwoOptTabuMoveEvaluator.cs">
    150       <SubType>Code</SubType>
    151     </Compile>
    152     <Compile Include="Moves\TwoOpt\PreventReaddDeleteTwoOptTabuMoveEvaluator.cs">
    153       <SubType>Code</SubType>
    154     </Compile>
    155     <Compile Include="Moves\TwoOpt\PreventReaddTwoOptTabuMoveEvaluator.cs">
    156       <SubType>Code</SubType>
    157     </Compile>
    158     <Compile Include="Moves\TwoOpt\StochasticTwoOptMultiMoveGenerator.cs">
    159       <SubType>Code</SubType>
    160     </Compile>
    161     <Compile Include="Moves\TwoOpt\StochasticTwoOptSingleMoveGenerator.cs">
    162       <SubType>Code</SubType>
    163     </Compile>
    164     <Compile Include="Moves\TwoOpt\TwoOptMove.cs">
    165       <SubType>Code</SubType>
    166     </Compile>
    167     <Compile Include="Moves\TwoOpt\TwoOptMoveGenerator.cs">
    168       <SubType>Code</SubType>
    169     </Compile>
    170     <Compile Include="Moves\TwoOpt\TwoOptMoveMaker.cs">
    171       <SubType>Code</SubType>
    172     </Compile>
    173     <Compile Include="Moves\TwoOpt\TwoOptTabuMoveAttribute.cs">
    174       <SubType>Code</SubType>
    175     </Compile>
    176     <Compile Include="Moves\TwoOpt\TwoOptTabuMoveMaker.cs">
    177       <SubType>Code</SubType>
    178     </Compile>
     126    <Compile Include="Moves\TwoOpt\ExhaustiveInversionMoveGenerator.cs" />
     127    <Compile Include="Moves\TwoOpt\InversionMove.cs" />
     128    <Compile Include="Moves\TwoOpt\InversionMoveAttribute.cs" />
     129    <Compile Include="Moves\TwoOpt\InversionMoveGenerator.cs" />
     130    <Compile Include="Moves\TwoOpt\InversionMoveMaker.cs" />
     131    <Compile Include="Moves\TwoOpt\InversionMoveTabuMaker.cs" />
     132    <Compile Include="Moves\TwoOpt\PreventReaddAndRemovalInversionMoveTabuChecker.cs" />
     133    <Compile Include="Moves\TwoOpt\PreventReaddInversionMoveTabuChecker.cs" />
     134    <Compile Include="Moves\TwoOpt\PreventRemovalInversionMoveTabuChecker.cs" />
     135    <Compile Include="Moves\TwoOpt\StochasticInversionMultiMoveGenerator.cs" />
     136    <Compile Include="Moves\TwoOpt\StochasticInversionSingleMoveGenerator.cs" />
    179137    <Compile Include="PermutationManipulator.cs" />
    180138    <Compile Include="PermutationCrossover.cs" />
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/PreventReaddAndRemovalTranslocationMoveTabuChecker.cs

    r3231 r3232  
    2929
    3030namespace 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.")]
    3232  [StorableClass]
    33   public class PreventReaddDeleteThreeOptTabuMoveEvaluator : SingleSuccessorOperator, IThreeOptPermutationMoveOperator, ITabuMoveEvaluator {
     33  public class PreventReaddAndRemovalTranslocationMoveTabuChecker : SingleSuccessorOperator, IPermutationTranslocationMoveOperator, ITabuChecker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
    3636    }
    37     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    38       get { return (LookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     37    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     38      get { return (LookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    3939    }
    4040    public ILookupParameter<Permutation> PermutationParameter {
     
    5151    }
    5252
    53     public PreventReaddDeleteThreeOptTabuMoveEvaluator()
     53    public PreventReaddAndRemovalTranslocationMoveTabuChecker()
    5454      : base() {
    55       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The move to evaluate."));
     55      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
    5656      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
    5757      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    6262    public override IOperation Apply() {
    6363      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
    64       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     64      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    6565      Permutation permutation = PermutationParameter.ActualValue;
    6666      int length = permutation.Length;
     
    8383      if (!isTabu) {
    8484        foreach (IItem tabuMove in tabuList) {
    85           ThreeOptTabuMoveAttribute attribute = (tabuMove as ThreeOptTabuMoveAttribute);
     85          TranslocationMoveAttribute attribute = (tabuMove as TranslocationMoveAttribute);
    8686          if (attribute != null) {
    8787            // if previously deleted Edge1Source-Target is readded
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/PreventReaddTranslocationMoveTabuChecker.cs

    r3231 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("ThreeOptPreventEdgeReadding", "Prevents readding of previously deleted edges.")]
     31  [Item("PreventReaddTranslocationMoveTabuChecker", "Prevents readding of previously deleted edges.")]
    3232  [StorableClass]
    33   public class PreventReaddThreeOptTabuMoveEvaluator : SingleSuccessorOperator, IThreeOptPermutationMoveOperator, ITabuMoveEvaluator {
     33  public class PreventReaddTranslocationMoveTabuChecker : SingleSuccessorOperator, IPermutationTranslocationMoveOperator, ITabuChecker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
    3636    }
    37     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    38       get { return (LookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     37    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     38      get { return (LookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    3939    }
    4040    public ILookupParameter<Permutation> PermutationParameter {
     
    5151    }
    5252
    53     public PreventReaddThreeOptTabuMoveEvaluator()
     53    public PreventReaddTranslocationMoveTabuChecker()
    5454      : base() {
    55       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The move to evaluate."));
     55      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
    5656      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
    5757      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    6262    public override IOperation Apply() {
    6363      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
    64       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     64      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    6565      Permutation permutation = PermutationParameter.ActualValue;
    6666      int length = permutation.Length;
     
    8383      if (!isTabu) {
    8484        foreach (IItem tabuMove in tabuList) {
    85           ThreeOptTabuMoveAttribute attribute = (tabuMove as ThreeOptTabuMoveAttribute);
     85          TranslocationMoveAttribute attribute = (tabuMove as TranslocationMoveAttribute);
    8686          if (attribute != null) {
    8787            // if previously deleted Edge1Source-Target is readded
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/PreventRemovalTranslocationMoveTabuChecker.cs

    r3231 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("ThreeOptPreventEdgeRemoval", "Prevents deleting of previously added edges.")]
     31  [Item("PreventRemovalTranslocationMoveTabuChecker", "Prevents deleting of previously added edges.")]
    3232  [StorableClass]
    33   public class PreventDeleteThreeOptTabuMoveEvaluator : SingleSuccessorOperator, IThreeOptPermutationMoveOperator, ITabuMoveEvaluator {
     33  public class PreventRemovalTranslocationMoveTabuChecker : SingleSuccessorOperator, IPermutationTranslocationMoveOperator, ITabuChecker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
    3636    }
    37     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    38       get { return (LookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     37    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     38      get { return (LookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    3939    }
    4040    public ILookupParameter<Permutation> PermutationParameter {
     
    5151    }
    5252
    53     public PreventDeleteThreeOptTabuMoveEvaluator()
     53    public PreventRemovalTranslocationMoveTabuChecker()
    5454      : base() {
    55       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The move to evaluate."));
     55      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
    5656      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
    5757      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    6262    public override IOperation Apply() {
    6363      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
    64       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     64      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    6565      Permutation permutation = PermutationParameter.ActualValue;
    6666      int length = permutation.Length;
     
    8383      if (!isTabu) {
    8484        foreach (IItem tabuMove in tabuList) {
    85           ThreeOptTabuMoveAttribute attribute = (tabuMove as ThreeOptTabuMoveAttribute);
     85          TranslocationMoveAttribute attribute = (tabuMove as TranslocationMoveAttribute);
    8686          if (attribute != null) {
    8787            // if previously added Edge3Source-Edge1Target is deleted
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationMultiMoveGenerator.cs

    r3231 r3232  
    2828
    2929namespace HeuristicLab.Encodings.PermutationEncoding {
    30   [Item("StochasticThreeOptMultiMoveGenerator", "Randomly samples n from all possible 3-opt moves from a given permutation.")]
     30  [Item("StochasticTranslocationMultiMoveGenerator", "Randomly samples n from all possible translocation and insertion moves (3-opt) from a given permutation.")]
    3131  [StorableClass]
    32   public class StochasticThreeOptMultiMoveGenerator : ThreeOptMoveGenerator, IStochasticOperator, IMultiMoveGenerator {
     32  public class StochasticTranslocationMultiMoveGenerator : TranslocationMoveGenerator, IStochasticOperator, IMultiMoveGenerator {
    3333    public ILookupParameter<IRandom> RandomParameter {
    3434      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    4343    }
    4444
    45     public StochasticThreeOptMultiMoveGenerator()
     45    public StochasticTranslocationMultiMoveGenerator()
    4646      : base() {
    4747      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     
    4949    }
    5050
    51     public static ThreeOptMove[] Apply(Permutation permutation, IRandom random, int sampleSize) {
     51    public static TranslocationMove[] Apply(Permutation permutation, IRandom random, int sampleSize) {
    5252      int length = permutation.Length;
    53       ThreeOptMove[] moves = new ThreeOptMove[sampleSize];
     53      TranslocationMove[] moves = new TranslocationMove[sampleSize];
    5454      for (int i = 0; i < sampleSize; i++) {
    5555        moves[i] = StochasticThreeOptSingleMoveGenerator.Apply(permutation, random);
     
    5858    }
    5959
    60     protected override ThreeOptMove[] GenerateMoves(Permutation permutation) {
     60    protected override TranslocationMove[] GenerateMoves(Permutation permutation) {
    6161      IRandom random = RandomParameter.ActualValue;
    6262      return Apply(permutation, random, SampleSizeParameter.ActualValue.Value);
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationSingleMoveGenerator.cs

    r3231 r3232  
    2828
    2929namespace HeuristicLab.Encodings.PermutationEncoding {
    30   [Item("StochasticThreeOptSingleMoveGenerator", "Randomly samples one from all possible 3-opt moves from a given permutation.")]
     30  [Item("StochasticTranslocationSingleMoveGenerator", "Randomly samples one from all possible translocation and insertion moves (3-opt) from a given permutation.")]
    3131  [StorableClass]
    32   public class StochasticThreeOptSingleMoveGenerator : ThreeOptMoveGenerator, IStochasticOperator, ISingleMoveGenerator {
     32  public class StochasticThreeOptSingleMoveGenerator : TranslocationMoveGenerator, IStochasticOperator, ISingleMoveGenerator {
    3333    public ILookupParameter<IRandom> RandomParameter {
    3434      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    4040    }
    4141
    42     public static ThreeOptMove Apply(Permutation permutation, IRandom random) {
     42    public static TranslocationMove Apply(Permutation permutation, IRandom random) {
    4343      int length = permutation.Length;
    4444      int index1, index2, index3;
     
    5151      } while (index3 == index1);
    5252     
    53       return new ThreeOptMove(index1, index2, index3);
     53      return new TranslocationMove(index1, index2, index3);
    5454    }
    5555
    56     protected override ThreeOptMove[] GenerateMoves(Permutation permutation) {
     56    protected override TranslocationMove[] GenerateMoves(Permutation permutation) {
    5757      IRandom random = RandomParameter.ActualValue;
    58       return new ThreeOptMove[] { Apply(permutation, random) };
     58      return new TranslocationMove[] { Apply(permutation, random) };
    5959    }
    6060  }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMove.cs

    r3231 r3232  
    2424
    2525namespace HeuristicLab.Encodings.PermutationEncoding {
    26   [Item("ThreeOptMove", "A move that changes three edges by performing a translocation.")]
     26  [Item("TranslocationMove", "A move that changes three edges by performing a translocation.")]
    2727  [StorableClass]
    28   public class ThreeOptMove : ThreeIndexMove {
    29     public ThreeOptMove()
     28  public class TranslocationMove : ThreeIndexMove {
     29    public TranslocationMove()
    3030      : base() {
    3131    }
    3232
    33     public ThreeOptMove(int index1, int index2, int index3)
     33    public TranslocationMove(int index1, int index2, int index3)
    3434      : base(index1, index2, index3, null) {
    3535    }
    3636
    37     public ThreeOptMove(int index1, int index2, int index3, Permutation permutation)
     37    public TranslocationMove(int index1, int index2, int index3, Permutation permutation)
    3838      : base(index1, index2, index3, permutation) {
    3939    }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveAttribute.cs

    r3231 r3232  
    2424
    2525namespace HeuristicLab.Encodings.PermutationEncoding {
    26   [Item("ThreeOptTabuMoveAttribute", "Specifies the tabu attributes for a 3-opt move.")]
     26  [Item("TranslocationMoveAttribute", "Specifies the tabu attributes for a translocation and insertion move (3-opt).")]
    2727  [StorableClass]
    28   public class ThreeOptTabuMoveAttribute : Item {
     28  public class TranslocationMoveAttribute : Item {
    2929    [Storable]
    3030    public int Edge1Source { get; private set; }
     
    4141
    4242    [StorableConstructor]
    43     private ThreeOptTabuMoveAttribute(bool deserializing)
     43    private TranslocationMoveAttribute(bool deserializing)
    4444      : base() {
    4545    }
    4646
    47     public ThreeOptTabuMoveAttribute()
     47    public TranslocationMoveAttribute()
    4848      : this(-1, -1, -1, -1, -1, -1) { }
    4949
    50     public ThreeOptTabuMoveAttribute(int edge1Source, int edge1Target, int edge2Source, int edge2Target, int edge3Source, int edge3Target)
     50    public TranslocationMoveAttribute(int edge1Source, int edge1Target, int edge2Source, int edge2Target, int edge3Source, int edge3Target)
    5151      : base() {
    5252      Edge1Source = edge1Source;
     
    5959
    6060    public override IDeepCloneable Clone(Cloner cloner) {
    61       ThreeOptTabuMoveAttribute clone = (ThreeOptTabuMoveAttribute)base.Clone(cloner);
     61      TranslocationMoveAttribute clone = (TranslocationMoveAttribute)base.Clone(cloner);
    6262      clone.Edge1Source = Edge1Source;
    6363      clone.Edge1Target = Edge1Target;
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveGenerator.cs

    r3231 r3232  
    2828
    2929namespace HeuristicLab.Encodings.PermutationEncoding {
    30   [Item("ThreeOptMoveGenerator", "Base class for move generators that produce 3-opt moves.")]
     30  [Item("TranslocationMoveGenerator", "Base class for move generators that produce translocation moves (3-opt).")]
    3131  [StorableClass]
    32   public abstract class ThreeOptMoveGenerator : SingleSuccessorOperator, IThreeOptPermutationMoveOperator, IMoveGenerator {
     32  public abstract class TranslocationMoveGenerator : SingleSuccessorOperator, IPermutationTranslocationMoveOperator, IMoveGenerator {
    3333    public override bool CanChangeName {
    3434      get { return false; }
     
    3737      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    3838    }
    39     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    40       get { return (LookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     39    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     40      get { return (LookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    4141    }
    4242    protected ScopeParameter CurrentScopeParameter {
     
    4444    }
    4545
    46     public ThreeOptMoveGenerator()
     46    public TranslocationMoveGenerator()
    4747      : base() {
    4848      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation for which moves should be generated."));
    49       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The moves that should be generated in subscopes."));
     49      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The moves that should be generated in subscopes."));
    5050      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    5151    }
     
    5353    public override IOperation Apply() {
    5454      Permutation p = PermutationParameter.ActualValue;
    55       ThreeOptMove[] moves = GenerateMoves(p);
     55      TranslocationMove[] moves = GenerateMoves(p);
    5656      Scope[] moveScopes = new Scope[moves.Length];
    5757      for (int i = 0; i < moveScopes.Length; i++) {
    5858        moveScopes[i] = new Scope(i.ToString());
    59         moveScopes[i].Variables.Add(new Variable(ThreeOptMoveParameter.ActualName, moves[i]));
     59        moveScopes[i].Variables.Add(new Variable(TranslocationMoveParameter.ActualName, moves[i]));
    6060      }
    6161      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
     
    6363    }
    6464
    65     protected abstract ThreeOptMove[] GenerateMoves(Permutation permutation);
     65    protected abstract TranslocationMove[] GenerateMoves(Permutation permutation);
    6666  }
    6767}
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveMaker.cs

    r3231 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("ThreeOptMoveMaker", "Peforms a 3-opt move on a given permutation and updates the quality.")]
     31  [Item("TranslocationMoveMaker", "Peforms a translocation or insertion move (3-opt) on a given permutation and updates the quality.")]
    3232  [StorableClass]
    33   public class ThreeOptMoveMaker : SingleSuccessorOperator, IThreeOptPermutationMoveOperator, IMoveMaker {
     33  public class TranslocationMoveMaker : SingleSuccessorOperator, IPermutationTranslocationMoveOperator, IMoveMaker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
     
    4141      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
    4242    }
    43     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    44       get { return (ILookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     43    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     44      get { return (ILookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    4545    }
    4646    public ILookupParameter<Permutation> PermutationParameter {
     
    4848    }
    4949
    50     public ThreeOptMoveMaker()
     50    public TranslocationMoveMaker()
    5151      : base() {
    5252      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
    53       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The move to evaluate."));
     53      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
    5454      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
    5555      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    5757
    5858    public override IOperation Apply() {
    59       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     59      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    6060      Permutation permutation = PermutationParameter.ActualValue;
    6161      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveTabuMaker.cs

    r3231 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("ThreeOptTabuMoveMaker", "Declares a given 3-opt move as tabu, by adding its attributes to the tabu list. It also removes the oldest entry in the tabu list when its size is greater than tenure.")]
     31  [Item("TranslocationMoveTabuMaker", "Declares a given translocation or insertion move (3-opt) as tabu, by adding its attributes to the tabu list.")]
    3232  [StorableClass]
    33   public class ThreeOptTabuMoveMaker : TabuMoveMaker, IThreeOptPermutationMoveOperator {
     33  public class TranslocationMoveTabuMaker : TabuMaker, IPermutationTranslocationMoveOperator {
    3434    public override bool CanChangeName {
    3535      get { return false; }
     
    3838      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    3939    }
    40     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    41       get { return (LookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     40    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     41      get { return (LookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    4242    }
    4343
    44     public ThreeOptTabuMoveMaker()
     44    public TranslocationMoveTabuMaker()
    4545      : base() {
    46       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The move that was made."));
     46      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move that was made."));
    4747      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
    4848    }
    4949
    5050    protected override IItem GetTabuAttribute() {
    51       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     51      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    5252      Permutation permutation = PermutationParameter.ActualValue;
    5353      if (move.Index3 > move.Index1)
    54         return new ThreeOptTabuMoveAttribute(permutation.GetCircular(move.Index1 - 1),
     54        return new TranslocationMoveAttribute(permutation.GetCircular(move.Index1 - 1),
    5555        permutation[move.Index1],
    5656        permutation[move.Index2],
     
    5959        permutation.GetCircular(move.Index3 + move.Index2 - move.Index1 + 1));
    6060      else
    61         return new ThreeOptTabuMoveAttribute(permutation.GetCircular(move.Index1 - 1),
     61        return new TranslocationMoveAttribute(permutation.GetCircular(move.Index1 - 1),
    6262        permutation[move.Index1],
    6363        permutation[move.Index2],
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs

    r3229 r3232  
    2626
    2727namespace HeuristicLab.Encodings.PermutationEncoding {
    28   [Item("ExhaustiveTwoOptMoveGenerator", "Generates all possible 2-opt moves (inversion) from a given permutation.")]
     28  [Item("ExhaustiveInversionMoveGenerator", "Generates all possible inversion moves (2-opt) from a given permutation.")]
    2929  [StorableClass]
    30   public class ExhaustiveTwoOptMoveGenerator : TwoOptMoveGenerator, IExhaustiveMoveGenerator {
    31     public static TwoOptMove[] Apply(Permutation permutation) {
     30  public class ExhaustiveInversionMoveGenerator : InversionMoveGenerator, IExhaustiveMoveGenerator {
     31    public static InversionMove[] Apply(Permutation permutation) {
    3232      int length = permutation.Length;
    3333      int totalMoves = (length) * (length - 1) / 2; // - 3;
    34       TwoOptMove[] moves = new TwoOptMove[totalMoves];
     34      InversionMove[] moves = new InversionMove[totalMoves];
    3535      int count = 0;
    3636      for (int i = 0; i < length - 1; i++)
     
    3939          /*if (i == 0 && j >= length - 2) continue;
    4040          else if (i == 1 && j >= length - 1) continue;*/
    41           moves[count++] = new TwoOptMove(i, j);
     41          moves[count++] = new InversionMove(i, j);
    4242        }
    4343      return moves;
    4444    }
    4545
    46     protected override TwoOptMove[] GenerateMoves(Permutation permutation) {
     46    protected override InversionMove[] GenerateMoves(Permutation permutation) {
    4747      return Apply(permutation);
    4848    }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMove.cs

    r3229 r3232  
    2424
    2525namespace HeuristicLab.Encodings.PermutationEncoding {
    26   [Item("TwoOptMove", "Item that describes a 2-Opt move.")]
     26  [Item("InversionMove", "Item that describes an inversion move (2-opt).")]
    2727  [StorableClass]
    28   public class TwoOptMove : TwoIndexMove {
    29     public TwoOptMove()
     28  public class InversionMove : TwoIndexMove {
     29    public InversionMove()
    3030      : base() {
    3131    }
    3232
    33     public TwoOptMove(int index1, int index2)
     33    public InversionMove(int index1, int index2)
    3434      : base(index1, index2, null) {
    3535    }
    3636
    37     public TwoOptMove(int index1, int index2, Permutation permutation)
     37    public InversionMove(int index1, int index2, Permutation permutation)
    3838      : base(index1, index2, permutation) {
    3939    }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveAttribute.cs

    r3229 r3232  
    2424
    2525namespace HeuristicLab.Encodings.PermutationEncoding {
    26   [Item("TwoOptTabuMoveAttribute", "Specifies the tabu attributes for a 2-opt move.")]
     26  [Item("InversionMoveAttribute", "Specifies the tabu attributes for an inversion move (2-opt).")]
    2727  [StorableClass]
    28   public class TwoOptTabuMoveAttribute : Item {
     28  public class InversionMoveAttribute : Item {
    2929    [Storable]
    3030    public int Edge1Source { get; private set; }
     
    3737
    3838    [StorableConstructor]
    39     private TwoOptTabuMoveAttribute(bool deserializing)
     39    private InversionMoveAttribute(bool deserializing)
    4040      : base() {
    4141    }
    4242
    43     public TwoOptTabuMoveAttribute()
     43    public InversionMoveAttribute()
    4444      : this(-1, -1, -1, -1) { }
    4545
    46     public TwoOptTabuMoveAttribute(int edge1Source, int edge1Target, int edge2Source, int edge2Target)
     46    public InversionMoveAttribute(int edge1Source, int edge1Target, int edge2Source, int edge2Target)
    4747      : base() {
    4848      Edge1Source = edge1Source;
     
    5353
    5454    public override IDeepCloneable Clone(Cloner cloner) {
    55       TwoOptTabuMoveAttribute clone = (TwoOptTabuMoveAttribute)base.Clone(cloner);
     55      InversionMoveAttribute clone = (InversionMoveAttribute)base.Clone(cloner);
    5656      clone.Edge1Source = Edge1Source;
    5757      clone.Edge1Target = Edge1Target;
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveGenerator.cs

    r3229 r3232  
    2828
    2929namespace HeuristicLab.Encodings.PermutationEncoding {
    30   [Item("TwoOptMoveGenerator", "Base class for all 2-opt move generators.")]
     30  [Item("InversionMoveGenerator", "Base class for all inversion (2-opt) move generators.")]
    3131  [StorableClass]
    32   public abstract class TwoOptMoveGenerator : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, IMoveGenerator {
     32  public abstract class InversionMoveGenerator : SingleSuccessorOperator, IPermutationInversionMoveOperator, IMoveGenerator {
    3333    public override bool CanChangeName {
    3434      get { return false; }
     
    3737      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    3838    }
    39     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    40       get { return (LookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     39    public ILookupParameter<InversionMove> InversionMoveParameter {
     40      get { return (LookupParameter<InversionMove>)Parameters["InversionMove"]; }
    4141    }
    4242    protected ScopeParameter CurrentScopeParameter {
     
    4444    }
    4545
    46     public TwoOptMoveGenerator()
     46    public InversionMoveGenerator()
    4747      : base() {
    4848      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation for which moves should be generated."));
    49       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The moves that should be generated in subscopes."));
     49      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The moves that should be generated in subscopes."));
    5050      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    5151    }
     
    5353    public override IOperation Apply() {
    5454      Permutation p = PermutationParameter.ActualValue;
    55       TwoOptMove[] moves = GenerateMoves(p);
     55      InversionMove[] moves = GenerateMoves(p);
    5656      Scope[] moveScopes = new Scope[moves.Length];
    5757      for (int i = 0; i < moveScopes.Length; i++) {
    5858        moveScopes[i] = new Scope(i.ToString());
    59         moveScopes[i].Variables.Add(new Variable(TwoOptMoveParameter.ActualName, moves[i]));
     59        moveScopes[i].Variables.Add(new Variable(InversionMoveParameter.ActualName, moves[i]));
    6060      }
    6161      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
     
    6363    }
    6464
    65     protected abstract TwoOptMove[] GenerateMoves(Permutation permutation);
     65    protected abstract InversionMove[] GenerateMoves(Permutation permutation);
    6666  }
    6767}
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveMaker.cs

    r3229 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("TwoOptMoveMaker", "Peforms a 2-opt move on a given permutation and updates the quality.")]
     31  [Item("InversionMoveMaker", "Peforms an inversion move (2-opt) on a given permutation and updates the quality.")]
    3232  [StorableClass]
    33   public class TwoOptMoveMaker : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, IMoveMaker {
     33  public class InversionMoveMaker : SingleSuccessorOperator, IPermutationInversionMoveOperator, IMoveMaker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
     
    4141      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
    4242    }
    43     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    44       get { return (ILookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     43    public ILookupParameter<InversionMove> InversionMoveParameter {
     44      get { return (ILookupParameter<InversionMove>)Parameters["InversionMove"]; }
    4545    }
    4646    public ILookupParameter<Permutation> PermutationParameter {
     
    4848    }
    4949
    50     public TwoOptMoveMaker()
     50    public InversionMoveMaker()
    5151      : base() {
    5252      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
    53       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move to evaluate."));
     53      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move to evaluate."));
    5454      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
    5555      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    5757
    5858    public override IOperation Apply() {
    59       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     59      InversionMove move = InversionMoveParameter.ActualValue;
    6060      Permutation permutation = PermutationParameter.ActualValue;
    6161      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveTabuMaker.cs

    r3229 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("TwoOptTabuMoveMaker", "Declares a given 2-opt move as tabu, by adding its attributes to the tabu list. It also removes the oldest entry in the tabu list when its size is greater than tenure.")]
     31  [Item("InversionMoveTabuMaker", "Declares a given inversion move (2-opt) as tabu, by adding its attributes to the tabu list.")]
    3232  [StorableClass]
    33   public class TwoOptTabuMoveMaker : TabuMoveMaker, ITwoOptPermutationMoveOperator {
     33  public class InversionMoveTabuMaker : TabuMaker, IPermutationInversionMoveOperator {
    3434    public override bool CanChangeName {
    3535      get { return false; }
     
    3838      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    3939    }
    40     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    41       get { return (LookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     40    public ILookupParameter<InversionMove> InversionMoveParameter {
     41      get { return (LookupParameter<InversionMove>)Parameters["InversionMove"]; }
    4242    }
    4343
    44     public TwoOptTabuMoveMaker()
     44    public InversionMoveTabuMaker()
    4545      : base() {
    46       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move that was made."));
     46      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move that was made."));
    4747      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
    4848    }
    4949
    5050    protected override IItem GetTabuAttribute() {
    51       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     51      InversionMove move = InversionMoveParameter.ActualValue;
    5252      Permutation permutation = PermutationParameter.ActualValue;
    53       return new TwoOptTabuMoveAttribute( permutation.GetCircular(move.Index1 - 1),
     53      return new InversionMoveAttribute( permutation.GetCircular(move.Index1 - 1),
    5454        permutation[move.Index1],
    5555        permutation[move.Index2],
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/PreventReaddAndRemovalInversionMoveTabuChecker.cs

    r3229 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("TwoOptPreventEdgeRemovalAndReadding", "Prevents readding of previously deleted edges as well as deleting previously added edges.")]
     31  [Item("PreventReaddAndRemovalInversionMoveTabuChecker", "Prevents readding of previously deleted edges as well as deleting previously added edges.")]
    3232  [StorableClass]
    33   public class PreventReaddDeleteTwoOptTabuMoveEvaluator : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, ITabuMoveEvaluator {
     33  public class PreventReaddAndRemovalInversionMoveTabuChecker : SingleSuccessorOperator, IPermutationInversionMoveOperator, ITabuChecker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
    3636    }
    37     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    38       get { return (LookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     37    public ILookupParameter<InversionMove> InversionMoveParameter {
     38      get { return (LookupParameter<InversionMove>)Parameters["InversionMove"]; }
    3939    }
    4040    public ILookupParameter<Permutation> PermutationParameter {
     
    5151    }
    5252
    53     public PreventReaddDeleteTwoOptTabuMoveEvaluator()
     53    public PreventReaddAndRemovalInversionMoveTabuChecker()
    5454      : base() {
    55       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move to evaluate."));
     55      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move to evaluate."));
    5656      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
    5757      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    6262    public override IOperation Apply() {
    6363      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
    64       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     64      InversionMove move = InversionMoveParameter.ActualValue;
    6565      Permutation permutation = PermutationParameter.ActualValue;
    6666      int length = permutation.Length;
     
    7272      if (!isTabu) {
    7373        foreach (IItem tabuMove in tabuList) {
    74           TwoOptTabuMoveAttribute attribute = (tabuMove as TwoOptTabuMoveAttribute);
     74          InversionMoveAttribute attribute = (tabuMove as InversionMoveAttribute);
    7575          if (attribute != null) {
    7676            // if previously deleted Edge1Source-Target is readded
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/PreventReaddInversionMoveTabuChecker.cs

    r3229 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("TwoOptPreventEdgeReadding", "Prevents readding of previously deleted edges, but allows deleting previously added edges.")]
     31  [Item("PreventReaddInversionMoveTabuChecker", "Prevents readding of previously deleted edges, but allows deleting previously added edges.")]
    3232  [StorableClass]
    33   public class PreventReaddTwoOptTabuMoveEvaluator : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, ITabuMoveEvaluator {
     33  public class PreventReaddInversionMoveTabuChecker : SingleSuccessorOperator, IPermutationInversionMoveOperator, ITabuChecker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
    3636    }
    37     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    38       get { return (LookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     37    public ILookupParameter<InversionMove> InversionMoveParameter {
     38      get { return (LookupParameter<InversionMove>)Parameters["InversionMove"]; }
    3939    }
    4040    public ILookupParameter<Permutation> PermutationParameter {
     
    5151    }
    5252
    53     public PreventReaddTwoOptTabuMoveEvaluator()
     53    public PreventReaddInversionMoveTabuChecker()
    5454      : base() {
    55       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move to evaluate."));
     55      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move to evaluate."));
    5656      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
    5757      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    6262    public override IOperation Apply() {
    6363      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
    64       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     64      InversionMove move = InversionMoveParameter.ActualValue;
    6565      Permutation permutation = PermutationParameter.ActualValue;
    6666      int length = permutation.Length;
     
    7272      if (!isTabu) {
    7373        foreach (IItem tabuMove in tabuList) {
    74           TwoOptTabuMoveAttribute attribute = (tabuMove as TwoOptTabuMoveAttribute);
     74          InversionMoveAttribute attribute = (tabuMove as InversionMoveAttribute);
    7575          if (attribute != null) {
    7676            // if previously deleted Edge1Source-Target is readded
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/PreventRemovalInversionMoveTabuChecker.cs

    r3229 r3232  
    2929
    3030namespace HeuristicLab.Encodings.PermutationEncoding {
    31   [Item("TwoOptPreventEdgeRemoval", "Prevents deleting of previously added edges.")]
     31  [Item("PreventRemovalInversionMoveTabuChecker", "Prevents deleting of previously added edges.")]
    3232  [StorableClass]
    33   public class PreventDeleteTwoOptTabuMoveEvaluator : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, ITabuMoveEvaluator {
     33  public class PreventRemovalInversionMoveTabuChecker : SingleSuccessorOperator, IPermutationInversionMoveOperator, ITabuChecker {
    3434    public override bool CanChangeName {
    3535      get { return false; }
    3636    }
    37     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    38       get { return (LookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     37    public ILookupParameter<InversionMove> InversionMoveParameter {
     38      get { return (LookupParameter<InversionMove>)Parameters["InversionMove"]; }
    3939    }
    4040    public ILookupParameter<Permutation> PermutationParameter {
     
    5151    }
    5252
    53     public PreventDeleteTwoOptTabuMoveEvaluator()
     53    public PreventRemovalInversionMoveTabuChecker()
    5454      : base() {
    55       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move to evaluate."));
     55      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move to evaluate."));
    5656      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
    5757      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
     
    6262    public override IOperation Apply() {
    6363      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
    64       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     64      InversionMove move = InversionMoveParameter.ActualValue;
    6565      Permutation permutation = PermutationParameter.ActualValue;
    6666      int length = permutation.Length;
     
    7272      if (!isTabu) {
    7373        foreach (IItem tabuMove in tabuList) {
    74           TwoOptTabuMoveAttribute attribute = (tabuMove as TwoOptTabuMoveAttribute);
     74          InversionMoveAttribute attribute = (tabuMove as InversionMoveAttribute);
    7575          if (attribute != null) {
    7676            // if previously added Edge1Source-Edge2Source is deleted
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionMultiMoveGenerator.cs

    r3229 r3232  
    2828
    2929namespace HeuristicLab.Encodings.PermutationEncoding {
    30   [Item("StochasticTwoOptMultiMoveGenerator", "Randomly samples n from all possible 2-opt moves (inversion) from a given permutation.")]
     30  [Item("StochasticInversionMultiMoveGenerator", "Randomly samples n from all possible inversion moves (2-opt) from a given permutation.")]
    3131  [StorableClass]
    32   public class StochasticTwoOptMultiMoveGenerator : TwoOptMoveGenerator, IMultiMoveGenerator, IStochasticOperator {
     32  public class StochasticInversionMultiMoveGenerator : InversionMoveGenerator, IMultiMoveGenerator, IStochasticOperator {
    3333    public ILookupParameter<IRandom> RandomParameter {
    3434      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    4343    }
    4444
    45     public StochasticTwoOptMultiMoveGenerator()
     45    public StochasticInversionMultiMoveGenerator()
    4646      : base() {
    4747      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     
    4949    }
    5050
    51     public static TwoOptMove[] Apply(Permutation permutation, IRandom random, int sampleSize) {
     51    public static InversionMove[] Apply(Permutation permutation, IRandom random, int sampleSize) {
    5252      int length = permutation.Length;
    53       TwoOptMove[] moves = new TwoOptMove[sampleSize];
     53      InversionMove[] moves = new InversionMove[sampleSize];
    5454      for (int i = 0; i < sampleSize; i++) {
    55         moves[i] = StochasticTwoOptSingleMoveGenerator.Apply(permutation, random);
     55        moves[i] = StochasticInversionSingleMoveGenerator.Apply(permutation, random);
    5656      }
    5757      return moves;
    5858    }
    5959
    60     protected override TwoOptMove[] GenerateMoves(Permutation permutation) {
     60    protected override InversionMove[] GenerateMoves(Permutation permutation) {
    6161      IRandom random = RandomParameter.ActualValue;
    6262      return Apply(permutation, random, SampleSizeParameter.ActualValue.Value);
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionSingleMoveGenerator.cs

    r3229 r3232  
    2828
    2929namespace HeuristicLab.Encodings.PermutationEncoding {
    30   [Item("StochasticTwoOptSingleMoveGenerator", "Randomly samples a single from all possible 2-opt moves (inversion) from a given permutation.")]
     30  [Item("StochasticInversionSingleMoveGenerator", "Randomly samples a single from all possible inversion moves (2-opt) from a given permutation.")]
    3131  [StorableClass]
    32   public class StochasticTwoOptSingleMoveGenerator : TwoOptMoveGenerator, IStochasticOperator, ISingleMoveGenerator {
     32  public class StochasticInversionSingleMoveGenerator : InversionMoveGenerator, IStochasticOperator, ISingleMoveGenerator {
    3333    public ILookupParameter<IRandom> RandomParameter {
    3434      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    3535    }
    3636
    37     public StochasticTwoOptSingleMoveGenerator()
     37    public StochasticInversionSingleMoveGenerator()
    3838      : base() {
    3939      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    4040    }
    4141
    42     public static TwoOptMove Apply(Permutation permutation, IRandom random) {
     42    public static InversionMove Apply(Permutation permutation, IRandom random) {
    4343      int length = permutation.Length;
    4444      int index1 = random.Next(length - 1);
    4545      int index2 = random.Next(index1 + 1, length);
    46       return new TwoOptMove(index1, index2);;
     46      return new InversionMove(index1, index2);;
    4747    }
    4848
    49     protected override TwoOptMove[] GenerateMoves(Permutation permutation) {
     49    protected override InversionMove[] GenerateMoves(Permutation permutation) {
    5050      IRandom random = RandomParameter.ActualValue;
    51       return new TwoOptMove[] { Apply(permutation, random) };
     51      return new InversionMove[] { Apply(permutation, random) };
    5252    }
    5353  }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveTabuMoveEvaluator.cs

    r3192 r3232  
    3131  [Item("PreventFallBackToSkippedPositions", "Prevents falling back into ranges that have been moved over before.")]
    3232  [StorableClass]
    33   public class PreventFallBackToSkippedPositions : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, ITabuMoveEvaluator {
     33  public class PreventFallBackToSkippedPositions : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, ITabuChecker {
    3434    public ILookupParameter<AdditiveMove> AdditiveMoveParameter {
    3535      get { return (LookupParameter<AdditiveMove>)Parameters["AdditiveMove"]; }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveTabuMoveMaker.cs

    r3192 r3232  
    3131  [Item("AdditiveTabuMoveMaker", "Sets the move tabu.")]
    3232  [StorableClass]
    33   public class AdditiveTabuMoveMaker : TabuMoveMaker, IAdditiveRealVectorMoveOperator {
     33  public class AdditiveTabuMoveMaker : TabuMaker, IAdditiveRealVectorMoveOperator {
    3434    public ILookupParameter<AdditiveMove> AdditiveMoveParameter {
    3535      get { return (ILookupParameter<AdditiveMove>)Parameters["AdditiveMove"]; }
  • trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj

    r3226 r3232  
    115115    <Compile Include="Interfaces\ISolutionCreator.cs" />
    116116    <Compile Include="Interfaces\IStochasticOperator.cs" />
    117     <Compile Include="Interfaces\ITabuMoveEvaluator.cs" />
    118     <Compile Include="Interfaces\ITabuMoveMaker.cs" />
     117    <Compile Include="Interfaces\ITabuChecker.cs" />
     118    <Compile Include="Interfaces\ITabuMaker.cs" />
    119119    <Compile Include="Result.cs" />
    120     <Compile Include="TabuMoveMaker.cs" />
     120    <Compile Include="TabuMaker.cs" />
    121121    <Compile Include="UserDefinedAlgorithm.cs" />
    122122    <Compile Include="EngineAlgorithm.cs" />
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj

    r3209 r3232  
    8787    <Compile Include="Evaluators\TSPGeoPathEvaluator.cs" />
    8888    <Compile Include="HeuristicLabProblemsTravelingSalesmanPlugin.cs" />
    89     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptRoundedEuclideanPathMoveEvaluator.cs" />
    90     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptEuclideanPathMoveEvaluator.cs" />
    91     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptGeoPathMoveEvaluator.cs" />
    92     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptEuclideanPathMoveEvaluator.cs" />
    93     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptGeoPathMoveEvaluator.cs" />
    94     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptPathMoveEvaluator.cs" />
    95     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptRoundedEuclideanPathMoveEvaluator.cs" />
     89    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveEuclideanPathEvaluator.cs" />
     90    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveGeoPathEvaluator.cs" />
     91    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMovePathEvaluator.cs" />
     92    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs" />
     93    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMoveEuclideanPathEvaluator.cs" />
     94    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMoveGeoPathEvaluator.cs" />
     95    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMovePathEvaluator.cs" />
     96    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMoveRoundedEuclideanPathEvaluator.cs" />
    9697    <Compile Include="TravelingSalesmanProblem.cs" />
    9798    <Compile Include="TSPLIBTourParser.cs" />
     
    109110    <Compile Include="Interfaces\ITSPPathEvaluator.cs" />
    110111    <Compile Include="Interfaces\ITSPPathMoveEvaluator.cs" />
    111     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptPathMoveEvaluator.cs" />
    112112    <Compile Include="MoveEvaluators\TSPPathMoveEvaluator.cs" />
    113113    <Compile Include="MoveEvaluators\TSPMoveEvaluator.cs" />
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveEuclideanPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 3-opt moves.
     28  /// An operator to evaluate translocation or insertion moves (3-opt).
    2929  /// </summary>
    30   [Item("TSPThreeOptEuclideanPathMoveEvaluator", "Operator for evaluating a 3-opt move based on euclidean distances.")]
     30  [Item("TSPTranslocationMoveEuclideanPathEvaluator", "Operator for evaluating a translocation or insertion move (3-opt) based on euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPThreeOptEuclideanPathMoveEvaluator : TSPThreeOptPathMoveEvaluator {
     32  public class TSPTranslocationMoveEuclideanPathEvaluator : TSPTranslocationMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveGeoPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 3-opt moves.
     28  /// An operator to evaluate translocation or insertion moves (3-opt).
    2929  /// </summary>
    30   [Item("TSPThreeOptGeoPathMoveEvaluator", "Operator for evaluating a 3-opt move based on geo (world) distances.")]
     30  [Item("TSPTranslocationMoveGeoPathEvaluator", "Operator for evaluating a translocation or insertion move (3-opt) based on geo (world) distances.")]
    3131  [StorableClass]
    32   public class TSPThreeOptGeoPathMoveEvaluator : TSPThreeOptPathMoveEvaluator {
     32  public class TSPTranslocationMoveGeoPathEvaluator : TSPTranslocationMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPGeoPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs

    r3229 r3232  
    3030namespace HeuristicLab.Problems.TravelingSalesman {
    3131  /// <summary>
    32   /// An operator to evaluate 3-opt moves.
     32  /// An operator to evaluate a translocation or insertion move.
    3333  /// </summary>
    34   [Item("TSPThreeOptPathMoveEvaluator", "Evaluates a 3-opt move by summing up the length of all added edges and subtracting the length of all deleted edges.")]
     34  [Item("TSPTranslocationMovePathEvaluator", "Evaluates a translocation or insertion move (3-opt) by summing up the length of all added edges and subtracting the length of all deleted edges.")]
    3535  [StorableClass]
    36   public abstract class TSPThreeOptPathMoveEvaluator : TSPPathMoveEvaluator, IThreeOptPermutationMoveOperator {
    37     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    38       get { return (ILookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     36  public abstract class TSPTranslocationMovePathEvaluator : TSPPathMoveEvaluator, IPermutationTranslocationMoveOperator {
     37    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     38      get { return (ILookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    3939    }
    4040
    41     public TSPThreeOptPathMoveEvaluator()
     41    public TSPTranslocationMovePathEvaluator()
    4242      : base() {
    43       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The move to evaluate."));
     43      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
    4444    }
    4545
    4646    protected override double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates) {
    47       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     47      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    4848      int edge1source = permutation.GetCircular(move.Index1 - 1);
    4949      int edge1target = permutation[move.Index1];
     
    8181
    8282    protected override double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix) {
    83       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     83      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    8484      int edge1source = permutation.GetCircular(move.Index1 - 1);
    8585      int edge1target = permutation[move.Index1];
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 3-opt moves.
     28  /// An operator to evaluate translocation or insertion moves (3-opt).
    2929  /// </summary>
    30   [Item("TSPThreeOptRoundedEuclideanPathMoveEvaluator", "Operator for evaluating a 3-opt move based on rounded euclidean distances.")]
     30  [Item("TSPTranslocationMoveRoundedEuclideanPathEvaluator", "Operator for evaluating a translocation or insertion move (3-opt) based on rounded euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPThreeOptRoundedEuclideanPathMoveEvaluator : TSPThreeOptPathMoveEvaluator {
     32  public class TSPTranslocationMoveRoundedEuclideanPathEvaluator : TSPTranslocationMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPRoundedEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveEuclideanPathEvaluator.cs

    r3229 r3232  
    2828  /// An operator to evaluate 2-opt moves.
    2929  /// </summary>
    30   [Item("TSPTwoOptEuclideanPathMoveEvaluator", "Operator for evaluating a 2-opt move based on euclidean distances.")]
     30  [Item("TSPInversionMoveEuclideanPathEvaluator", "Operator for evaluating an inversion move (2-opt) based on euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPTwoOptEuclideanPathMoveEvaluator : TSPTwoOptPathMoveEvaluator {
     32  public class TSPInversionMoveEuclideanPathEvaluator : TSPInversionMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveGeoPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 2-opt moves.
     28  /// An operator to evaluate inversion moves (2-opt).
    2929  /// </summary>
    30   [Item("TSPTwoOptGeoPathMoveEvaluator", "Operator for evaluating a 2-opt move based on geo (world) distances.")]
     30  [Item("TSPInversionMoveGeoPathEvaluator", "Operator for evaluating an inversion move (2-opt) based on geo (world) distances.")]
    3131  [StorableClass]
    32   public class TSPTwoOptGeoPathMoveEvaluator : TSPTwoOptPathMoveEvaluator {
     32  public class TSPInversionMoveGeoPathEvaluator : TSPInversionMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPGeoPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs

    r3229 r3232  
    3030namespace HeuristicLab.Problems.TravelingSalesman {
    3131  /// <summary>
    32   /// An operator to evaluate 2-opt moves.
     32  /// An operator to evaluate inversion moves (2-opt).
    3333  /// </summary>
    34   [Item("TSPTwoOptPathMoveEvaluator", "Evaluates a 2-opt move by summing up the length of all added edges and subtracting the length of all deleted edges.")]
     34  [Item("TSPInversionMovePathEvaluator", "Evaluates an inversion move (2-opt) by summing up the length of all added edges and subtracting the length of all deleted edges.")]
    3535  [StorableClass]
    36   public abstract class TSPTwoOptPathMoveEvaluator : TSPPathMoveEvaluator, ITwoOptPermutationMoveOperator {
    37     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    38       get { return (ILookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     36  public abstract class TSPInversionMovePathEvaluator : TSPPathMoveEvaluator, IPermutationInversionMoveOperator {
     37    public ILookupParameter<InversionMove> InversionMoveParameter {
     38      get { return (ILookupParameter<InversionMove>)Parameters["InversionMove"]; }
    3939    }
    4040
    41     public TSPTwoOptPathMoveEvaluator()
     41    public TSPInversionMovePathEvaluator()
    4242      : base() {
    43       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move to evaluate."));
     43      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move to evaluate."));
    4444    }
    4545
    4646    protected override double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates) {
    47       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     47      InversionMove move = InversionMoveParameter.ActualValue;
    4848      int edge1source = permutation.GetCircular(move.Index1 - 1);
    4949      int edge1target = permutation[move.Index1];
     
    6666
    6767    protected override double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix) {
    68       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     68      InversionMove move = InversionMoveParameter.ActualValue;
    6969      int edge1source = permutation.GetCircular(move.Index1 - 1);
    7070      int edge1target = permutation[move.Index1];
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveRoundedEuclideanPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 2-opt moves.
     28  /// An operator to evaluate inversion moves (2-opt).
    2929  /// </summary>
    30   [Item("TSPTwoOptRoundedEuclideanPathMoveEvaluator", "Operator for evaluating a 2-opt move based on rounded euclidean distances.")]
     30  [Item("TSPInversionMoveRoundedEuclideanPathEvaluator", "Operator for evaluating an inversion move (2-opt) based on rounded euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPTwoOptRoundedEuclideanPathMoveEvaluator : TSPTwoOptPathMoveEvaluator {
     32  public class TSPInversionMoveRoundedEuclideanPathEvaluator : TSPInversionMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPRoundedEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r3231 r3232  
    265265      OnVisualizerChanged();
    266266    }
    267     private void MoveGenerator_TwoOptMoveParameter_ActualNameChanged(object sender, EventArgs e) {
    268       string name = ((ILookupParameter<TwoOptMove>)sender).ActualName;
    269       foreach (ITwoOptPermutationMoveOperator op in Operators.OfType<ITwoOptPermutationMoveOperator>()) {
    270         op.TwoOptMoveParameter.ActualName = name;
    271       }
    272     }
    273     private void MoveGenerator_ThreeOptMoveParameter_ActualNameChanged(object sender, EventArgs e) {
    274       string name = ((ILookupParameter<ThreeOptMove>)sender).ActualName;
    275       foreach (IThreeOptPermutationMoveOperator op in Operators.OfType<IThreeOptPermutationMoveOperator>()) {
    276         op.ThreeOptMoveParameter.ActualName = name;
     267    private void MoveGenerator_InversionMoveParameter_ActualNameChanged(object sender, EventArgs e) {
     268      string name = ((ILookupParameter<InversionMove>)sender).ActualName;
     269      foreach (IPermutationInversionMoveOperator op in Operators.OfType<IPermutationInversionMoveOperator>()) {
     270        op.InversionMoveParameter.ActualName = name;
     271      }
     272    }
     273    private void MoveGenerator_TranslocationMoveParameter_ActualNameChanged(object sender, EventArgs e) {
     274      string name = ((ILookupParameter<TranslocationMove>)sender).ActualName;
     275      foreach (IPermutationTranslocationMoveOperator op in Operators.OfType<IPermutationTranslocationMoveOperator>()) {
     276        op.TranslocationMoveParameter.ActualName = name;
    277277      }
    278278    }
     
    301301    }
    302302    private void InitializeMoveGenerators() {
    303       foreach (ITwoOptPermutationMoveOperator op in Operators.OfType<ITwoOptPermutationMoveOperator>()) {
     303      foreach (IPermutationInversionMoveOperator op in Operators.OfType<IPermutationInversionMoveOperator>()) {
    304304        if (op is IMoveGenerator) {
    305           op.TwoOptMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_TwoOptMoveParameter_ActualNameChanged);
     305          op.InversionMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_InversionMoveParameter_ActualNameChanged);
    306306        }
    307307      }
    308       foreach (IThreeOptPermutationMoveOperator op in Operators.OfType<IThreeOptPermutationMoveOperator>()) {
     308      foreach (IPermutationTranslocationMoveOperator op in Operators.OfType<IPermutationTranslocationMoveOperator>()) {
    309309        if (op is IMoveGenerator) {
    310           op.ThreeOptMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_ThreeOptMoveParameter_ActualNameChanged);
     310          op.TranslocationMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_TranslocationMoveParameter_ActualNameChanged);
    311311        }
    312312      }
Note: See TracChangeset for help on using the changeset viewer.