- Timestamp:
- 03/18/19 17:24:30 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs
r12504 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 39 39 /// </summary> 40 40 [Item("NSGA-II", "The Nondominated Sorting Genetic Algorithm II was introduced in Deb et al. 2002. A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6(2), pp. 182-197.")] 41 [Creatable(CreatableAttribute.Categories. Algorithms, Priority = 100)]41 [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 135)] 42 42 [StorableClass] 43 43 public class NSGA2 : HeuristicOptimizationEngineAlgorithm, IStorableContent { … … 176 176 Parameters.Add(new ConstrainedValueParameter<ICrossover>("Crossover", "The operator used to cross solutions.")); 177 177 Parameters.Add(new ValueParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution.", new PercentValue(0.05))); 178 Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));178 Parameters.Add(new ConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions.")); 179 179 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer())); 180 180 Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed.", new IntValue(1000))); … … 326 326 if (!Parameters.ContainsKey("DominateOnEqualQualities")) 327 327 Parameters.Add(new FixedValueParameter<BoolValue>("DominateOnEqualQualities", "Flag which determines wether solutions with equal quality values should be treated as dominated.", new BoolValue(false))); 328 var optionalMutatorParameter = MutatorParameter as OptionalConstrainedValueParameter<IManipulator>; 329 if (optionalMutatorParameter != null) { 330 Parameters.Remove(optionalMutatorParameter); 331 Parameters.Add(new ConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions.")); 332 foreach (var m in optionalMutatorParameter.ValidValues) 333 MutatorParameter.ValidValues.Add(m); 334 if (optionalMutatorParameter.Value == null) MutationProbability.Value = 0; // to guarantee that the old configuration results in the same behavior 335 else Mutator = optionalMutatorParameter.Value; 336 optionalMutatorParameter.ValidValues.Clear(); // to avoid dangling references to the old parameter its valid values are cleared 337 } 328 338 #endregion 329 339 … … 397 407 IManipulator oldMutator = MutatorParameter.Value; 398 408 MutatorParameter.ValidValues.Clear(); 409 IManipulator defaultMutator = Problem.Operators.OfType<IManipulator>().FirstOrDefault(); 399 410 foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name)) 400 411 MutatorParameter.ValidValues.Add(mutator); … … 402 413 IManipulator mutator = MutatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMutator.GetType()); 403 414 if (mutator != null) MutatorParameter.Value = mutator; 404 } 415 else oldMutator = null; 416 } 417 if (oldMutator == null && defaultMutator != null) 418 MutatorParameter.Value = defaultMutator; 405 419 } 406 420 private void UpdateAnalyzers() { -
branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2MainLoop.cs
r12123 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.NSGA2/3.3/Plugin.cs.frame
r13321 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Algorithms.NSGA2 { 25 [Plugin("HeuristicLab.Algorithms.NSGA2", "Provides the non-dominated sorting genetic algorithm (NSGA-II) as described in Deb et al. 2002. A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6(2), pp. 182-197.", "3.3.1 3.$WCREV$")]25 [Plugin("HeuristicLab.Algorithms.NSGA2", "Provides the non-dominated sorting genetic algorithm (NSGA-II) as described in Deb et al. 2002. A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6(2), pp. 182-197.", "3.3.15.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Algorithms.NSGA2-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.NSGA2/3.3/Properties/AssemblyInfo.cs.frame
r13321 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("HEAL")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 5HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2018 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3.1 3.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.15.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.