Changeset 12998
- Timestamp:
- 10/13/15 09:57:42 (9 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs
r12997 r12998 295 295 Parameters.Add(new ValueParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.", new IntValue(1))); 296 296 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 }); 297 Parameters.Add(new ValueParameter<BoolValue>("PlusSelection", "Include the parents in the selection of the invividuals for the next generation.", new BoolValue(false)) { Hidden = true });297 Parameters.Add(new ValueParameter<BoolValue>("PlusSelection", "Include the parents in the selection of the invividuals for the next generation.", new BoolValue(false))); 298 298 299 299 Parameters.Add(new ValueParameter<EnumValue<AgingScheme>>("AgingScheme", "The aging scheme for setting the age-limits for the layers.", new EnumValue<AgingScheme>(ALPS.AgingScheme.Polynomial))); -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs
r12997 r12998 172 172 var mainLoop = new GeneticAlgorithmMainLoop(); 173 173 174 var oldInitialOp = mainLoop.OperatorGraph.InitialOperator; 174 175 var selector = mainLoop.OperatorGraph.Iterate().OfType<Placeholder>().First(o => o.OperatorParameter.ActualName == "Selector"); 175 176 var crossover = mainLoop.OperatorGraph.Iterate().OfType<Placeholder>().First(o => o.OperatorParameter.ActualName == "Crossover"); … … 183 184 var replacementBranch = new ConditionalBranch() { Name = "PlusSelection?" }; 184 185 186 // Set new initial operator 185 187 mainLoop.OperatorGraph.InitialOperator = numberOfSubScopesBranch; 188 189 // Remove unused operators 190 while (oldInitialOp != selector) { 191 mainLoop.OperatorGraph.Operators.Remove(oldInitialOp); 192 var op = oldInitialOp as SingleSuccessorOperator; 193 oldInitialOp = op != null ? op.Successor : null; 194 } 186 195 187 196 numberOfSubScopesBranch.ConditionParameter.ActualName = "PlusSelection";
Note: See TracChangeset
for help on using the changeset viewer.