Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/02/12 18:59:15 (12 years ago)
Author:
jkarder
Message:

#1899: applied the changes suggested by ascheibe in comment:6:ticket:1899

Location:
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3
Files:
3 edited

Legend:

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

    r8600 r8720  
    162162  </ItemGroup>
    163163  <ItemGroup>
     164    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
     165      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
     166      <Name>HeuristicLab.Analysis-3.3</Name>
     167    </ProjectReference>
    164168    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    165169      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
     
    249253  -->
    250254  <PropertyGroup>
    251    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     255    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    252256set ProjectDir=$(ProjectDir)
    253257set SolutionDir=$(SolutionDir)
     
    256260call PreBuildEvent.cmd
    257261</PreBuildEvent>
    258 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     262    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    259263export ProjectDir=$(ProjectDir)
    260264export SolutionDir=$(SolutionDir)
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Plugin.cs.frame

    r8334 r8720  
    2828  [Plugin("HeuristicLab.Problems.TestFunctions", "3.3.7.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.TestFunctions-3.3.dll", PluginFileType.Assembly)]
     30  [PluginDependency("HeuristicLab.Analysis", "3.3")]
    3031  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3132  [PluginDependency("HeuristicLab.Common", "3.3")]
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r8493 r8720  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    6970    private BestSingleObjectiveTestFunctionSolutionAnalyzer BestSingleObjectiveTestFunctionSolutionAnalyzer {
    7071      get { return Operators.OfType<BestSingleObjectiveTestFunctionSolutionAnalyzer>().FirstOrDefault(); }
     72    }
     73    private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer {
     74      get { return Operators.OfType<SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); }
    7175    }
    7276    #endregion
     
    249253    }
    250254    private void ParameterizeAnalyzers() {
    251       BestSingleObjectiveTestFunctionSolutionAnalyzer.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    252       BestSingleObjectiveTestFunctionSolutionAnalyzer.ResultsParameter.ActualName = "Results";
    253       BestSingleObjectiveTestFunctionSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    254       BestSingleObjectiveTestFunctionSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
    255       BestSingleObjectiveTestFunctionSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    256       BestSingleObjectiveTestFunctionSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    257       BestSingleObjectiveTestFunctionSolutionAnalyzer.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
    258       BestSingleObjectiveTestFunctionSolutionAnalyzer.BoundsParameter.ActualName = BoundsParameter.Name;
     255      if (BestSingleObjectiveTestFunctionSolutionAnalyzer != null) {
     256        BestSingleObjectiveTestFunctionSolutionAnalyzer.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     257        BestSingleObjectiveTestFunctionSolutionAnalyzer.ResultsParameter.ActualName = "Results";
     258        BestSingleObjectiveTestFunctionSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     259        BestSingleObjectiveTestFunctionSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
     260        BestSingleObjectiveTestFunctionSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
     261        BestSingleObjectiveTestFunctionSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
     262        BestSingleObjectiveTestFunctionSolutionAnalyzer.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
     263        BestSingleObjectiveTestFunctionSolutionAnalyzer.BoundsParameter.ActualName = BoundsParameter.Name;
     264      }
     265
     266      if (SingleObjectivePopulationDiversityAnalyzer != null) {
     267        SingleObjectivePopulationDiversityAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
     268        SingleObjectivePopulationDiversityAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     269        SingleObjectivePopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results";
     270        SingleObjectivePopulationDiversityAnalyzer.SimilarityCalculator = Operators.OfType<SingleObjectiveTestFunctionSimilarityCalculator>().SingleOrDefault();
     271      }
    259272    }
    260273    private void InitializeOperators() {
     
    264277
    265278      Operators.Add(new BestSingleObjectiveTestFunctionSolutionAnalyzer());
     279      Operators.Add(new SingleObjectivePopulationDiversityAnalyzer());
    266280      ParameterizeAnalyzers();
    267281      Operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>().Cast<IOperator>());
     
    316330      try {
    317331        BestKnownSolutionParameter.Value = Evaluator.GetBestKnownSolution(ProblemSize.Value);
    318       } catch (ArgumentException e) {
     332      }
     333      catch (ArgumentException e) {
    319334        ErrorHandling.ShowErrorDialog(e);
    320335        ProblemSize.Value = Evaluator.MinimumProblemSize;
Note: See TracChangeset for help on using the changeset viewer.