- Timestamp:
- 07/13/20 14:20:24 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs
r17665 r17667 11 11 using HeuristicLab.Optimization; 12 12 using HeuristicLab.Parameters; 13 using HeuristicLab.Problems.TestFunctions.MultiObjective; 13 14 using HeuristicLab.Random; 14 15 … … 41 42 } 42 43 43 public int NumberOfObjectives => Problem.Maximization.Length; 44 public int NumberOfObjectives 45 { 46 get 47 { 48 if (!(Problem is MultiObjectiveTestFunctionProblem testFunctionProblem)) throw new NotSupportedException("Only test multi objective test function problems are supported"); 49 return testFunctionProblem.Objectives; 50 } 51 } 44 52 45 53 #endregion ProblemProperties … … 211 219 base.Initialize(cancellationToken); 212 220 213 PopulationSize.Value = ReferencePoint.GetNumberOfGeneratedReferencePoints(Problem.Maximization.Length); 221 int pop = ReferencePoint.GetNumberOfGeneratedReferencePoints(NumberOfObjectives); 222 PopulationSize.Value = pop; 214 223 InitResults(); 215 224 InitReferencePoints(); … … 264 273 // create copies of generated reference points (to preserve the original ones for 265 274 // the next generation) maybe todo: use cloner? 266 //ToNextGeneration(CreateCopyOfReferencePoints());267 275 268 276 List<Solution> qt = Mutate(Recombine(solutions));
Note: See TracChangeset
for help on using the changeset viewer.