Changeset 10643 for trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
- Timestamp:
- 03/21/14 14:20:03 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r9592 r10643 133 133 get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; } 134 134 } 135 private IFixedValueParameter<BoolValue> FillPopulationWithParentsParameter { 136 get { return (IFixedValueParameter<BoolValue>)Parameters["FillPopulationWithParents"]; } 137 } 135 138 #endregion 136 139 … … 200 203 set { ReevaluateElitesParameter.Value.Value = value; } 201 204 } 202 p rivateDoubleValue SuccessRatio {205 public DoubleValue SuccessRatio { 203 206 get { return SuccessRatioParameter.Value; } 204 207 set { SuccessRatioParameter.Value = value; } 205 208 } 206 p rivateDoubleValue ComparisonFactorLowerBound {209 public DoubleValue ComparisonFactorLowerBound { 207 210 get { return ComparisonFactorLowerBoundParameter.Value; } 208 211 set { ComparisonFactorLowerBoundParameter.Value = value; } 209 212 } 210 p rivateDoubleValue ComparisonFactorUpperBound {213 public DoubleValue ComparisonFactorUpperBound { 211 214 get { return ComparisonFactorUpperBoundParameter.Value; } 212 215 set { ComparisonFactorUpperBoundParameter.Value = value; } … … 216 219 set { ComparisonFactorModifierParameter.Value = value; } 217 220 } 218 p rivateDoubleValue MaximumSelectionPressure {221 public DoubleValue MaximumSelectionPressure { 219 222 get { return MaximumSelectionPressureParameter.Value; } 220 223 set { MaximumSelectionPressureParameter.Value = value; } 221 224 } 222 p rivateBoolValue OffspringSelectionBeforeMutation {225 public BoolValue OffspringSelectionBeforeMutation { 223 226 get { return OffspringSelectionBeforeMutationParameter.Value; } 224 227 set { OffspringSelectionBeforeMutationParameter.Value = value; } … … 235 238 get { return MaximumEvaluatedSolutionsParameter.Value; } 236 239 set { MaximumEvaluatedSolutionsParameter.Value = value; } 240 } 241 public bool FillPopulationWithParents { 242 get { return FillPopulationWithParentsParameter.Value.Value; } 243 set { FillPopulationWithParentsParameter.Value.Value = value; } 237 244 } 238 245 private RandomCreator RandomCreator { … … 271 278 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 279 } 280 if (!Parameters.ContainsKey("FillPopulationWithParents")) 281 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 }); 273 282 #endregion 274 283 … … 315 324 Parameters.Add(new ValueParameter<MultiAnalyzer>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer())); 316 325 Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue))); 326 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(true)) { Hidden = true }); 317 327 318 328 RandomCreator randomCreator = new RandomCreator(); … … 379 389 mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name; 380 390 mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions"; 391 mainLoop.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name; 381 392 mainLoop.Successor = null; 382 393
Note: See TracChangeset
for help on using the changeset viewer.