- Timestamp:
- 09/15/15 00:10:33 (9 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking
- Files:
-
- 7 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Tests/HeuristicLab.EvolutionTracking.Tests.csproj
r12208 r12951 39 39 <Reference Include="HeuristicLab.Common-3.3"> 40 40 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> 41 <Private>False</Private> 41 42 </Reference> 42 43 <Reference Include="HeuristicLab.Core-3.3"> 43 44 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 44 45 </Reference> 46 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 47 <SpecificVersion>False</SpecificVersion> 48 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath> 49 <Private>False</Private> 50 </Reference> 51 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 52 <SpecificVersion>False</SpecificVersion> 53 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 54 <Private>False</Private> 55 </Reference> 45 56 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 46 57 <SpecificVersion>False</SpecificVersion> 47 58 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 59 <Private>False</Private> 60 </Reference> 61 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 62 <SpecificVersion>False</SpecificVersion> 63 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath> 64 <Private>False</Private> 48 65 </Reference> 49 66 <Reference Include="System" /> … … 57 74 <Otherwise> 58 75 <ItemGroup> 59 <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" /> 76 <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework"> 77 <Private>False</Private> 78 </Reference> 60 79 </ItemGroup> 61 80 </Otherwise> … … 64 83 <Compile Include="GenealogyOperationsPerformanceTests.cs" /> 65 84 <Compile Include="Properties\AssemblyInfo.cs" /> 85 <Compile Include="QueryMatchPerformanceTest.cs" /> 66 86 </ItemGroup> 67 87 <ItemGroup> … … 69 89 <Project>{06d4a186-9319-48a0-bade-a2058d462eea}</Project> 70 90 <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name> 91 <Private>False</Private> 71 92 </ProjectReference> 72 93 <ProjectReference Include="..\HeuristicLab.EvolutionTracking\3.4\HeuristicLab.EvolutionTracking-3.4.csproj"> 73 94 <Project>{1f75cea3-464f-4a6f-b2f0-04b9841ebc16}</Project> 74 95 <Name>HeuristicLab.EvolutionTracking-3.4</Name> 96 <Private>False</Private> 75 97 </ProjectReference> 76 98 <ProjectReference Include="..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> 77 99 <Project>{3d28463f-ec96-4d82-afee-38be91a0ca00}</Project> 78 100 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name> 101 <Private>False</Private> 79 102 </ProjectReference> 80 103 </ItemGroup> -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs
r12892 r12951 55 55 private const string EnableManipulatorTrackingParameterName = "EnableManipulatorTracking"; 56 56 private const string EnableSolutionCreatorTrackingParameterName = "EnableSolutionCreatorTracking"; // should always be enabled. maybe superfluous 57 private const string TrimOlderGenerationsParameterName = "TrimOlderGenerations"; 57 58 #endregion parameter names 58 59 59 60 #region parameter properties 61 62 public IFixedValueParameter<BoolValue> TrimOlderGenerationsParameter { 63 get { return (IFixedValueParameter<BoolValue>)Parameters[TrimOlderGenerationsParameterName]; } 64 } 65 60 66 public IScopeTreeLookupParameter<DoubleValue> QualityParameter { 61 67 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; } … … 142 148 public BoolValue EnableSolutionCreatorTracking { 143 149 get { return EnableSolutionCreatorTrackingParameter.Value; } 150 } 151 152 public bool TrimOlderGenerations { 153 get { return TrimOlderGenerationsParameter.Value.Value; } 144 154 } 145 155 #endregion properties … … 164 174 Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(BeforeManipulatorOperatorParameterName)); 165 175 Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(AfterManipulatorOperatorParameterName)); 176 Parameters.Add(new FixedValueParameter<BoolValue>(TrimOlderGenerationsParameterName, "Remove all the generations older than the last generation from the genealoy graph to save memory.")); 166 177 #endregion add parameters 167 178 } … … 201 212 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The individual qualities.")); 202 213 } 214 if (!Parameters.ContainsKey(TrimOlderGenerationsParameterName)) 215 Parameters.Add(new FixedValueParameter<BoolValue>(TrimOlderGenerationsParameterName, "Remove all the generations older than the last generation from the genealoy graph to save memory.")); 203 216 } 204 217 … … 318 331 genealogyGraph.RemoveVertices(discarded); 319 332 333 //trim 334 if (TrimOlderGenerations) { 335 for (int i = 0; i < generation - 1; ++i) { 336 var vertices = genealogyGraph.GetByRank(i).ToList(); 337 genealogyGraph.RemoveVertices(vertices); 338 } 339 } 340 320 341 return base.Apply(); 321 342 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeManipulatorOperator.cs
r11858 r12951 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 29 29 [StorableClass] 30 30 [Item("AfterCrossoverOperator", "Performs an action after the crossover operator is applied.")] 31 public class BeforeManipulatorOperator<T> : EvolutionTrackingOperator<T>, IManipulatorOperator<T> where T : class, IItem {31 public class BeforeManipulatorOperator<T> : EvolutionTrackingOperator<T>, IManipulatorOperator<T> where T : class, IItem { 32 32 private const string ChildParameterName = "Child"; 33 33 -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/EvolutionTrackingOperator.cs
r11227 r12951 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [Item("EvolutionTrackingOperator", "A base operator which facilitates access to the genealogy graph.")] 32 32 [StorableClass] 33 public class EvolutionTrackingOperator<T> : SingleSuccessorOperator where T : class, IItem {33 public class EvolutionTrackingOperator<T> : SingleSuccessorOperator where T : class, IItem { 34 34 // evolution tracking-related parameters 35 private const string resultsParameterName = "Results";36 private const string populationGraphParameterName = "PopulationGraph";37 private const string generationsParameterName = "Generations";35 private const string ResultsParameterName = "Results"; 36 private const string PopulationGraphParameterName = "PopulationGraph"; 37 private const string GenerationsParameterName = "Generations"; 38 38 39 39 public ILookupParameter<ResultCollection> ResultsParameter { 40 get { return (ILookupParameter<ResultCollection>)Parameters[ resultsParameterName]; }40 get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; } 41 41 } 42 42 public ILookupParameter<IntValue> GenerationsParameter { 43 get { return (ILookupParameter<IntValue>)Parameters[ generationsParameterName]; }43 get { return (ILookupParameter<IntValue>)Parameters[GenerationsParameterName]; } 44 44 } 45 45 public ResultCollection Results { … … 52 52 get { 53 53 IResult result; 54 if (!Results.ContainsKey( populationGraphParameterName)) {55 result = new Result( populationGraphParameterName, new GenealogyGraph<T>());54 if (!Results.ContainsKey(PopulationGraphParameterName)) { 55 result = new Result(PopulationGraphParameterName, new GenealogyGraph<T>()); 56 56 Results.Add(result); 57 57 } else { 58 result = Results[ populationGraphParameterName];58 result = Results[PopulationGraphParameterName]; 59 59 } 60 60 var graph = (GenealogyGraph<T>)result.Value; … … 63 63 } 64 64 public EvolutionTrackingOperator() { 65 Parameters.Add(new LookupParameter<IntValue>( generationsParameterName));66 Parameters.Add(new LookupParameter<ResultCollection>( resultsParameterName));65 Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName)); 66 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName)); 67 67 } 68 68 protected EvolutionTrackingOperator(EvolutionTrackingOperator<T> original, Cloner cloner) -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r12929 r12951 313 313 <Compile Include="Symbols\VariableConditionTreeNode.cs" /> 314 314 <Compile Include="Symbols\VariableTreeNode.cs" /> 315 <Compile Include="Tracking\Analyzers\SymbolicDataAnalysisSchemaFrequencyAnalyzer.cs" /> 315 316 <Compile Include="Tracking\Analyzers\SymbolicDataAnalysisFragmentLengthAnalyzer.cs" /> 316 317 <Compile Include="Tracking\Analyzers\SymbolicDataAnalysisSubtreeSampleCountAnalyzer.cs" /> 317 318 <Compile Include="Tracking\Analyzers\SymbolicDataAnalysisTraceOverlapAnalyzer.cs" /> 319 <Compile Include="Tracking\SchemaDiversification\SchemaCleanupOperator.cs" /> 320 <Compile Include="Tracking\SchemaDiversification\SchemaEvaluator.cs" /> 321 <Compile Include="Tracking\SchemaDiversification\SchemaCreator.cs" /> 322 <Compile Include="Tracking\SchemaDiversification\UpdateEstimatedValuesOperator.cs" /> 318 323 <Compile Include="Tracking\SymbolicDataAnalysisExpressionAfterCrossoverOperator.cs" /> 319 324 <Compile Include="Tracking\SymbolicDataAnalysisExpressionAfterManipulatorOperator.cs" /> -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Wildcards/AnyNode.cs
r12929 r12951 27 27 [StorableClass] 28 28 public class AnyNode : SymbolicExpressionTreeNode { 29 [StorableConstructor] 29 30 protected AnyNode(bool deserializing) : base(deserializing) { } 30 31 31 32 protected AnyNode(AnyNode original, Cloner cloner) : base(original, cloner) { } 32 33 34 public override IDeepCloneable Clone(Cloner cloner) { 35 return new AnyNode(this, cloner); 36 } 37 33 38 public AnyNode(AnyNodeSymbol symbol) : base(symbol) { } 34 39 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Wildcards/AnyNodeSymbol.cs
r12929 r12951 45 45 public AnyNodeSymbol(int minimumArity, int maximumArity) 46 46 : base("=", "A wildcard symbol that can match any node of the same type (function or leaf node)") { 47 MinimumArity = minimumArity;48 MaximumArity = maximumArity;47 this.MinimumArity = minimumArity; 48 this.MaximumArity = maximumArity; 49 49 } 50 50 -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Wildcards/AnySubtree.cs
r12929 r12951 27 27 [StorableClass] 28 28 public class AnySubtree : SymbolicExpressionTreeNode { 29 [StorableConstructor] 29 30 protected AnySubtree(bool deserializing) : base(deserializing) { 30 31 } … … 33 34 } 34 35 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new AnySubtree(this, cloner); 38 } 39 35 40 public AnySubtree(AnySubtreeSymbol symbol) : base(symbol) { 36 41 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionAfterManipulatorOperator.cs
r12287 r12951 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionBeforeCrossoverOperator.cs
r12287 r12951 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionBeforeManipulatorOperator.cs
r12287 r12951 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/QueryMatch.cs
r12942 r12951 42 42 public QueryMatch(ISymbolicExpressionTreeNodeEqualityComparer comparer) { 43 43 this.comparer = comparer; 44 } 45 46 public bool Match(ISymbolicExpressionTree data, ISymbolicExpressionTree query) { 47 return Match(data.Root.GetSubtree(0).GetSubtree(0), query.Root.GetSubtree(0).GetSubtree(0)); 44 48 } 45 49 … … 100 104 if (qTree.Index < qHedge.Index) { 101 105 var rtop = Rtop(qTree.Next, qHedge); 102 while (rtop.Index < qHedge.Next.Index&& qHedge.Index < rtop.LastSibling.Index) {106 while (rtop.Index < int.MaxValue && qHedge.Index < rtop.LastSibling.Index) { 103 107 qTree = Tmatch(d, rtop.Next, rtop.LastSibling); 104 108 rtop = Rtop(qTree.Next, qHedge); … … 108 112 } else { 109 113 var rtop = Rtop(qHedge.Next, qTree); 110 while (rtop.Index < qTree.Next.Index&& qTree.Index < rtop.LastSibling.Index) {114 while (rtop.Index < int.MaxValue && qTree.Index < rtop.LastSibling.Index) { 111 115 qHedge = Hmatch(d.PreviousSibling, rtop.Next, rtop.LastSibling); 112 116 rtop = Rtop(qHedge.Next, qTree); … … 123 127 return hUntil; 124 128 if (hFrom.Index > hUntil.Index) 125 return hFrom.Next;129 return new NodeInfo { Node = null, Index = int.MaxValue }; 126 130 // let u be the highest ancestor of hUntil that has a previous sibling s such that s >= hFrom 127 131 // if no such u exists, then Rtop(hFrom, hUntil) = hUntil. Otherwise, rtop(hFrom, hUntil) = s 128 if (hUntil.Parent == null)129 return hUntil;130 131 132 NodeInfo rtop = null; 132 133 List<NodeInfo> ancestors = hUntil.Ancestors.ToList();
Note: See TracChangeset
for help on using the changeset viewer.