Changeset 9044
- Timestamp:
- 12/12/12 23:28:52 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
- Files:
-
- 10 added
- 5 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/CrossoverPerformanceAnalyzer.cs
r9020 r9044 53 53 get { return (ILookupParameter<IntValue>)Parameters[GenerationsParameterName]; } 54 54 } 55 public ILookupParameter<ItemArray<Permutation>> ParentsParameter {56 get { return (ScopeTreeLookupParameter<Permutation>)Parameters["Parents"]; }57 }58 55 public ILookupParameter<ItemArray<DoubleValue>> ParentsQualityParameter { 59 56 get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["ParentsQuality"]; } 60 57 } 61 public ILookupParameter<Permutation> ChildParameter {62 get { return ((LookupParameter<Permutation>)Parameters["Child"]); }63 }64 58 public ILookupParameter<DoubleValue> QualityParameter { 65 59 get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; } … … 67 61 public IValueParameter<ISingleObjectiveSolutionSimilarityCalculator> SimilarityCalculatorParameter { 68 62 get { return (IValueParameter<ISingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"]; } 63 } 64 public IValueParameter<IUnwantedMutationAnalyzer> UnwantedMutationAnalyzerParameter { 65 get { return (IValueParameter<IUnwantedMutationAnalyzer>)Parameters["UnwantedMutationAnalyzer"]; } 69 66 } 70 67 public ILookupParameter<ItemCollection<IItem>> OperatorsParameter { … … 117 114 118 115 Parameters.Add(new ScopeTreeLookupParameter<Permutation>("Parents", "The parent permutations which have been crossed.")); 119 ParentsParameter.ActualName = "TSPTour";120 116 121 117 Parameters.Add(new LookupParameter<Permutation>("Child", "The child permutation resulting from the crossover.")); 122 ChildParameter.ActualName = "TSPTour";123 118 124 119 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("ParentsQuality", "The quality of the parent solutions.")); … … 129 124 130 125 Parameters.Add(new ValueParameter<ISingleObjectiveSolutionSimilarityCalculator>("SimilarityCalculator")); 126 Parameters.Add(new ValueParameter<IUnwantedMutationAnalyzer>("UnwantedMutationAnalyzer")); 131 127 Parameters.Add(new LookupParameter<ItemCollection<IItem>>("Operators", "The operators and items that the problem provides to the algorithms.")); 132 128 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, false otherwise")); … … 187 183 188 184 Point2D<double> worseQualityPoint, betterQualityPoint, childDiversityToWorseParent, childDiversityToBetterParent, diversityPointParent, qualityPointParent, unwantedMutationPoint; 189 var parent1 = ParentsParameter.ActualValue.First();190 var parent2 = ParentsParameter.ActualValue.Last();191 185 var qualityParent1 = ParentsQualityParameter.ActualValue.First().Value; 192 186 var qualityParent2 = ParentsQualityParameter.ActualValue.Last().Value; 193 var child = ChildParameter.ActualValue;194 187 var qualityChild = QualityParameter.ActualValue.Value; 195 188 … … 199 192 diversityPointParent = new Point2D<double>(cnt, parentDiversity); 200 193 qualityPointParent = new Point2D<double>(cnt, Math.Abs(qualityParent1 - qualityParent2)); 201 unwantedMutationPoint = new Point2D<double>(cnt, UnwantedMutationAnalyzer.AnalyzeUnwantedMutationsForPermutationEncoding(parent1, parent2, child)); 194 if (UnwantedMutationAnalyzerParameter.Value != null) { 195 unwantedMutationPoint = new Point2D<double>(cnt, UnwantedMutationAnalyzerParameter.Value.AnalyzeUnwantedMutations(ExecutionContext.Scope.SubScopes.First(), ExecutionContext.Scope.SubScopes.Last(), ExecutionContext.Scope)); 196 } else { 197 //TODO: this is not a good solution 198 unwantedMutationPoint = new Point2D<double>(cnt, 0.0); 199 } 202 200 203 201 double worseQuality, betterQuality; -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj
r9042 r9044 120 120 <Compile Include="AfterCrossoverCombinedOperator.cs" /> 121 121 <Compile Include="AfterMutationCombinedOperator.cs" /> 122 <Compile Include="TSPAfterMutationCombinedOperator.cs" /> 123 <Compile Include="TSPAfterCrossoverCombinedOperator.cs" /> 124 <Compile Include="QAPAfterMutationCombinedOperator.cs" /> 125 <Compile Include="QAPAfterCrossoverCombinedOperator.cs" /> 122 <Compile Include="CombinedOperators\TFAfterCrossoverCombinedOperator.cs" /> 123 <Compile Include="CombinedOperators\TSPAfterMutationCombinedOperator.cs" /> 124 <Compile Include="CombinedOperators\TSPAfterCrossoverCombinedOperator.cs" /> 125 <Compile Include="CombinedOperators\QAPAfterMutationCombinedOperator.cs" /> 126 <Compile Include="CombinedOperators\QAPAfterCrossoverCombinedOperator.cs" /> 126 127 <Compile Include="InitializableOperator.cs" /> 127 <Compile Include="UnwantedMutationAnalyzer.cs" /> 128 <Compile Include="UnwantedMutationAnalyzers\PermutationUnwantedMutationAnalyzer.cs" /> 129 <Compile Include="UnwantedMutationAnalyzers\IUnwantedMutationAnalyzer.cs" /> 130 <Compile Include="UnwantedMutationAnalyzers\UnwantedMutationAnalyzer.cs" /> 128 131 <Compile Include="VariableRemover.cs" /> 129 132 <Compile Include="LinearLeastSquaresFitting.cs" /> … … 149 152 <None Include="Properties\AssemblyInfo.cs.frame" /> 150 153 </ItemGroup> 154 <ItemGroup /> 151 155 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 152 156 <PropertyGroup>
Note: See TracChangeset
for help on using the changeset viewer.