Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/17/12 14:03:43 (12 years ago)
Author:
abeham
Message:

#1614

  • Fixed a parameter type in the GQAP
  • Fixed loading of ICTAP instances (only the upper triangular matrix is required for the distances)
  • Fixed a bug in the reducer that causes the loss of diversity
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPQualitySimilarityReducer.cs

    r7478 r7480  
    101101        if (!similarities.Any()) {
    102102          population.Add(candidate);
    103         } else if (population.Count < populationSize) {
    104           double maxSimilarity = similarities.Max();
    105           if (maxSimilarity < 1.0)
    106             population.Add(candidate);
     103          break;
     104        }
     105        if (similarities.Max() == 1.0) break;
     106        if (population.Count < populationSize) {
     107          population.Add(candidate);
    107108        } else {
    108109          var replacement = population.Select((v, i) => new { V = v, Index = i })
Note: See TracChangeset for help on using the changeset viewer.