Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/12/13 15:48:14 (11 years ago)
Author:
jkarder
Message:

#1909

  • added project HL.Problems.Instances.TestFunctions (includes data descriptor and instance provider)
  • added instance type SOTFData
  • added SingleObjectiveTestFunctionProblemView
Location:
branches/TestFunctionInstances/HeuristicLab.Problems.TestFunctions/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/TestFunctionInstances/HeuristicLab.Problems.TestFunctions/3.3/HeuristicLab.Problems.TestFunctions-3.3.csproj

    r9877 r9878  
    245245    </BootstrapperPackage>
    246246  </ItemGroup>
    247   <ItemGroup />
     247  <ItemGroup>
     248    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
     249      <Project>{3540e29e-4793-49e7-8ee2-fea7f61c3994}</Project>
     250      <Name>HeuristicLab.Problems.Instances-3.3</Name>
     251      <Private>False</Private>
     252    </ProjectReference>
     253  </ItemGroup>
    248254  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    249255  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/TestFunctionInstances/HeuristicLab.Problems.TestFunctions/3.3/Plugin.cs.frame

    r9462 r9878  
    3838  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    3939  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
     40  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
    4041  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    4142  [PluginDependency("HeuristicLab.Persistence", "3.3")]
  • branches/TestFunctionInstances/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r9456 r9878  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
     24using System.Linq;
    2225using HeuristicLab.Analysis;
    2326using HeuristicLab.Common;
     
    2932using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3033using HeuristicLab.PluginInfrastructure;
    31 using System;
    32 using System.Collections.Generic;
    33 using System.Linq;
     34using HeuristicLab.Problems.Instances;
    3435
    3536namespace HeuristicLab.Problems.TestFunctions {
     
    3738  [StorableClass]
    3839  [Creatable("Problems")]
    39   public sealed class SingleObjectiveTestFunctionProblem : SingleObjectiveHeuristicOptimizationProblem<ISingleObjectiveTestFunctionProblemEvaluator, IRealVectorCreator>, IStorableContent {
     40  public sealed class SingleObjectiveTestFunctionProblem : SingleObjectiveHeuristicOptimizationProblem<ISingleObjectiveTestFunctionProblemEvaluator, IRealVectorCreator>, IStorableContent, IProblemInstanceConsumer<SOTFData> {
    4041    public string Filename { get; set; }
    4142
     
    324325      try {
    325326        BestKnownSolutionParameter.Value = Evaluator.GetBestKnownSolution(ProblemSize.Value);
    326       }
    327       catch (ArgumentException e) {
     327      } catch (ArgumentException e) {
    328328        ErrorHandling.ShowErrorDialog(e);
    329329        ProblemSize.Value = Evaluator.MinimumProblemSize;
     
    406406    }
    407407    #endregion
     408
     409    public void Load(SOTFData data) {
     410      Name = data.Name;
     411      Description = data.Description;
     412      Evaluator = (ISingleObjectiveTestFunctionProblemEvaluator)data.Evaluator;
     413    }
    408414  }
    409415}
Note: See TracChangeset for help on using the changeset viewer.