- Timestamp:
- 07/19/20 14:52:56 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs
r17679 r17686 80 80 private const string GeneratedReferencePointsResultName = "Generated Reference Points"; 81 81 private const string CurrentGenerationResultName = "Generations"; 82 private const string GenerationalDistanceResultName = "Generational Distance"; 83 private const string InvertedGenerationalDistanceResultName = "Inverted Generational Distance"; 82 84 private const string ScatterPlotResultName = "Scatter Plot"; 83 85 private const string CurrentFrontResultName = "Pareto Front"; // Do not touch this … … 174 176 get { return (IntValue)Results[CurrentGenerationResultName].Value; } 175 177 set { Results[CurrentGenerationResultName].Value = value; } 178 } 179 180 public DoubleValue ResultsGenerationalDistance 181 { 182 get { return (DoubleValue)Results[GenerationalDistanceResultName].Value;} 183 set { Results[GenerationalDistanceResultName].Value = value; } 184 } 185 186 public DoubleValue ResultsInvertedGenerationalDistance 187 { 188 get { return (DoubleValue)Results[InvertedGenerationalDistanceResultName].Value; } 189 set { Results[InvertedGenerationalDistanceResultName].Value = value; } 176 190 } 177 191 … … 269 283 Results.Add(new Result(CurrentFrontResultName, "The Pareto Front", new DoubleMatrix())); 270 284 Results.Add(new Result(CurrentGenerationResultName, "The current generation", new IntValue(1))); 285 Results.Add(new Result(GenerationalDistanceResultName, "The generational distance to an optimal pareto front defined in the Problem", new DoubleValue(double.NaN))); 286 Results.Add(new Result(InvertedGenerationalDistanceResultName, "The inverted generational distance to an optimal pareto front defined in the Problem", new DoubleValue(double.NaN))); 271 287 Results.Add(new Result(ScatterPlotResultName, "A scatterplot displaying the evaluated solutions and (if available) the analytically optimal front", new ParetoFrontScatterPlot())); 272 288 … … 324 340 ResultsScatterPlot = new ParetoFrontScatterPlot(solutions.Select(x => x.Fitness).ToArray(), solutions.Select(x => x.Chromosome.ToArray()).ToArray(), ResultsScatterPlot.ParetoFront, ResultsScatterPlot.Objectives, ResultsScatterPlot.ProblemSize); 325 341 ResultsSolutions = solutions.Select(s => s.Chromosome.ToArray()).ToMatrix(); 342 343 var problem = Problem as MultiObjectiveTestFunctionProblem; 344 if (problem == null) return; 345 346 ResultsGenerationalDistance = new DoubleValue(problem.BestKnownFront != null ? GenerationalDistance.Calculate(solutions.Select(s => s.Fitness), problem.BestKnownFront.ToJaggedArray(), 1) : double.NaN); 347 ResultsInvertedGenerationalDistance = new DoubleValue(problem.BestKnownFront != null ? InvertedGenerationalDistance.Calculate(solutions.Select(s => s.Fitness), problem.BestKnownFront.ToJaggedArray(), 1) : double.NaN); 348 326 349 Problem.Analyze( 327 350 solutions.Select(s => (Individual)new SingleEncodingIndividual(Problem.Encoding, new Scope { Variables = { new Variable(Problem.Encoding.Name, s.Chromosome) } })).ToArray(),
Note: See TracChangeset
for help on using the changeset viewer.