Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/05/10 18:13:06 (15 years ago)
Author:
svonolfe
Message:

Added anaylzers for the SingleObjectiveTestFunction problem (#999)

Location:
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/HeuristicLab.Problems.TestFunctions-3.3.csproj

    r3384 r3647  
    8484  </ItemGroup>
    8585  <ItemGroup>
     86    <Compile Include="Analyzers\BestSingleObjectiveTestFunctionSolutionAnalyzer.cs" />
     87    <Compile Include="Analyzers\MultiPopulationBestSingleObjectiveTestFunctionSolutionAnalyzer.cs" />
     88    <Compile Include="Analyzers\PopulationBestSingleObjectiveTestFunctionSolutionAnalyzer.cs" />
    8689    <Compile Include="Evaluators\AckleyEvaluator.cs" />
    8790    <Compile Include="Evaluators\BealeEvaluator.cs" />
     
    98101    <Compile Include="Evaluators\ZakharovEvaluator.cs" />
    99102    <Compile Include="HeuristicLabProblemsTestFunctionsPlugin.cs" />
     103    <Compile Include="Interfaces\IBestSingleObjectiveTestFunctionSolutionAnalyzer.cs" />
    100104    <Compile Include="Interfaces\IRastriginMoveEvaluator.cs" />
    101105    <Compile Include="Interfaces\ISingleObjectiveTestFunctionAdditiveMoveEvaluator.cs" />
     
    118122    <Compile Include="MoveEvaluators\AdditiveMoveEvaluator.cs" />
    119123    <Compile Include="MoveEvaluators\RealVectorAdditiveMoveWrapper.cs" />
     124    <Compile Include="SingleObjectiveTestFunctionSolution.cs" />
    120125    <Compile Include="SingleObjectiveTestFunctionProblem.cs" />
    121126    <None Include="HeuristicLab.snk" />
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r3616 r3647  
    3333using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3434using HeuristicLab.PluginInfrastructure;
     35using HeuristicLab.Problems.TestFunctions.Analyzers;
    3536
    3637namespace HeuristicLab.Problems.TestFunctions {
     
    121122      get { return operators; }
    122123    }
     124    private IEnumerable<IBestSingleObjectiveTestFunctionSolutionAnalyzer> BestSingleObjectiveTestFunctionSolutionAnalyzers {
     125      get { return operators.OfType<IBestSingleObjectiveTestFunctionSolutionAnalyzer>(); }
     126    }
    123127    #endregion
    124128
     
    147151      ParameterizeSolutionCreator();
    148152      ParameterizeEvaluator();
    149       ParameterizeVisualizer();
    150153
    151154      Initialize();
     
    186189    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
    187190      ParameterizeSolutionCreator();
     191      ParameterizeAnalyzers();
    188192      SolutionCreator_RealVectorParameter_ActualNameChanged(null, EventArgs.Empty);
    189193    }
     
    191195      ParameterizeEvaluator();
    192196      ParameterizeOperators();
    193       ParameterizeVisualizer();
     197      ParameterizeAnalyzers();
    194198    }
    195199    private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
    196200      ParameterizeEvaluator();
    197201      UpdateMoveEvaluators();
     202      ParameterizeAnalyzers();
    198203      Maximization.Value = Evaluator.Maximization;
    199204      BoundsParameter.Value = Evaluator.Bounds;
     
    272277      strategyVectorCreator.StrategyParameterParameter.ActualNameChanged += new EventHandler(strategyVectorCreator_StrategyParameterParameter_ActualNameChanged);
    273278    }
     279    private void ParameterizeAnalyzers() {
     280      foreach (IBestSingleObjectiveTestFunctionSolutionAnalyzer analyzer in BestSingleObjectiveTestFunctionSolutionAnalyzers) {
     281        analyzer.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     282        analyzer.ResultsParameter.ActualName = "Results";
     283      }
     284    }
    274285    private void InitializeOperators() {
    275286      operators = new List<IOperator>();
     287      operators.Add(new BestSingleObjectiveTestFunctionSolutionAnalyzer());
     288      operators.Add(new PopulationBestSingleObjectiveTestFunctionSolutionAnalyzer());
     289      operators.Add(new MultiPopulationBestSingleObjectiveTestFunctionSolutionAnalyzer());
     290      ParameterizeAnalyzers();
    276291      operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>().Cast<IOperator>());
    277292      operators.Add(strategyVectorCreator);
     
    320335      Evaluator.PointParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    321336    }
    322     private void ParameterizeVisualizer() {
    323       //if (Visualizer != null) {
    324       //  Visualizer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    325       //  Visualizer.PointParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    326       //}
    327     }
    328337    private void ParameterizeOperators() {
    329338      foreach (IRealVectorCrossover op in Operators.OfType<IRealVectorCrossover>()) {
Note: See TracChangeset for help on using the changeset viewer.