Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4601


Ignore:
Timestamp:
10/16/10 16:24:33 (14 years ago)
Author:
abeham
Message:

#1040

  • Updated BasicMultiObjectiveQualityAnalyzer to add the scopes of the pareto front as a result object
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NSGA2/HeuristicLab.Algorithms.NSGA2/3.3/BasicMultiObjectiveQualityAnalyzer.cs

    r4086 r4601  
    5555      ItemArray<DoubleArray> qualities = QualitiesParameter.ActualValue;
    5656      ResultCollection results = ResultsParameter.ActualValue;
     57     
     58      bool populationLevel = RankParameter.Depth == 1;
    5759
    5860      int objectives = qualities[0].Length;
    5961      int frontSize = ranks.Count(x => x.Value == 0);
     62      ItemArray<IScope> paretoArchive = null;
     63      if (populationLevel) paretoArchive = new ItemArray<IScope>(frontSize);
    6064
    6165      DoubleMatrix front = new DoubleMatrix(frontSize, objectives);
     
    6569          for (int k = 0; k < objectives; k++)
    6670            front[counter, k] = qualities[i][k];
     71          if (populationLevel) {
     72            paretoArchive[counter] = (IScope)ExecutionContext.Scope.SubScopes[i].Clone();
     73          }
    6774          counter++;
    6875        }
     
    7380      else results.Add(new Result("Pareto Front", front));
    7481
     82      if (populationLevel) {
     83        if (results.ContainsKey("Pareto Archive"))
     84          results["Pareto Archive"].Value = paretoArchive;
     85        else results.Add(new Result("Pareto Archive", paretoArchive));
     86      }
    7587      return base.Apply();
    7688    }
Note: See TracChangeset for help on using the changeset viewer.