Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4420


Ignore:
Timestamp:
09/16/10 23:39:51 (14 years ago)
Author:
swinkler
Message:

Implemented population diversity analyzer for TSP. (#1188)

Location:
branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj

    r4402 r4420  
    151151  <ItemGroup>
    152152    <Compile Include="Analyzers\BestTSPSolutionAnalyzer.cs" />
     153    <Compile Include="Analyzers\TSPPopulationDiversityAnalyzer.cs" />
    153154    <Compile Include="Evaluators\TSPEuclideanPathEvaluator.cs" />
    154155    <Compile Include="Evaluators\TSPGeoPathEvaluator.cs" />
  • branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r4118 r4420  
    126126      get { return operators.OfType<BestTSPSolutionAnalyzer>().FirstOrDefault(); }
    127127    }
     128    private TSPPopulationDiversityAnalyzer TSPPopulationDiversityAnalyzer {
     129      get { return operators.OfType<TSPPopulationDiversityAnalyzer>().FirstOrDefault(); }
     130    }
    128131    #endregion
    129132
     
    210213      ParameterizeSolutionCreator();
    211214      ParameterizeEvaluator();
    212       ParameterizeAnalyzer();
     215      ParameterizeAnalyzers();
    213216      ParameterizeOperators();
    214217      OnSolutionCreatorChanged();
     
    216219    private void SolutionCreator_PermutationParameter_ActualNameChanged(object sender, EventArgs e) {
    217220      ParameterizeEvaluator();
    218       ParameterizeAnalyzer();
     221      ParameterizeAnalyzers();
    219222      ParameterizeOperators();
    220223    }
     
    223226      ParameterizeEvaluator();
    224227      UpdateMoveEvaluators();
    225       ParameterizeAnalyzer();
     228      ParameterizeAnalyzers();
    226229      ClearDistanceMatrix();
    227230      OnEvaluatorChanged();
    228231    }
    229232    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
    230       ParameterizeAnalyzer();
     233      ParameterizeAnalyzers();
    231234    }
    232235    private void MoveGenerator_InversionMoveParameter_ActualNameChanged(object sender, EventArgs e) {
     
    267270      operators = new List<IOperator>();
    268271      operators.Add(new BestTSPSolutionAnalyzer());
    269       ParameterizeAnalyzer();
     272      operators.Add(new TSPPopulationDiversityAnalyzer());
     273      ParameterizeAnalyzers();
    270274      operators.AddRange(ApplicationManager.Manager.GetInstances<IPermutationOperator>().Cast<IOperator>());
    271275      ParameterizeOperators();
     
    308312      }
    309313    }
    310     private void ParameterizeAnalyzer() {
     314    private void ParameterizeAnalyzers() {
    311315      BestTSPSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    312316      BestTSPSolutionAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
     
    316320      BestTSPSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    317321      BestTSPSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
     322      TSPPopulationDiversityAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     323      TSPPopulationDiversityAnalyzer.PermutationParameter.ActualName = SolutionCreator.PermutationParameter.ActualName;
    318324    }
    319325    private void ParameterizeOperators() {
Note: See TracChangeset for help on using the changeset viewer.