Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10119 for branches


Ignore:
Timestamp:
11/10/13 22:12:04 (11 years ago)
Author:
ascheibe
Message:

#1886 improved RealVectorConvexHullModifier

Location:
branches/HeuristicLab.Analysis.AlgorithmBehavior
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionModifiers/RealVectorConvexHullModifier.cs

    r10116 r10119  
    2727using HeuristicLab.Common;
    2828using HeuristicLab.Core;
     29using HeuristicLab.Data;
    2930using HeuristicLab.Encodings.RealVectorEncoding;
    3031using HeuristicLab.Optimization;
     
    5354
    5455        var sols = solutionCache.GetSolutionsFromGeneration(i);
    55         DataTable dt = new DataTable("Convex Hull Volume over Generations");
     56        DataTable volDataTable = new DataTable("Convex hull volume over generations");
     57        DataTable nrOfPointsTable = new DataTable("Nr. of points of convex hull");
     58        DoubleValue overallVolumn = new DoubleValue();
     59
    5660        DataRow dtVolumeRow = new DataRow("Volume");
    57         DataRow dtNrPointsRow = new DataRow("Nr. of Points");
    58         dt.Rows.Add(dtVolumeRow);
    59         dt.Rows.Add(dtNrPointsRow);
     61        DataRow dtNrPointsRow = new DataRow("Nr. of points");
     62        volDataTable.Rows.Add(dtVolumeRow);
     63        nrOfPointsTable.Rows.Add(dtNrPointsRow);
     64
     65        List<double[]> curHull = null;
    6066
    6167        while (sols.Count != 0) {
     
    6672          dtNrPointsRow.Values.Add(convexHull.Count);
    6773
     74          if (curHull == null) {
     75            curHull = convexHull;
     76          } else {
     77            var newPHull = curHull.Union(convexHull).ToArray();
     78            curHull = LPHull.Calculate(newPHull);
     79          }
     80
    6881          sols = solutionCache.GetSolutionsFromGeneration(++i);
    6982        }
     83        overallVolumn.Value = ConvexHullMeasures.CalculateVolume(curHull);
    7084
    71         run.Results.Add("Convex Hull Measures", dt);
     85        run.Results.Add("Overall volumn: ", overallVolumn);
     86        run.Results.Add("Convex hull volumn", volDataTable);
     87        run.Results.Add("Convex nr. of points", nrOfPointsTable);
    7288      }
    7389    }
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RunCollectionModifiers/RunCollectionModifierTask.cs

    r10117 r10119  
    3030  [StorableClass]
    3131  public class RunCollectionModifierTask : ItemTask {
    32     /*public override bool IsParallelizable {
    33       get { return false; }
    34     } */
    35 
    3632    public new RunCollectionModifierExecutable Item {
    3733      get { return (RunCollectionModifierExecutable)base.Item; }
Note: See TracChangeset for help on using the changeset viewer.