Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/24/12 15:04:37 (12 years ago)
Author:
jkarder
Message:

#1331:

  • applied some of the changes suggested by ascheibe in comment:32:ticket:1331
  • restructured path relinking and improvement operators and similarity calculators
  • fixed bug in TSPMultipleGuidesPathRelinker
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionPoolUpdateMethod.cs

    r8304 r8319  
    2828using HeuristicLab.Operators;
    2929using HeuristicLab.Optimization;
    30 using HeuristicLab.Optimization.Operators;
    3130using HeuristicLab.Parameters;
    3231using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3837  [Item("SolutionPoolUpdateMethod", "An operator that updates the solution pool.")]
    3938  [StorableClass]
    40   public sealed class SolutionPoolUpdateMethod : SingleSuccessorOperator, IScatterSearchOperator, ISimilarityBasedOperator {
     39  public sealed class SolutionPoolUpdateMethod : SingleSuccessorOperator, ISimilarityBasedOperator {
    4140    #region ISimilarityBasedOperator Members
    42     public ISimilarityCalculator SimilarityCalculator { get; set; }
     41    public ISolutionSimilarityCalculator SimilarityCalculator { get; set; }
    4342    #endregion
    4443
     
    130129      if (orderedOffspring.Any(hasBetterQuality)) {
    131130        // produce the set union
    132         var union = orderedParents.Union(orderedOffspring.Where(hasBetterQuality), new SolutionEqualityComparer<IScope>(SimilarityCalculator.CalculateIndividualSimilarity));
     131        var union = orderedParents.Union(orderedOffspring.Where(hasBetterQuality), new SolutionEqualityComparer<IScope>(SimilarityCalculator.CalculateSolutionSimilarity));
    133132        if (union.Count() > orderedParents.Count()) {
    134133          var orderedUnion = Maximization.Value ? union.OrderByDescending(x => x.Variables[QualityParameter.ActualName].Value) :
     
    142141    }
    143142
     143    // derive SingleObjectiveSolutionSimilarityCalculator from EqualityComparer
     144    // delete this ...
    144145    public class SolutionEqualityComparer<T> : EqualityComparer<T> {
    145146      private readonly Func<T, T, double> similarityCalculator;
Note: See TracChangeset for help on using the changeset viewer.