Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/17/15 09:25:44 (9 years ago)
Author:
abeham
Message:

#2431:

  • Added run collection view
  • Changed name of analyzers
  • Modified algorithms to include Execution Time as a result
Location:
branches/PerformanceComparison/HeuristicLab.Analysis/3.3
Files:
1 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj

    r12764 r12771  
    211211    <Compile Include="Properties\AssemblyInfo.cs" />
    212212    <Compile Include="QualityAnalysis\QualityDistributionAnalyzer.cs" />
    213     <Compile Include="QualityAnalysis\QualityVsEvaluationsAnalyzer.cs" />
     213    <Compile Include="QualityAnalysis\QualityPerClockAnalyzer.cs" />
     214    <Compile Include="QualityAnalysis\QualityPerEvaluationsAnalyzer.cs" />
    214215    <Compile Include="QualityAnalysis\ScaledQualityDifferenceAnalyzer.cs" />
    215216    <Compile Include="Statistics\BonferroniHolm.cs" />
  • branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/QualityPerClockAnalyzer.cs

    r12764 r12771  
    3030
    3131namespace HeuristicLab.Analysis {
    32   [Item("QualityVsEvaluationsAnalyzer", @"Creates a plot of the solution quality with respect to the number of evaluated solutions.")]
     32  [Item("QualityPerClockAnalyzer", @"Creates a plot of the solution quality with respect to the elapsed wall-clock time.")]
    3333  [StorableClass]
    34   public class QualityVsEvaluationsAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {
     34  public class QualityPerClockAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {
    3535    public virtual bool EnabledByDefault {
    3636      get { return false; }
     
    4040      get { return (ILookupParameter<DoubleValue>)Parameters["BestQuality"]; }
    4141    }
    42     public ILookupParameter<IntValue> EvaluatedSolutionsParameter {
    43       get { return (ILookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
     42
     43    public IResultParameter<TimeSpanValue> ExecutionTimeParameter {
     44      get { return (IResultParameter<TimeSpanValue>)Parameters["Execution Time"]; }
    4445    }
    45     public IResultParameter<IndexedDataTable<int>> QualityVsEvaluationsParameter {
    46       get { return (IResultParameter<IndexedDataTable<int>>)Parameters["QualityVsEvaluations"]; }
     46
     47    public IResultParameter<IndexedDataTable<double>> QualityPerClockParameter {
     48      get { return (IResultParameter<IndexedDataTable<double>>)Parameters["QualityPerClock"]; }
    4749    }
    4850
    4951    [StorableConstructor]
    50     protected QualityVsEvaluationsAnalyzer(bool deserializing) : base(deserializing) { }
    51     protected QualityVsEvaluationsAnalyzer(QualityVsEvaluationsAnalyzer original, Cloner cloner) : base(original, cloner) { }
    52     public QualityVsEvaluationsAnalyzer()
     52    protected QualityPerClockAnalyzer(bool deserializing) : base(deserializing) { }
     53    protected QualityPerClockAnalyzer(QualityPerClockAnalyzer original, Cloner cloner) : base(original, cloner) { }
     54    public QualityPerClockAnalyzer()
    5355      : base() {
    5456      Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "The quality value that should be compared."));
    55       Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The quality value that should be compared."));
    56       Parameters.Add(new ResultParameter<IndexedDataTable<int>>("QualityVsEvaluations", "Data table containing the first hitting graph with evaluations as the x-axis."));
    57       QualityVsEvaluationsParameter.DefaultValue = new IndexedDataTable<int>("Quality vs Evaluations") {
    58         Rows = { new IndexedDataRow<int>("First-hit Graph") { VisualProperties = { ChartType = DataRowVisualProperties.DataRowChartType.StepLine } } }
     57      Parameters.Add(new ResultParameter<TimeSpanValue>("Execution Time", "The execution time."));
     58      Parameters.Add(new ResultParameter<IndexedDataTable<double>>("QualityPerClock", "Data table containing the first hitting graph with elapsed wall clock time (in seconds) as the x-axis."));
     59      QualityPerClockParameter.DefaultValue = new IndexedDataTable<double>("Quality per Clock") {
     60        VisualProperties = {
     61          XAxisTitle = "Elapsed time [s]",
     62          YAxisTitle = "Quality"
     63        },
     64        Rows = { new IndexedDataRow<double>("First-hit Graph") { VisualProperties = {
     65          ChartType = DataRowVisualProperties.DataRowChartType.StepLine,
     66          LineWidth = 3
     67        } } }
    5968      };
    6069    }
    6170
    6271    public override IDeepCloneable Clone(Cloner cloner) {
    63       return new QualityVsEvaluationsAnalyzer(this, cloner);
     72      return new QualityPerClockAnalyzer(this, cloner);
    6473    }
    6574
    6675    public override IOperation Apply() {
     76      var executionTime = Math.Max(ExecutionTimeParameter.ResultValue.Value.TotalSeconds, 0.001);
    6777      var bestQuality = BestQualityParameter.ActualValue.Value;
    68       var evaluations = EvaluatedSolutionsParameter.ActualValue.Value;
    6978
    70       var dataTable = QualityVsEvaluationsParameter.ResultValue;
    71       dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create(evaluations, bestQuality));
     79      var dataTable = QualityPerClockParameter.ResultValue;
     80      dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create(executionTime, bestQuality));
    7281
    7382      return base.Apply();
  • branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/QualityPerEvaluationsAnalyzer.cs

    r12764 r12771  
    3030
    3131namespace HeuristicLab.Analysis {
    32   [Item("QualityVsEvaluationsAnalyzer", @"Creates a plot of the solution quality with respect to the number of evaluated solutions.")]
     32  [Item("QualityPerEvaluationsAnalyzer", @"Creates a plot of the solution quality with respect to the number of evaluated solutions.")]
    3333  [StorableClass]
    34   public class QualityVsEvaluationsAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {
     34  public class QualityPerEvaluationsAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {
    3535    public virtual bool EnabledByDefault {
    3636      get { return false; }
     
    4343      get { return (ILookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
    4444    }
    45     public IResultParameter<IndexedDataTable<int>> QualityVsEvaluationsParameter {
    46       get { return (IResultParameter<IndexedDataTable<int>>)Parameters["QualityVsEvaluations"]; }
     45    public IResultParameter<IndexedDataTable<double>> QualityPerEvaluationsParameter {
     46      get { return (IResultParameter<IndexedDataTable<double>>)Parameters["QualityPerEvaluations"]; }
    4747    }
    4848
    4949    [StorableConstructor]
    50     protected QualityVsEvaluationsAnalyzer(bool deserializing) : base(deserializing) { }
    51     protected QualityVsEvaluationsAnalyzer(QualityVsEvaluationsAnalyzer original, Cloner cloner) : base(original, cloner) { }
    52     public QualityVsEvaluationsAnalyzer()
     50    protected QualityPerEvaluationsAnalyzer(bool deserializing) : base(deserializing) { }
     51    protected QualityPerEvaluationsAnalyzer(QualityPerEvaluationsAnalyzer original, Cloner cloner) : base(original, cloner) { }
     52    public QualityPerEvaluationsAnalyzer()
    5353      : base() {
    5454      Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "The quality value that should be compared."));
    5555      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The quality value that should be compared."));
    56       Parameters.Add(new ResultParameter<IndexedDataTable<int>>("QualityVsEvaluations", "Data table containing the first hitting graph with evaluations as the x-axis."));
    57       QualityVsEvaluationsParameter.DefaultValue = new IndexedDataTable<int>("Quality vs Evaluations") {
    58         Rows = { new IndexedDataRow<int>("First-hit Graph") { VisualProperties = { ChartType = DataRowVisualProperties.DataRowChartType.StepLine } } }
     56      Parameters.Add(new ResultParameter<IndexedDataTable<double>>("QualityPerEvaluations", "Data table containing the first hitting graph with evaluations as the x-axis."));
     57      QualityPerEvaluationsParameter.DefaultValue = new IndexedDataTable<double>("Quality per Evaluations") {
     58        VisualProperties = {
     59          XAxisTitle = "Evaluations",
     60          YAxisTitle = "Quality"
     61        },
     62        Rows = { new IndexedDataRow<double>("First-hit Graph") { VisualProperties = {
     63          ChartType = DataRowVisualProperties.DataRowChartType.StepLine,
     64          LineWidth = 3
     65        } } }
    5966      };
    6067    }
    6168
    6269    public override IDeepCloneable Clone(Cloner cloner) {
    63       return new QualityVsEvaluationsAnalyzer(this, cloner);
     70      return new QualityPerEvaluationsAnalyzer(this, cloner);
    6471    }
    6572
    6673    public override IOperation Apply() {
    6774      var bestQuality = BestQualityParameter.ActualValue.Value;
    68       var evaluations = EvaluatedSolutionsParameter.ActualValue.Value;
     75      var evaluations = Math.Max(EvaluatedSolutionsParameter.ActualValue.Value, 1);
    6976
    70       var dataTable = QualityVsEvaluationsParameter.ResultValue;
    71       dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create(evaluations, bestQuality));
     77      var dataTable = QualityPerEvaluationsParameter.ResultValue;
     78      dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create((double)evaluations, bestQuality));
    7279
    7380      return base.Apply();
Note: See TracChangeset for help on using the changeset viewer.