Changeset 9756 for branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.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/IslandOffspringSelectionGeneticAlgorithm.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. … … 100 100 get { return (ValueParameter<IntValue>)Parameters["Elites"]; } 101 101 } 102 private IFixedValueParameter<BoolValue> ReevaluateElitesParameter { 103 get { return (IFixedValueParameter<BoolValue>)Parameters["ReevaluateElites"]; } 104 } 102 105 private ValueLookupParameter<DoubleValue> SuccessRatioParameter { 103 106 get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; } … … 192 195 get { return ElitesParameter.Value; } 193 196 set { ElitesParameter.Value = value; } 197 } 198 public bool ReevaluteElites { 199 get { return ReevaluateElitesParameter.Value.Value; } 200 set { ReevaluateElitesParameter.Value.Value = value; } 194 201 } 195 202 private DoubleValue SuccessRatio { … … 257 264 [StorableHook(HookType.AfterDeserialization)] 258 265 private void AfterDeserialization() { 259 #region Backwards Compatibility 266 // BackwardsCompatibility3.3 267 #region Backwards compatible code, remove with 3.4 260 268 if (successfulOffspringAnalyzer == null) 261 269 successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer(); 270 if (!Parameters.ContainsKey("ReevaluateElites")) { 271 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 }); 272 } 262 273 #endregion 263 274 … … 293 304 Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions.")); 294 305 Parameters.Add(new ValueParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.", new IntValue(1))); 306 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 }); 295 307 Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved.", new DoubleValue(1))); 296 308 Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start).", new DoubleValue(0))); … … 355 367 mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name; 356 368 mainLoop.ElitesParameter.ActualName = ElitesParameter.Name; 369 mainLoop.ReevaluateElitesParameter.ActualName = ReevaluateElitesParameter.Name; 357 370 mainLoop.MutatorParameter.ActualName = MutatorParameter.Name; 358 371 mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
Note: See TracChangeset
for help on using the changeset viewer.