Changeset 9756 for branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
- Timestamp:
- 07/25/13 13:39:13 (11 years ago)
- Location:
- branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm (added) merged: 9456,9462,9569,9591-9592
- Property svn:mergeinfo changed
-
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
r8121 r9756 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 79 79 get { return (ValueParameter<IntValue>)Parameters["Elites"]; } 80 80 } 81 private IFixedValueParameter<BoolValue> ReevaluateElitesParameter { 82 get { return (IFixedValueParameter<BoolValue>)Parameters["ReevaluateElites"]; } 83 } 81 84 private ValueParameter<IntValue> MaximumGenerationsParameter { 82 85 get { return (ValueParameter<IntValue>)Parameters["MaximumGenerations"]; } … … 143 146 get { return ElitesParameter.Value; } 144 147 set { ElitesParameter.Value = value; } 148 } 149 public bool ReevaluteElites { 150 get { return ReevaluateElitesParameter.Value.Value; } 151 set { ReevaluateElitesParameter.Value.Value = value; } 145 152 } 146 153 public IntValue MaximumGenerations { … … 205 212 [StorableHook(HookType.AfterDeserialization)] 206 213 private void AfterDeserialization() { 207 #region Backwards Compatibility 214 // BackwardsCompatibility3.3 215 #region Backwards compatible code, remove with 3.4 208 216 if (successfulOffspringAnalyzer == null) 209 217 successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer(); 218 if (!Parameters.ContainsKey("ReevaluateElites")) { 219 Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", (BoolValue)new BoolValue(false).AsReadOnly()) { Hidden = true }); 220 } 210 221 #endregion 211 222 … … 232 243 Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions.")); 233 244 Parameters.Add(new ValueParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.", new IntValue(1))); 245 Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", new BoolValue(false)) { Hidden = true }); 234 246 Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed.", new IntValue(1000))); 235 247 Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved.", new DoubleValue(1))); … … 274 286 mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name; 275 287 mainLoop.ElitesParameter.ActualName = ElitesParameter.Name; 288 mainLoop.ReevaluateElitesParameter.ActualName = ReevaluateElitesParameter.Name; 276 289 mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions"; 277 290 mainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name;
Note: See TracChangeset
for help on using the changeset viewer.