Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/22/12 11:11:38 (12 years ago)
Author:
jkarder
Message:

#1331:

  • synced branch with trunk
  • added custom interface (ISimilarityBasedOperator) to mark operators that conduct similarity calculation
  • similarity calculators are now parameterized by the algorithm
  • deleted SolutionPool2TierUpdateMethod
  • deleted KnapsackMultipleGuidesPathRelinker
  • moved IImprovementOperator, IPathRelinker and ISimilarityCalculator to HeuristicLab.Optimization
  • added parameter descriptions
  • fixed plugin references
  • fixed count of EvaluatedSolutions
  • fixed check for duplicate solutions
  • minor code improvements
Location:
branches/ScatterSearch (trunk integration)
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/ScatterSearch (trunk integration)

  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs

    r7305 r8086  
    7070
    7171    protected override Allele[] CalculateAlleles(ISymbolicExpressionTree solution) {
    72       return GetAllSubtreesOfDepth(solution, AlleleTreeDepth)
     72      return CalculateAlleles(solution, AlleleTreeDepth);
     73    }
     74
     75    public static Allele[] CalculateAlleles(ISymbolicExpressionTree solution, int alleleTreedepth) {
     76      return GetAllSubtreesOfDepth(solution, alleleTreedepth)
    7377        .AsParallel()
    74         .Select(t => GetAlleleFromSubtreeOfDepth(t, AlleleTreeDepth))
     78        .Select(t => GetAlleleFromSubtreeOfDepth(t, alleleTreedepth))
    7579        .ToArray();
    7680    }
    7781
    78     private Allele GetAlleleFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) {
     82    private static Allele GetAlleleFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) {
    7983      string textualRepresentation = GetTextualRepresentationFromSubtreeOfDepth(tree, d);
    8084      return new Allele(textualRepresentation);
    8185    }
    8286
    83     private string GetTextualRepresentationFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) {
     87    private static string GetTextualRepresentationFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) {
    8488      if (d == 0) return "";
    8589      StringBuilder builder = new StringBuilder();
     
    100104    }
    101105
    102     private IEnumerable<ISymbolicExpressionTreeNode> GetAllSubtreesOfDepth(ISymbolicExpressionTree solution, int d) {
     106    private static IEnumerable<ISymbolicExpressionTreeNode> GetAllSubtreesOfDepth(ISymbolicExpressionTree solution, int d) {
    103107      return from node in solution.IterateNodesPostfix()
    104108             where node.GetDepth() >= d
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r7734 r8086  
    9595    <Reference Include="ALGLIB-3.5.0, Version=3.5.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    9696      <HintPath>..\..\bin\ALGLIB-3.5.0.dll</HintPath>
     97      <Private>False</Private>
    9798    </Reference>
    9899    <Reference Include="System" />
     
    228229  </ItemGroup>
    229230  <ItemGroup>
    230     <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    231       <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
    232       <Name>HeuristicLab.Analysis-3.3</Name>
    233       <Private>False</Private>
    234     </ProjectReference>
    235     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    236       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    237       <Name>HeuristicLab.Collections-3.3</Name>
    238       <Private>False</Private>
    239     </ProjectReference>
    240     <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
    241       <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
    242       <Name>HeuristicLab.Common.Resources-3.3</Name>
    243       <Private>False</Private>
    244     </ProjectReference>
    245     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    246       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    247       <Name>HeuristicLab.Common-3.3</Name>
    248       <Private>False</Private>
    249     </ProjectReference>
    250     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    251       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    252       <Name>HeuristicLab.Core-3.3</Name>
    253       <Private>False</Private>
    254     </ProjectReference>
    255     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    256       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    257       <Name>HeuristicLab.Data-3.3</Name>
    258       <Private>False</Private>
    259     </ProjectReference>
    260     <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
    261       <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
    262       <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
    263       <Private>False</Private>
    264     </ProjectReference>
    265     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    266       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    267       <Name>HeuristicLab.Operators-3.3</Name>
    268       <Private>False</Private>
    269     </ProjectReference>
    270     <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
    271       <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
    272       <Name>HeuristicLab.Optimization.Operators-3.3</Name>
    273       <Private>False</Private>
    274     </ProjectReference>
    275     <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    276       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    277       <Name>HeuristicLab.Optimization-3.3</Name>
    278       <Private>False</Private>
    279     </ProjectReference>
    280     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    281       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    282       <Name>HeuristicLab.Parameters-3.3</Name>
    283       <Private>False</Private>
    284     </ProjectReference>
    285     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    286       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    287       <Name>HeuristicLab.Persistence-3.3</Name>
    288       <Private>False</Private>
    289     </ProjectReference>
    290     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    291       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    292       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    293       <Private>False</Private>
    294     </ProjectReference>
    295     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
    296       <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
    297       <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
    298       <Private>False</Private>
    299     </ProjectReference>
    300     <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
    301       <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
    302       <Name>HeuristicLab.Random-3.3</Name>
    303       <Private>False</Private>
    304     </ProjectReference>
    305   </ItemGroup>
    306   <ItemGroup>
    307231    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
    308232      <Visible>False</Visible>
     
    321245    </BootstrapperPackage>
    322246  </ItemGroup>
    323   <ItemGroup />
     247  <ItemGroup>
     248    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
     249      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
     250      <Name>HeuristicLab.Analysis-3.3</Name>
     251      <Private>False</Private>
     252    </ProjectReference>
     253    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
     254      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
     255      <Name>HeuristicLab.Collections-3.3</Name>
     256      <Private>False</Private>
     257    </ProjectReference>
     258    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
     259      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
     260      <Name>HeuristicLab.Common.Resources-3.3</Name>
     261      <Private>False</Private>
     262    </ProjectReference>
     263    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
     264      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
     265      <Name>HeuristicLab.Common-3.3</Name>
     266      <Private>False</Private>
     267    </ProjectReference>
     268    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
     269      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
     270      <Name>HeuristicLab.Core-3.3</Name>
     271      <Private>False</Private>
     272    </ProjectReference>
     273    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
     274      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
     275      <Name>HeuristicLab.Data-3.3</Name>
     276      <Private>False</Private>
     277    </ProjectReference>
     278    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
     279      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
     280      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
     281      <Private>False</Private>
     282    </ProjectReference>
     283    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
     284      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
     285      <Name>HeuristicLab.Operators-3.3</Name>
     286      <Private>False</Private>
     287    </ProjectReference>
     288    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
     289      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
     290      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
     291      <Private>False</Private>
     292    </ProjectReference>
     293    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
     294      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
     295      <Name>HeuristicLab.Optimization-3.3</Name>
     296    </ProjectReference>
     297    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
     298      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
     299      <Name>HeuristicLab.Parameters-3.3</Name>
     300      <Private>False</Private>
     301    </ProjectReference>
     302    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
     303      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
     304      <Name>HeuristicLab.Persistence-3.3</Name>
     305      <Private>False</Private>
     306    </ProjectReference>
     307    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
     308      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
     309      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
     310      <Private>False</Private>
     311    </ProjectReference>
     312    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
     313      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
     314      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
     315      <Private>False</Private>
     316    </ProjectReference>
     317    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
     318      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
     319      <Name>HeuristicLab.Problems.Instances-3.3</Name>
     320      <Private>False</Private>
     321    </ProjectReference>
     322    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
     323      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
     324      <Name>HeuristicLab.Random-3.3</Name>
     325      <Private>False</Private>
     326    </ProjectReference>
     327  </ItemGroup>
    324328  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    325329  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Plugin.cs.frame

    r7696 r8086  
    4141  [PluginDependency("HeuristicLab.Persistence", "3.3")]
    4242  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
     43  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
    4344  [PluginDependency("HeuristicLab.Random", "3.3")]
    4445  public class HeuristicLabProblemsDataAnalysisSymbolicPlugin : PluginBase {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r7726 r8086  
    3232using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3333using HeuristicLab.PluginInfrastructure;
     34using HeuristicLab.Problems.Instances;
    3435
    3536namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    3637  [StorableClass]
    37   public abstract class SymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>, ISymbolicDataAnalysisProblem, IStorableContent
     38  public abstract class SymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>, ISymbolicDataAnalysisProblem, IStorableContent,
     39    IProblemInstanceConsumer<T>, IProblemInstanceExporter<T>
    3840    where T : class, IDataAnalysisProblemData
    3941    where U : class, ISymbolicDataAnalysisEvaluator<T>
     
    320322    }
    321323
    322     public abstract void ImportProblemDataFromFile(string fileName);
     324    #region Import & Export
     325    public void Load(T data) {
     326      Name = data.Name;
     327      Description = data.Description;
     328      ProblemData = data;
     329      OnReset();
     330    }
     331
     332    public T Export() {
     333      return ProblemData;
     334    }
     335    #endregion
    323336  }
    324337}
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableCondition.cs

    r7671 r8086  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    152152    #region persistence and cloning
    153153    [StorableConstructor]
    154     private VariableCondition(bool deserializing) : base(deserializing) { }
     154    private VariableCondition(bool deserializing)
     155      : base(deserializing) {
     156      variableNames = new List<string>();
     157    }
    155158    private VariableCondition(VariableCondition original, Cloner cloner)
    156159      : base(original, cloner) {
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableConditionTreeNode.cs

    r7671 r8086  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
Note: See TracChangeset for help on using the changeset viewer.