Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9341


Ignore:
Timestamp:
04/02/13 22:39:11 (11 years ago)
Author:
ascheibe
Message:

#1886 some minor AB fixes

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  
    133133        SimilarityCalculatorParameter.Value = OperatorsParameter.ActualValue.OfType<ISingleObjectiveSolutionSimilarityCalculator>().FirstOrDefault();
    134134      }
    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");
    136136      diversityPlotHelper.InitializePlot(Results, "Mutation Diversity", "Solution Index", "Diversity");
    137137      successHelper.InitializeChart(Results, "Successfull Mutations", new string[] { "Successfull Mutations per Generation" });
     
    184184      if (GenerationsParameter.ActualValue.Value != 0) {
    185185        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          }
    187191
    188192          Reset();
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SelectionPressureAnalyzer.cs

    r9331 r9341  
    9292      SolutionQualityName = "TSPTourLength";
    9393
    94       selPressurePlot = new ScatterPlotHelper(false, true, true, false);
     94      selPressurePlot = new ScatterPlotHelper(false, true, true, true);
    9595    }
    9696
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/WorstQualityAnalyzer.cs

    r9185 r9341  
    2525using HeuristicLab.Data;
    2626using HeuristicLab.Operators;
     27using HeuristicLab.Optimization;
    2728using HeuristicLab.Parameters;
    2829using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3334  public class WorstQualityAnalyzer : SingleSuccessorOperator, IStatefulItem {
    3435    private const string GenerationsParameterName = "Generations";
     36    private const string ResultsParameterName = "Results";
    3537
    3638    public IValueLookupParameter<BoolValue> MaximizationParameter {
     
    4547    public ILookupParameter<DoubleValue> WorstKnownQualityParameter {
    4648      get { return (ILookupParameter<DoubleValue>)Parameters["WorstKnownQuality"]; }
     49    }
     50    public ILookupParameter<ResultCollection> ResultsParameter {
     51      get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
    4752    }
    4853    [Storable]
     
    6368      Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "Nr of generations."));
    6469      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."));
    6571    }
    6672
     
    9096        }
    9197      } else {
    92         if (WorstKnownQualityParameter.ActualValue == null)
     98        if (WorstKnownQualityParameter.ActualValue == null) {
    9399          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        }
    94102      }
    95103
Note: See TracChangeset for help on using the changeset viewer.