Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/13 10:08:38 (11 years ago)
Author:
ascheibe
Message:

#1886 added configuration of frequency with which the ab measures are calculated

File:
1 edited

Legend:

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

    r9331 r9431  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2425using HeuristicLab.Optimization;
    2526using HeuristicLab.Optimization.Operators;
     
    5253      get { return (IValueParameter<SingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"]; }
    5354    }
     55    public ValueParameter<IntValue> UpdateIntervalParameter {
     56      get { return (ValueParameter<IntValue>)Parameters["UpdateInterval"]; }
     57    }
     58    public ILookupParameter<IntValue> GenerationsParameter {
     59      get { return (ILookupParameter<IntValue>)Parameters["Generations"]; }
     60    }
    5461
    5562    [StorableConstructor]
     
    6774      Parameters.Add(new LookupParameter<IEvaluator>("Evaluator", "The operator which is used to evaluate new solutions."));
    6875      Parameters.Add(new ValueParameter<SingleObjectiveSolutionSimilarityCalculator>("SimilarityCalculator"));
     76      Parameters.Add(new ValueParameter<IntValue>("UpdateInterval", "The interval in which the operator should be applied.", new IntValue(2)));
     77      Parameters.Add(new LookupParameter<IntValue>("Generations", "Nr of generations."));
    6978
    7079      SimilarityCalculatorParameter.ValueChanged += new System.EventHandler(SimilarityCalculatorParameter_ValueChanged);
     
    96105      Operators.Add(selPressureAnalyzer);
    97106    }
     107
     108    public override IOperation Apply() {
     109      if (GenerationsParameter.ActualValue.Value % UpdateIntervalParameter.Value.Value == 0) {
     110        return base.Apply();
     111      } else {
     112        return base.BaseApply();
     113      }
     114    }
    98115  }
    99116}
Note: See TracChangeset for help on using the changeset viewer.