- Timestamp:
- 02/18/10 20:42:37 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Permutation/3.3/MaximalPreservativeCrossover.cs
r2823 r2829 29 29 /// Performs a crossover between two permuation arrays by preserving a large number of edges in both parents. 30 30 /// The operator also maintains the position in the arrays to some extent. 31 /// It is implemented as described in Mühlenbein, H. Evolution in time and space - the parallel genetic algorithm. FOUNDATIONS OF GENETIC ALGORITHMS, Morgan Kaufmann, 1991, 316-337. 31 /// It is implemented as described in Mühlenbein, H. 1991. Evolution in time and space - the parallel genetic algorithm. FOUNDATIONS OF GENETIC ALGORITHMS, pp. 316-337. Morgan Kaufmann. 32 /// 32 33 /// The length of the segment copied from the first parent to the offspring is uniformly distributed in the interval [3, N/3) with N = length of the permutation. 34 /// This recommendation is mentioned in Pohlheim, H. 1999. Evolutionäre Algorithmen: Verfahren, Operatoren und Hinweise für die Praxis, p. 44, Springer. 35 /// If the length of the permutation is smaller than 15, the size of the segment is always equal to 3. 33 36 /// </remarks> 34 [Item("MaximalPreservativeCrossover", "An operator which performs the maximal preservative crossover on two permutations .")]37 [Item("MaximalPreservativeCrossover", "An operator which performs the maximal preservative crossover on two permutations as described in Mühlenbein, H. 1991. Evolution in time and space - the parallel genetic algorithm. FOUNDATIONS OF GENETIC ALGORITHMS, pp. 316-337. Morgan Kaufmann.")] 35 38 [EmptyStorableClass] 36 39 [Creatable("Test")] … … 40 43 /// by preserving a large number of edges in both parents. 41 44 /// </summary> 42 /// <exception cref="InvalidOperationException">Thrown if the numbers in the permutation array are not in the range [0,N) with N = length of the permutation.</exception>43 45 /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length or when the permutations are shorter than 4 elements.</exception> 46 /// <exception cref="InvalidOperationException">Thrown if the numbers in the permutation elements are not in the range [0,N) with N = length of the permutation.</exception> 44 47 /// <remarks> 45 48 /// First one segment is copied from the first parent to the offspring in the same position. … … 60 63 int breakPoint1, breakPoint2, subsegmentLength, index; 61 64 62 subsegmentLength = random.Next(3, Math.Max(length / 3, 4)); // as mentioned in "Pohlheim, H. Evolutionäre Algorithmen: Verfahren, Operatoren und Hinweise für die Praxis, 1999, p.44, Springer.65 subsegmentLength = random.Next(3, Math.Max(length / 3, 4)); // as mentioned in Pohlheim, H. Evolutionäre Algorithmen: Verfahren, Operatoren und Hinweise für die Praxis, 1999, p.44, Springer. 63 66 breakPoint1 = random.Next(length); 64 67 breakPoint2 = breakPoint1 + subsegmentLength; … … 126 129 127 130 /// <summary> 128 /// Checks number of parents and calls <see cref="Apply "/>.131 /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>. 129 132 /// </summary> 130 133 /// <exception cref="InvalidOperationException">Thrown if there are not exactly two permutations in <paramref name="parents"/>.</exception>
Note: See TracChangeset
for help on using the changeset viewer.