Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9032


Ignore:
Timestamp:
12/12/12 10:07:34 (12 years ago)
Author:
ascheibe
Message:

#1886 added a crossover analyzer for the QAP

Location:
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/AfterCrossoverCombinedOperator.cs

    r8711 r9032  
    3131  [StorableClass]
    3232  public class AfterCrossoverCombinedOperator : CombinedOperator {
     33    [Storable]
     34    protected CrossoverPerformanceAnalyzer cxAnalyzer;
     35
     36    [Storable]
     37    protected VariableDuplicator varDuplicator;
     38
    3339    public ILookupParameter<IEvaluator> EvaluatorParameter {
    3440      get { return ((LookupParameter<IEvaluator>)Parameters["Evaluator"]); }
     
    4248    protected AfterCrossoverCombinedOperator(AfterCrossoverCombinedOperator original, Cloner cloner)
    4349      : base(original, cloner) {
     50      cxAnalyzer = (CrossoverPerformanceAnalyzer)original.cxAnalyzer.Clone(cloner);
     51      varDuplicator = (VariableDuplicator)original.cxAnalyzer.Clone(cloner);
    4452    }
    4553
     
    5260    }
    5361
    54     void SimilarityCalculatorParameter_ValueChanged(object sender, System.EventArgs e) {
     62    protected virtual void SimilarityCalculatorParameter_ValueChanged(object sender, System.EventArgs e) {
    5563      SimilarityCalculatorParameter.Value.QualityVariableName = "TSPTourLength";
    5664      SimilarityCalculatorParameter.Value.SolutionVariableName = "TSPTour";
     
    6270
    6371    public override void InitializeOperators() {
    64       var cxAnalyzer = new CrossoverPerformanceAnalyzer();
     72      cxAnalyzer = new CrossoverPerformanceAnalyzer();
    6573      cxAnalyzer.SimilarityCalculatorParameter.Value = SimilarityCalculatorParameter.Value;
    66       var varDuplicator = new VariableDuplicator();
     74      varDuplicator = new VariableDuplicator();
    6775
    6876      Operators.Add(EvaluatorParameter.ActualValue);
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj

    r9020 r9032  
    120120    <Compile Include="AfterCrossoverCombinedOperator.cs" />
    121121    <Compile Include="AfterMutationCombinedOperator.cs" />
     122    <Compile Include="QAPAfterCrossoverCombinedOperator.cs" />
    122123    <Compile Include="InitializableOperator.cs" />
    123124    <Compile Include="UnwantedMutationAnalyzer.cs" />
Note: See TracChangeset for help on using the changeset viewer.