Changeset 3074 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding
- Timestamp:
- 03/16/10 21:29:10 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3
- Files:
-
- 9 added
- 3 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLab.Encodings.PermutationEncoding-3.3.csproj
r3053 r3074 98 98 <Compile Include="Interfaces\IPermutationMoveOperator.cs" /> 99 99 <Compile Include="Interfaces\IPermutationOperator.cs" /> 100 <Compile Include="Interfaces\IThreeOptPermutationMoveOperator.cs" /> 100 101 <Compile Include="Interfaces\ITwoOptPermutationMoveOperator.cs" /> 101 102 <Compile Include="Manipulators\InsertionManipulator.cs" /> … … 106 107 <Compile Include="Manipulators\TranslocationInversionManipulator.cs" /> 107 108 <Compile Include="Manipulators\TranslocationManipulator.cs" /> 109 <Compile Include="Moves\ThreeIndexMove.cs" /> 110 <Compile Include="Moves\ThreeOpt\StochasticThreeOptMoveGenerator.cs" /> 111 <Compile Include="Moves\ThreeOpt\ThreeOptMove.cs" /> 112 <Compile Include="Moves\ThreeOpt\ThreeOptMoveGenerator.cs" /> 108 113 <Compile Include="Moves\TwoOpt\ExhaustiveTwoOptMoveGenerator.cs"> 109 114 <SubType>Code</SubType> … … 120 125 <SubType>Code</SubType> 121 126 </Compile> 122 <Compile Include="Moves\TwoOpt\TwoOptMoveTabuAttribute.cs"> 123 <SubType>Code</SubType> 124 </Compile> 125 <Compile Include="Moves\TwoOpt\TwoOptMoveTabuEvaluator.cs"> 126 <SubType>Code</SubType> 127 </Compile> 128 <Compile Include="Moves\TwoOpt\TwoOptMoveTabuMaker.cs"> 129 <SubType>Code</SubType> 130 </Compile> 127 <Compile Include="Moves\TwoOpt\TwoOptTabuMoveAttribute.cs" /> 128 <Compile Include="Moves\TwoOpt\TwoOptTabuMoveEvaluator.cs" /> 129 <Compile Include="Moves\TwoOpt\TwoOptTabuMoveMaker.cs" /> 131 130 <Compile Include="PermutationManipulator.cs" /> 132 131 <Compile Include="PermutationCrossover.cs" /> -
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticTwoOptMoveGenerator.cs
r3053 r3074 38 38 } 39 39 40 public IntValue SampleSize { 41 get { return SampleSizeParameter.Value; } 42 set { SampleSizeParameter.Value = value; } 43 } 44 40 45 public StochasticTwoOptMoveGenerator() 41 46 : base() { … … 50 55 TwoOptMove[] moves = new TwoOptMove[sampleSize]; 51 56 for (int i = 0; i < sampleSize; i++) { 52 int index1 = random.Next(length - 1); 53 int index2 = random.Next(index1 + 1, length); 57 int index1 = random.Next(length - 1), index2; 58 if (index1 >= 2) 59 index2 = random.Next(index1 + 1, length); 60 else index2 = random.Next(index1 + 1, length - (2 - index1)); 54 61 moves[i] = new TwoOptMove(index1, index2); 55 62 } -
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveGenerator.cs
r3053 r3074 35 35 } 36 36 public ILookupParameter<TwoOptMove> TwoOptMoveParameter { 37 get { return (LookupParameter<TwoOptMove>)Parameters[" Move"]; }37 get { return (LookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; } 38 38 } 39 39 protected ScopeParameter CurrentScopeParameter { … … 44 44 : base() { 45 45 Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation for which moves should be generated.")); 46 Parameters.Add(new LookupParameter<TwoOptMove>(" Move", "The moves that should be generated in subscopes."));46 Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The moves that should be generated in subscopes.")); 47 47 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes.")); 48 48 } … … 61 61 62 62 protected abstract TwoOptMove[] GenerateMoves(Permutation permutation); 63 64 public override bool CanChangeName { 65 get { return false; } 66 } 63 67 } 64 68 } -
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveMaker.cs
r3053 r3074 33 33 public class TwoOptMoveMaker : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, IMoveMaker { 34 34 public ILookupParameter<DoubleValue> QualityParameter { 35 get { return ( LookupParameter<DoubleValue>)Parameters["Quality"]; }35 get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; } 36 36 } 37 37 public ILookupParameter<DoubleValue> MoveQualityParameter { 38 get { return ( LookupParameter<DoubleValue>)Parameters["MoveQuality"]; }38 get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; } 39 39 } 40 40 public ILookupParameter<TwoOptMove> TwoOptMoveParameter { 41 get { return ( LookupParameter<TwoOptMove>)Parameters["Move"]; }41 get { return (ILookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; } 42 42 } 43 43 public ILookupParameter<Permutation> PermutationParameter { … … 48 48 : base() { 49 49 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution.")); 50 Parameters.Add(new LookupParameter<TwoOptMove>(" Move", "The move to evaluate."));50 Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move to evaluate.")); 51 51 Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move.")); 52 52 Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation.")); … … 64 64 return base.Apply(); 65 65 } 66 67 public override bool CanChangeName { 68 get { return false; } 69 } 66 70 } 67 71 }
Note: See TracChangeset
for help on using the changeset viewer.