Changeset 11202 for branches/HiveStatistics/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs
- Timestamp:
- 07/18/14 12:01:13 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs
r9076 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 91 91 public ValueLookupParameter<IntValue> ElitesParameter { 92 92 get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; } 93 } 94 public IValueLookupParameter<BoolValue> ReevaluateElitesParameter { 95 get { return (IValueLookupParameter<BoolValue>)Parameters["ReevaluateElites"]; } 93 96 } 94 97 public ValueLookupParameter<ResultCollection> ResultsParameter { … … 144 147 Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions.")); 145 148 Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.")); 149 Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)")); 146 150 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection to store the results.")); 147 151 Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to the analyze the islands.")); … … 194 198 Placeholder analyzer2 = new Placeholder(); 195 199 ConditionalBranch generationsTerminationCondition = new ConditionalBranch(); 200 ConditionalBranch reevaluateElitesBranch = new ConditionalBranch(); 196 201 197 202 … … 305 310 generationsTerminationCondition.Name = "Terminate?"; 306 311 generationsTerminationCondition.ConditionParameter.ActualName = "TerminateGenerations"; 312 313 reevaluateElitesBranch.ConditionParameter.ActualName = "ReevaluateElites"; 314 reevaluateElitesBranch.Name = "Reevaluate elites ?"; 307 315 #endregion 308 316 … … 345 353 evaluator.Successor = null; 346 354 subScopesCounter.Successor = null; 347 subScopesCounter.Successor = null;348 355 subScopesProcessor2.Operators.Add(bestSelector); 349 356 subScopesProcessor2.Operators.Add(new EmptyOperator()); … … 351 358 mergingReducer.Successor = islandAnalyzer2; 352 359 bestSelector.Successor = rightReducer; 353 rightReducer.Successor = null; 360 rightReducer.Successor = reevaluateElitesBranch; 361 reevaluateElitesBranch.TrueBranch = uniformSubScopesProcessor3; 362 reevaluateElitesBranch.FalseBranch = null; 363 reevaluateElitesBranch.Successor = null; 354 364 islandAnalyzer2.Successor = islandGenerationsCounter; 355 365 islandGenerationsCounter.Successor = checkIslandGenerationsReachedMaximum; … … 369 379 } 370 380 381 [StorableHook(HookType.AfterDeserialization)] 382 private void AfterDeserialization() { 383 // BackwardsCompatibility3.3 384 #region Backwards compatible code, remove with 3.4 385 if (!Parameters.ContainsKey("ReevaluateElites")) { 386 Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)")); 387 } 388 #endregion 389 } 390 371 391 public override IOperation Apply() { 372 392 if (CrossoverParameter.ActualValue == null)
Note: See TracChangeset
for help on using the changeset viewer.