Free cookie consent management tool by TermsFeed Policy Generator

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

#1886 improved RealVectorConvexHullModifier

File:
1 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    }
Note: See TracChangeset for help on using the changeset viewer.