Changeset 9045 for branches/HeuristicLab.Analysis.AlgorithmBehavior
- Timestamp:
- 12/13/12 10:31:54 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/CombinedOperators/QAPAfterMutationCombinedOperator.cs
r9044 r9045 55 55 mAnalyzer.PermutationAfterMutationParameter.ActualName = "Assignment"; 56 56 57 varRemover.VariableNameParameter.Value.Value = " TSPTourClone";57 varRemover.VariableNameParameter.Value.Value = "AssignmentClone"; 58 58 } 59 59 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj
r9044 r9045 120 120 <Compile Include="AfterCrossoverCombinedOperator.cs" /> 121 121 <Compile Include="AfterMutationCombinedOperator.cs" /> 122 <Compile Include="CombinedOperators\TFAfterMutationCombinedOperator.cs" /> 122 123 <Compile Include="CombinedOperators\TFAfterCrossoverCombinedOperator.cs" /> 123 124 <Compile Include="CombinedOperators\TSPAfterMutationCombinedOperator.cs" /> -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/MutationPerformanceAnalyzer.cs
r8867 r9045 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Encodings.PermutationEncoding;28 27 using HeuristicLab.Optimization; 29 28 using HeuristicLab.Parameters; … … 50 49 get { return (ILookupParameter<DoubleValue>)Parameters["QualityAfterMutation"]; } 51 50 } 52 public ILookupParameter< Permutation> PermutationBeforeMutationParameter {53 get { return (ILookupParameter< Permutation>)Parameters["PermutationBeforeMutation"]; }51 public ILookupParameter<IItem> PermutationBeforeMutationParameter { 52 get { return (ILookupParameter<IItem>)Parameters["PermutationBeforeMutation"]; } 54 53 } 55 public ILookupParameter< Permutation> PermutationAfterMutationParameter {56 get { return (ILookupParameter< Permutation>)Parameters["PermutationAfterMutation"]; }54 public ILookupParameter<IItem> PermutationAfterMutationParameter { 55 get { return (ILookupParameter<IItem>)Parameters["PermutationAfterMutation"]; } 57 56 } 58 57 public ILookupParameter<ItemCollection<IItem>> OperatorsParameter { … … 96 95 QualityAfterMutationParameter.ActualName = "TSPTourLengthM"; 97 96 98 Parameters.Add(new LookupParameter< Permutation>("PermutationBeforeMutation"));97 Parameters.Add(new LookupParameter<IItem>("PermutationBeforeMutation")); 99 98 PermutationBeforeMutationParameter.ActualName = "TSPTourClone"; 100 99 101 Parameters.Add(new LookupParameter< Permutation>("PermutationAfterMutation"));100 Parameters.Add(new LookupParameter<IItem>("PermutationAfterMutation")); 102 101 PermutationAfterMutationParameter.ActualName = "TSPTour"; 103 102 … … 117 116 SimilarityCalculatorParameter.Value = OperatorsParameter.ActualValue.OfType<ISingleObjectiveSolutionSimilarityCalculator>().FirstOrDefault(); 118 117 } 118 qualityPlotHelper.InitializePlot(Results, "Mutation Quality", "Solution Index", "Absolut Quality Difference"); 119 diversityPlotHelper.InitializePlot(Results, "Mutation Diversity", "Solution Index", "Diversity"); 119 120 Reset(); 120 121 } … … 126 127 var qualityCX = QualityAfterCrossoverParameter.ActualValue.Value; 127 128 var qualityM = QualityAfterMutationParameter.ActualValue.Value; 128 var permutationBefore = PermutationBeforeMutationParameter.ActualValue;129 var permutationAfter = PermutationAfterMutationParameter.ActualValue;129 var solutionBefore = PermutationBeforeMutationParameter.ActualValue; 130 var solutionAfter = PermutationAfterMutationParameter.ActualValue; 130 131 131 if (permutationBefore != null) { 132 qualityPlotHelper.InitializePlot(Results, "Mutation Quality", "Solution Index", "Absolut Quality Difference"); 133 diversityPlotHelper.InitializePlot(Results, "Mutation Diversity", "Solution Index", "Diversity"); 132 Scope permutationBeforeScope = new Scope(); 133 Scope permutationAfterScope = new Scope(); 134 permutationBeforeScope.Variables.Add(new Variable(PermutationAfterMutationParameter.ActualName, solutionBefore)); 135 permutationAfterScope.Variables.Add(new Variable(PermutationAfterMutationParameter.ActualName, solutionAfter)); 134 136 135 Scope permutationBeforeScope = new Scope(); 136 Scope permutationAfterScope = new Scope(); 137 permutationBeforeScope.Variables.Add(new Variable(PermutationAfterMutationParameter.ActualName, permutationBefore)); 138 permutationAfterScope.Variables.Add(new Variable(PermutationAfterMutationParameter.ActualName, permutationAfter)); 139 140 divPoint = new Point2D<double>(cnt, SimilarityCalculatorParameter.Value.CalculateSolutionSimilarity(permutationBeforeScope, permutationAfterScope)); 141 curPoint = new Point2D<double>(cnt++, qualityCX - qualityM); 137 divPoint = new Point2D<double>(cnt, SimilarityCalculatorParameter.Value.CalculateSolutionSimilarity(permutationBeforeScope, permutationAfterScope)); 138 curPoint = new Point2D<double>(cnt++, qualityCX - qualityM); 142 139 143 140 144 141 string curGenStr = GenerationsParameter.ActualValue.Value.ToString(); 145 142 146 147 143 qualityPlotHelper.AddPoint(curGenStr, curPoint); 144 diversityPlotHelper.AddPoint(curGenStr, divPoint); 148 145 149 if (GenerationsParameter.ActualValue.Value != 0) { 150 if (GenerationsParameter.ActualValue.Value > lastGeneration) { 151 Reset(); 152 } 146 if (GenerationsParameter.ActualValue.Value != 0) { 147 if (GenerationsParameter.ActualValue.Value > lastGeneration) { 148 Reset(); 153 149 } 154 150 }
Note: See TracChangeset
for help on using the changeset viewer.