Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/11/10 02:23:25 (14 years ago)
Author:
abeham
Message:

Updated tabu search and added an engine for the berlin52 TSP #840
Also added a BestQualityMemorizer operator in HeuristicLab.Analysis-3.3

Location:
trunk/sources/HeuristicLab.Encodings.Permutation/3.3
Files:
8 added
3 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.Permutation/3.3/HeuristicLab.Encodings.Permutation-3.3.csproj

    r2984 r2997  
    9696    <Compile Include="Interfaces\IPermutationCrossover.cs" />
    9797    <Compile Include="Interfaces\IPermutationManipulator.cs" />
     98    <Compile Include="Interfaces\IPermutationMoveGenerator.cs" />
    9899    <Compile Include="Interfaces\IPermutationOperator.cs" />
    99100    <Compile Include="Manipulators\InsertionManipulator.cs" />
     
    104105    <Compile Include="Manipulators\TranslocationInversionManipulator.cs" />
    105106    <Compile Include="Manipulators\TranslocationManipulator.cs" />
    106     <Compile Include="Moves\Permutation2IndexMove.cs" />
    107     <Compile Include="Moves\Permutation2OptExhaustiveMoveGenerator.cs" />
    108     <Compile Include="Moves\Permutation2OptMove.cs" />
     107    <Compile Include="Moves\ExhaustiveTwoOptMoveGenerator.cs">
     108      <SubType>Code</SubType>
     109    </Compile>
     110    <Compile Include="Moves\TwoIndexMove.cs">
     111      <SubType>Code</SubType>
     112    </Compile>
     113    <Compile Include="Moves\TwoOptMove.cs">
     114      <SubType>Code</SubType>
     115    </Compile>
     116    <Compile Include="Moves\TwoOptMoveMaker.cs">
     117      <SubType>Code</SubType>
     118    </Compile>
     119    <Compile Include="Moves\TwoOptMoveTabuAttribute.cs">
     120      <SubType>Code</SubType>
     121    </Compile>
     122    <Compile Include="Moves\TwoOptMoveTabuEvaluator.cs">
     123      <SubType>Code</SubType>
     124    </Compile>
     125    <Compile Include="Moves\TwoOptMoveTabuMaker.cs">
     126      <SubType>Code</SubType>
     127    </Compile>
    109128    <Compile Include="PermutationManipulator.cs" />
    110129    <Compile Include="PermutationCrossover.cs" />
  • trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/InversionManipulator.cs

    r2994 r2997  
    4747      } while (breakPoint2 == breakPoint1);
    4848      if (breakPoint2 < breakPoint1) { int h = breakPoint1; breakPoint1 = breakPoint2; breakPoint2 = h; }
     49      Apply(permutation, breakPoint1, breakPoint2);
     50    }
    4951
     52    public static void Apply(Permutation permutation, int breakPoint1, int breakPoint2) {
    5053      for (int i = 0; i <= (breakPoint2 - breakPoint1) / 2; i++) {  // invert permutation between breakpoints
    5154        int temp = permutation[breakPoint1 + i];
  • trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Permutation.cs

    r2994 r2997  
    8585    }
    8686
     87    public int GetCircular(int position) {
     88      if (position >= Length) position = position % Length;
     89      while (position < 0) position += Length;
     90      return this[position];
     91    }
     92
    8793    #region IStringConvertibleArrayData Members
    8894    int IStringConvertibleArrayData.Length {
Note: See TracChangeset for help on using the changeset viewer.