Changeset 9616 for branches/HivePerformance/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
- Timestamp:
- 06/12/13 15:02:47 (12 years ago)
- Location:
- branches/HivePerformance/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 9540,9542-9544,9552-9555,9568-9569,9587,9590-9592,9600,9607-9608,9610-9611,9613
- Property svn:mergeinfo changed
-
branches/HivePerformance/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r9539 r9616 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.