Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/02/12 18:59:15 (12 years ago)
Author:
jkarder
Message:

#1899: applied the changes suggested by ascheibe in comment:6:ticket:1899

Location:
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalyzer.cs

    r7259 r8720  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Analysis;
    2324using HeuristicLab.Common;
     
    2526using HeuristicLab.Encodings.PermutationEncoding;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.PluginInfrastructure;
    2729
    2830namespace HeuristicLab.Problems.TravelingSalesman {
     31  // BackwardsCompatibility3.3
     32  #region Backwards compatible code, remove with 3.4
    2933  /// <summary>
    3034  /// An operator for analyzing the diversity of solutions of Traveling Salesman Problems given in path representation.
    3135  /// </summary>
     36  [Obsolete]
     37  [NonDiscoverableType]
    3238  [Item("TSPPopulationDiversityAnalyzer", "An operator for analyzing the diversity of solutions of Traveling Salesman Problems given in path representation.")]
    3339  [StorableClass]
     
    7985    }
    8086  }
     87  #endregion
    8188}
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r8478 r8720  
    8282      get { return Operators.OfType<TSPAlleleFrequencyAnalyzer>().FirstOrDefault(); }
    8383    }
    84     private TSPPopulationDiversityAnalyzer TSPPopulationDiversityAnalyzer {
    85       get { return Operators.OfType<TSPPopulationDiversityAnalyzer>().FirstOrDefault(); }
    86     }
    8784    private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer {
    8885      get { return Operators.OfType<SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); }
     
    321318        TSPAlleleFrequencyAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    322319        TSPAlleleFrequencyAnalyzer.ResultsParameter.ActualName = "Results";
    323       }
    324 
    325       if (TSPPopulationDiversityAnalyzer != null) {
    326         TSPPopulationDiversityAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    327         TSPPopulationDiversityAnalyzer.SolutionParameter.ActualName = SolutionCreator.PermutationParameter.ActualName;
    328         TSPPopulationDiversityAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    329         TSPPopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results";
    330320      }
    331321
     
    448438        try {
    449439          EvaluateAndLoadTour(data.BestKnownTour);
    450         } catch (InvalidOperationException) {
     440        }
     441        catch (InvalidOperationException) {
    451442          if (data.BestKnownQuality.HasValue)
    452443            BestKnownQuality = new DoubleValue(data.BestKnownQuality.Value);
Note: See TracChangeset for help on using the changeset viewer.