Changeset 3647


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

Added anaylzers for the SingleObjectiveTestFunction problem (#999)

Location:
trunk/sources
Files:
9 added
4 edited

Legend:

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

    r3437 r3647  
    8686  <ItemGroup>
    8787    <Compile Include="HeuristicLabProblemsTestFunctionsViewsPlugin.cs" />
     88    <Compile Include="SingleObjectiveTestFunctionSolutionView.cs">
     89      <SubType>UserControl</SubType>
     90    </Compile>
     91    <Compile Include="SingleObjectiveTestFunctionSolutionView.Designer.cs">
     92      <DependentUpon>SingleObjectiveTestFunctionSolutionView.cs</DependentUpon>
     93    </Compile>
    8894    <None Include="HeuristicLab.snk" />
    8995    <None Include="HeuristicLabProblemsTestFunctionsViewsPlugin.cs.frame" />
     
    94100      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    95101      <Name>HeuristicLab.Collections-3.3</Name>
     102    </ProjectReference>
     103    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
     104      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
     105      <Name>HeuristicLab.Common-3.3</Name>
    96106    </ProjectReference>
    97107    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
     
    136146    </ProjectReference>
    137147  </ItemGroup>
     148  <ItemGroup>
     149    <EmbeddedResource Include="SingleObjectiveTestFunctionSolutionView.resx">
     150      <DependentUpon>SingleObjectiveTestFunctionSolutionView.cs</DependentUpon>
     151    </EmbeddedResource>
     152  </ItemGroup>
    138153  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    139154  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/HeuristicLabProblemsTestFunctionsViewsPlugin.cs.frame

    r3437 r3647  
    2929  [PluginFile("HeuristicLab.Problems.TestFunctions.Views-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Collections", "3.3")]
     31  [PluginDependency("HeuristicLab.Common", "3.3")]
    3132  [PluginDependency("HeuristicLab.Core", "3.3")]
    3233  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
  • 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.