Changeset 12352
- Timestamp:
- 04/28/15 17:14:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VOSGA/HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm/OffspringSelectors/PopDivOffspringSelector.cs
r12351 r12352 224 224 if (takeWorseOffspring) { 225 225 IScope currentOffspring = offspring.SubScopes[i]; 226 offspring.SubScopes.Remove(currentOffspring); 227 i--; 228 population.Add(currentOffspring); 229 worseOffspringNeeded--; 226 Scope tmpScope = new Scope(); 227 tmpScope.SubScopes.AddRange(population); 228 Scope tmpCurrentScope = new Scope(); 229 tmpCurrentScope.SubScopes.Add(currentOffspring); 230 double curDiv = SimilarityCalculatorParameter.ActualValue.CalculateSolutionCrowdSimilarity(tmpCurrentScope, tmpScope)[0].Average(); 231 if (curDiv < avgPopDiv) { 232 offspring.SubScopes.Remove(currentOffspring); 233 i--; 234 population.Add(currentOffspring); 235 worseOffspringNeeded--; 236 } 230 237 } else if (tmp.Value) { 231 238 IScope currentOffspring = offspring.SubScopes[i];
Note: See TracChangeset
for help on using the changeset viewer.