- Timestamp:
- 01/24/13 01:06:46 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/AfterCrossoverCombinedOperator.cs
r9054 r9185 40 40 protected VariableDuplicator varDuplicator; 41 41 42 [Storable] 43 protected WorstQualityAnalyzer wqAnalyzer; 44 42 45 public ILookupParameter<IEvaluator> EvaluatorParameter { 43 46 get { return ((LookupParameter<IEvaluator>)Parameters["Evaluator"]); } … … 79 82 solToPopAnalyzer = new SolutionToPopulationAnalyzer(); 80 83 solToPopAnalyzer.ChartPostfixParameter.Value = new Data.StringValue("after Crossover"); 84 wqAnalyzer = new WorstQualityAnalyzer(); 81 85 86 Operators.Add(wqAnalyzer); 82 87 Operators.Add(EvaluatorParameter.ActualValue); 83 88 Operators.Add(cxAnalyzer); -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/CombinedOperators/QAPAfterCrossoverCombinedOperator.cs
r9054 r9185 63 63 solToPopAnalyzer.SolutionParameter.ActualName = "Assignment"; 64 64 solToPopAnalyzer.QualityParameter.ActualName = "Quality"; 65 66 wqAnalyzer.ParentsQualityParameter.ActualName = "Quality"; 65 67 } 66 68 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/CombinedOperators/TFAfterCrossoverCombinedOperator.cs
r9054 r9185 59 59 solToPopAnalyzer.SolutionParameter.ActualName = "Point"; 60 60 solToPopAnalyzer.QualityParameter.ActualName = "Quality"; 61 62 wqAnalyzer.ParentsQualityParameter.ActualName = "Quality"; 61 63 //TODO: add unwanted mutation analyzer for TF 62 64 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/CombinedOperators/VRPAfterCrossoverCombinedOperator.cs
r9054 r9185 59 59 solToPopAnalyzer.SolutionParameter.ActualName = "VRPTours"; 60 60 solToPopAnalyzer.QualityParameter.ActualName = "Quality"; 61 62 wqAnalyzer.ParentsQualityParameter.ActualName = "Quality"; 61 63 } 62 64 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/CrossoverPerformanceAnalyzer.cs
r9150 r9185 67 67 get { return (ILookupParameter<ItemCollection<IItem>>)Parameters["Operators"]; } 68 68 } 69 public ILookupParameter<DoubleValue> BestKnownQualityParameter { 70 get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; } 71 } 72 public ILookupParameter<DoubleValue> WorstKnownQualityParameter { 73 get { return (ILookupParameter<DoubleValue>)Parameters["WorstKnownQuality"]; } 74 } 69 75 #endregion 70 76 … … 124 130 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, false otherwise")); 125 131 Parameters.Add(new ValueLookupParameter<ItemCollection<DoubleValue>>("ComparisonFactor", "Determines if the quality should be compared to the better parent (1.0), to the worse (0.0) or to any linearly interpolated value between them.")); 126 132 Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem.")); 133 Parameters.Add(new LookupParameter<DoubleValue>("WorstKnownQuality", "The quality of the worst known solution of this problem.")); 127 134 128 135 worseParentCrossoverPerformancePlot = new ScatterPlotHelper(false, true, true); … … 172 179 } 173 180 successHelper.InitializeChart(Results, "Successfull Crossovers", successfullCXRowNames.ToArray()); 181 174 182 Reset(); 175 183 } … … 234 242 } 235 243 244 if (GenerationsParameter.ActualValue.Value == 1) { 245 double bkQuality = BestKnownQualityParameter.ActualValue.Value; 246 double wkQuality = WorstKnownQualityParameter.ActualValue.Value; 247 248 if (MaximizationParameter.ActualValue.Value) { 249 if (worseParentCrossoverPerformancePlot.Max == double.MinValue) { 250 worseParentCrossoverPerformancePlot.Max = bkQuality - wkQuality; 251 betterParentCrossoverPerformancePlot.Max = bkQuality - wkQuality; 252 parentQualityHelper.Max = bkQuality - wkQuality; 253 worseParentCrossoverPerformancePlot.Min = 0; 254 betterParentCrossoverPerformancePlot.Min = 0; 255 parentQualityHelper.Min = 0; 256 } 257 } else { 258 if (worseParentCrossoverPerformancePlot.Min == double.MaxValue) { 259 worseParentCrossoverPerformancePlot.Max = wkQuality - bkQuality; 260 betterParentCrossoverPerformancePlot.Max = wkQuality - bkQuality; 261 parentQualityHelper.Max = wkQuality - bkQuality; 262 worseParentCrossoverPerformancePlot.Min = 0; 263 betterParentCrossoverPerformancePlot.Min = 0; 264 parentQualityHelper.Min = 0; 265 } 266 } 267 } 268 236 269 if (GenerationsParameter.ActualValue.Value != 0) { 237 270 if (GenerationsParameter.ActualValue.Value > lastGeneration) { -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj
r9095 r9185 113 113 <Compile Include="CombinedOperators\QAPAfterMutationCombinedOperator.cs" /> 114 114 <Compile Include="CombinedOperators\QAPAfterCrossoverCombinedOperator.cs" /> 115 <Compile Include="WorstQualityAnalyzer.cs" /> 115 116 <Compile Include="InitializableOperator.cs" /> 116 117 <Compile Include="SolutionToPopulationAnalyzer.cs" /> -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/MutationPerformanceAnalyzer.cs
r9150 r9185 63 63 public IValueParameter<ISingleObjectiveSolutionSimilarityCalculator> SimilarityCalculatorParameter { 64 64 get { return (IValueParameter<ISingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"]; } 65 } 66 public ILookupParameter<DoubleValue> BestKnownQualityParameter { 67 get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; } 68 } 69 public ILookupParameter<DoubleValue> WorstKnownQualityParameter { 70 get { return (ILookupParameter<DoubleValue>)Parameters["WorstKnownQuality"]; } 65 71 } 66 72 #endregion … … 111 117 Parameters.Add(new LookupParameter<ItemCollection<IItem>>("Operators", "The operators and items that the problem provides to the algorithms.")); 112 118 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, false otherwise")); 119 Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem.")); 120 Parameters.Add(new LookupParameter<DoubleValue>("WorstKnownQuality", "The quality of the worst known solution of this problem.")); 113 121 114 122 diversityPlotHelper = new ScatterPlotHelper(false, true); … … 157 165 } 158 166 167 if (GenerationsParameter.ActualValue.Value == 1) { 168 double bkQuality = BestKnownQualityParameter.ActualValue.Value; 169 double wkQuality = WorstKnownQualityParameter.ActualValue.Value; 170 171 if (MaximizationParameter.ActualValue.Value) { 172 if (qualityPlotHelper.Max == double.MinValue) { 173 qualityPlotHelper.Max = bkQuality - wkQuality; 174 qualityPlotHelper.Min = 0; 175 } 176 } else { 177 if (qualityPlotHelper.Min == double.MaxValue) { 178 qualityPlotHelper.Max = wkQuality - bkQuality; 179 qualityPlotHelper.Min = 0; 180 } 181 } 182 } 183 159 184 if (GenerationsParameter.ActualValue.Value != 0) { 160 185 if (GenerationsParameter.ActualValue.Value > lastGeneration) { -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/ScatterPlotHelper.cs
r9059 r9185 52 52 [Storable] 53 53 private double min; 54 public double Min { 55 get { return min; } 56 set { min = value; } 57 } 54 58 [Storable] 55 59 private double max; 60 public double Max { 61 get { return max; } 62 set { max = value; } 63 } 64 56 65 [Storable] 57 66 private ResultCollection Results; … … 70 79 StoreHistory = original.StoreHistory; 71 80 CreateDataTable = original.CreateDataTable; 81 min = original.min; 82 max = original.max; 83 84 chartName = original.chartName; 85 chartName = original.chartName; 86 xAxisTitle = original.xAxisTitle; 87 yAxisTitle = original.yAxisTitle; 72 88 } 73 89 … … 120 136 121 137 public void AddPoint(string rowName, Point2D<double> point) { 122 if (point.Y > max)123 max = point.Y;124 if (point.Y < min)125 min = point.Y;126 127 138 if (!Plot.Rows.ContainsKey(rowName)) { 128 139 if (StoreHistory) … … 166 177 plot = null; 167 178 } 179 min = double.MaxValue; 180 max = double.MinValue; 168 181 } 169 182 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionToPopulationAnalyzer.cs
r9059 r9185 61 61 public IValueParameter<StringValue> ChartPostfixParameter { 62 62 get { return (IValueParameter<StringValue>)Parameters["ChartPostfix"]; } 63 } 64 public ILookupParameter<DoubleValue> BestKnownQualityParameter { 65 get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; } 66 } 67 public ILookupParameter<DoubleValue> WorstKnownQualityParameter { 68 get { return (ILookupParameter<DoubleValue>)Parameters["WorstKnownQuality"]; } 63 69 } 64 70 #endregion … … 99 105 Parameters.Add(new LookupParameter<ItemCollection<IItem>>("Operators", "The operators and items that the problem provides to the algorithms.")); 100 106 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, false otherwise")); 107 Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem.")); 108 Parameters.Add(new LookupParameter<DoubleValue>("WorstKnownQuality", "The quality of the worst known solution of this problem.")); 101 109 102 110 populationDiversityPlot = new ScatterPlotHelper(false, true); … … 154 162 } 155 163 164 if (GenerationsParameter.ActualValue.Value == 1) { 165 double bkQuality = BestKnownQualityParameter.ActualValue.Value; 166 double wkQuality = WorstKnownQualityParameter.ActualValue.Value; 167 168 if (MaximizationParameter.ActualValue.Value) { 169 if (populationQualityPlot.Max == double.MinValue) { 170 populationQualityPlot.Max = bkQuality - wkQuality; 171 qualityPlot.Max = bkQuality; 172 populationQualityPlot.Min = 0; 173 qualityPlot.Min = wkQuality; 174 } 175 } else { 176 if (populationQualityPlot.Min == double.MaxValue) { 177 populationQualityPlot.Max = wkQuality - bkQuality; 178 qualityPlot.Max = wkQuality; 179 populationQualityPlot.Min = 0; 180 qualityPlot.Min = bkQuality; 181 } 182 } 183 } 184 156 185 Point2D<double> popQualityPoint; 157 186 if (MaximizationParameter.ActualValue.Value) {
Note: See TracChangeset
for help on using the changeset viewer.