Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11681


Ignore:
Timestamp:
12/12/14 20:50:13 (9 years ago)
Author:
bgoldman
Message:

#2282 Added plots for the number of solutions being stored and the total number of levels in the pyramid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs

    r11672 r11681  
    4747    // Tracks all solutions in Pyramid for quick membership checks
    4848    private HashSet<bool[]> seen = new HashSet<bool[]>(new EnumerableBoolEqualityComparer());
    49    
     49
    5050    #region ParameterNames
    5151    private const string MaximumIterationsParameterName = "Maximum Iterations";
     
    5454    private const string SetSeedRandomlyParameterName = "SetSeedRandomly";
    5555    #endregion
    56    
     56
    5757    #region ParameterProperties
    5858    public IFixedValueParameter<IntValue> MaximumIterationsParameter {
     
    126126    private DataRow ResultsQualitiesIteration {
    127127      get { return ResultsQualities.Rows["Iteration Quality"]; }
     128    }
     129
     130
     131    private DataRow ResultsLevels {
     132      get { return ((DataTable)Results["Pyramid Levels"].Value).Rows["Levels"]; }
     133    }
     134
     135    private DataRow ResultsSolutions {
     136      get { return ((DataTable)Results["Stored Solutions"].Value).Rows["Solutions"]; }
    128137    }
    129138    #endregion
     
    202211      Results.Add(new Result("Qualities", table));
    203212
     213      table = new DataTable("Pyramid Levels");
     214      table.Rows.Add(new DataRow("Levels"));
     215      Results.Add(new Result("Pyramid Levels", table));
     216
     217      table = new DataTable("Stored Solutions");
     218      table.Rows.Add(new DataRow("Solutions"));
     219      Results.Add(new Result("Stored Solutions", table));
     220
    204221      // Loop until iteration limit reached or canceled.
    205222      for (ResultsIterations = 0; ResultsIterations < MaximumIterations; ResultsIterations++) {
     
    219236          ResultsQualitiesBest.Values.Add(tracker.BestQuality);
    220237          ResultsQualitiesIteration.Values.Add(fitness);
     238          ResultsLevels.Values.Add(pyramid.Count);
     239          ResultsSolutions.Values.Add(seen.Count);
    221240        }
    222241      }
Note: See TracChangeset for help on using the changeset viewer.