Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/14 01:30:28 (10 years ago)
Author:
ascheibe
Message:

#1886 added calculation of the ratio between the convex hull volume and the max. hypercube volume

File:
1 edited

Legend:

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

    r10275 r10279  
    7373        DataTable centroidMotionTable = new DataTable(CentroidMotionName);
    7474        DoubleValue overallVolume = new DoubleValue();
     75        DoubleValue overallVolumeRatio = new DoubleValue();
    7576
    7677        DataRow dtVolumeRow = new DataRow("Volume");
     
    112113        if (completeHull != null && completeHull.Any() && completeHull.First().Length < completeHull.Count) {
    113114          overallVolume.Value = ConvexHullMeasures.CalculateVolume(completeHull);
     115          var boundsMatrix = run.Parameters["Bounds"] as DoubleMatrix;
     116          var bounds = new double[] { boundsMatrix[0, 0], boundsMatrix[0, 1] };
     117          double hyperHullVolume = ConvexHullMeasures.CalculateHypercubeVolume(bounds, BestSolutionParameter.Value.Length);
     118          overallVolumeRatio.Value = overallVolume.Value / hyperHullVolume;
    114119        } else {
    115120          overallVolume.Value = double.NaN;
     121          overallVolumeRatio.Value = double.NaN;
    116122        }
    117123
     
    121127
    122128        run.Results["Overall volume"] = overallVolume;
     129        run.Results["Overall volume ratio"] = overallVolumeRatio;
    123130        run.Results["Overall diameter"] = new DoubleValue(ConvexHullMeasures.CalculateMaxDiameter(completeHull));
    124131        run.Results["Convex hull volume"] = volDataTable;
Note: See TracChangeset for help on using the changeset viewer.