Changeset 10644 for stable/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
- Timestamp:
- 03/21/14 14:59:41 (10 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 10639,10643
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
r9673 r10644 112 112 get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; } 113 113 } 114 private IFixedValueParameter<BoolValue> FillPopulationWithParentsParameter { 115 get { return (IFixedValueParameter<BoolValue>)Parameters["FillPopulationWithParents"]; } 116 } 114 117 #endregion 115 118 … … 190 193 get { return MaximumEvaluatedSolutionsParameter.Value; } 191 194 set { MaximumEvaluatedSolutionsParameter.Value = value; } 195 } 196 public bool FillPopulationWithParents { 197 get { return FillPopulationWithParentsParameter.Value.Value; } 198 set { FillPopulationWithParentsParameter.Value.Value = value; } 192 199 } 193 200 private RandomCreator RandomCreator { … … 219 226 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 227 } 228 if (!Parameters.ContainsKey("FillPopulationWithParents")) 229 Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true }); 221 230 #endregion 222 231 … … 254 263 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer())); 255 264 Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue))); 265 Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true }); 256 266 257 267 RandomCreator randomCreator = new RandomCreator(); … … 297 307 mainLoop.SelectorParameter.ActualName = SelectorParameter.Name; 298 308 mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name; 309 mainLoop.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name; 299 310 300 311 foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
Note: See TracChangeset
for help on using the changeset viewer.