Changeset 11593 for branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs
- Timestamp:
- 11/27/14 10:41:15 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs
r11588 r11593 95 95 public PermutationEncoding(string name, int length, PermutationTypes type) 96 96 : base(name) { 97 LengthParameter = new FixedValueParameter<IntValue>(Name + "Length", new IntValue(length)); 98 PermutationTypeParameter = new FixedValueParameter<PermutationType>(Name + "Type", new PermutationType(type)); 97 lengthParameter = new FixedValueParameter<IntValue>(Name + ".Length", new IntValue(length)); 98 permutationTypeParameter = new FixedValueParameter<PermutationType>(Name + ".Type", new PermutationType(type)); 99 Parameters.Add(lengthParameter); 100 Parameters.Add(permutationTypeParameter); 99 101 100 102 SolutionCreator = new RandomPermutationCreator(); … … 194 196 private void ConfigureInversionMoveOperators(IEnumerable<IPermutationInversionMoveOperator> inversionMoveOperators) { 195 197 foreach (var inversionMoveOperator in inversionMoveOperators) { 196 inversionMoveOperator.InversionMoveParameter.ActualName = Name + " _InversionMove";198 inversionMoveOperator.InversionMoveParameter.ActualName = Name + ".InversionMove"; 197 199 } 198 200 } 199 201 private void ConfigureScrambleMoveOperators(IEnumerable<IPermutationScrambleMoveOperator> scrambleMoveOperators) { 200 202 foreach (var scrambleMoveOperator in scrambleMoveOperators) { 201 scrambleMoveOperator.ScrambleMoveParameter.ActualName = Name + " _ScambleMove";203 scrambleMoveOperator.ScrambleMoveParameter.ActualName = Name + ".ScambleMove"; 202 204 } 203 205 } 204 206 private void ConfigureSwap2MoveOperators(IEnumerable<IPermutationSwap2MoveOperator> swap2MoveOperators) { 205 207 foreach (var swap2MoveOperator in swap2MoveOperators) { 206 swap2MoveOperator.Swap2MoveParameter.ActualName = Name + " _Swap2Move";208 swap2MoveOperator.Swap2MoveParameter.ActualName = Name + ".Swap2Move"; 207 209 } 208 210 } 209 211 private void ConfigureTranslocationMoveOperators(IEnumerable<IPermutationTranslocationMoveOperator> translocationMoveOperators) { 210 212 foreach (var translocationMoveOperator in translocationMoveOperators) { 211 translocationMoveOperator.TranslocationMoveParameter.ActualName = Name + " _TranslocationMove";213 translocationMoveOperator.TranslocationMoveParameter.ActualName = Name + ".TranslocationMove"; 212 214 } 213 215 }
Note: See TracChangeset
for help on using the changeset viewer.