Changeset 9341 for branches/HeuristicLab.Analysis.AlgorithmBehavior
- Timestamp:
- 04/02/13 22:39:11 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/MutationPerformanceAnalyzer.cs
r9252 r9341 133 133 SimilarityCalculatorParameter.Value = OperatorsParameter.ActualValue.OfType<ISingleObjectiveSolutionSimilarityCalculator>().FirstOrDefault(); 134 134 } 135 qualityPlotHelper.InitializePlot(Results, "Mutation Quality", "Solution Index", "Absolut Quality Difference");135 qualityPlotHelper.InitializePlot(Results, "Mutation Performance compared to parent", "Solution Index", "Absolut Quality Difference"); 136 136 diversityPlotHelper.InitializePlot(Results, "Mutation Diversity", "Solution Index", "Diversity"); 137 137 successHelper.InitializeChart(Results, "Successfull Mutations", new string[] { "Successfull Mutations per Generation" }); … … 184 184 if (GenerationsParameter.ActualValue.Value != 0) { 185 185 if (GenerationsParameter.ActualValue.Value > lastGeneration) { 186 successHelper.AddPoint((double)success / (cnt - 1)); 186 if (cnt > 1) { 187 successHelper.AddPoint((double)success / (cnt - 1)); 188 } else { 189 successHelper.AddPoint(0.0); 190 } 187 191 188 192 Reset(); -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SelectionPressureAnalyzer.cs
r9331 r9341 92 92 SolutionQualityName = "TSPTourLength"; 93 93 94 selPressurePlot = new ScatterPlotHelper(false, true, true, false);94 selPressurePlot = new ScatterPlotHelper(false, true, true, true); 95 95 } 96 96 -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/WorstQualityAnalyzer.cs
r9185 r9341 25 25 using HeuristicLab.Data; 26 26 using HeuristicLab.Operators; 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Parameters; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 33 34 public class WorstQualityAnalyzer : SingleSuccessorOperator, IStatefulItem { 34 35 private const string GenerationsParameterName = "Generations"; 36 private const string ResultsParameterName = "Results"; 35 37 36 38 public IValueLookupParameter<BoolValue> MaximizationParameter { … … 45 47 public ILookupParameter<DoubleValue> WorstKnownQualityParameter { 46 48 get { return (ILookupParameter<DoubleValue>)Parameters["WorstKnownQuality"]; } 49 } 50 public ILookupParameter<ResultCollection> ResultsParameter { 51 get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; } 47 52 } 48 53 [Storable] … … 63 68 Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "Nr of generations.")); 64 69 Parameters.Add(new LookupParameter<DoubleValue>("WorstKnownQuality", "The quality of the worst known solution of this problem.")); 70 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection where the analysis values should be stored.")); 65 71 } 66 72 … … 90 96 } 91 97 } else { 92 if (WorstKnownQualityParameter.ActualValue == null) 98 if (WorstKnownQualityParameter.ActualValue == null) { 93 99 AddVariableToGlobalScope("WorstKnownQuality", "The quality of the worst known solution of this problem.", new DoubleValue(upperBound)); 100 ResultsParameter.ActualValue.Add(new Result("WorstQuality", new DoubleValue(upperBound))); 101 } 94 102 } 95 103
Note: See TracChangeset
for help on using the changeset viewer.