Changeset 3479 for trunk/sources/HeuristicLab.Selection
- Timestamp:
- 04/21/10 22:05:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs
r3413 r3479 34 34 public class OffspringSelector : SingleSuccessorOperator { 35 35 36 public ValueLookupParameter<IntValue> PopulationSizeParameter {37 get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }38 }39 36 public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter { 40 37 get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; } … … 66 63 public OffspringSelector() 67 64 : base() { 68 Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The number of offspring to create."));69 65 Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure which prematurely terminates the offspring selection step.")); 70 66 Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful offspring that has to be produced.")); … … 77 73 78 74 public override IOperation Apply() { 79 int populationSize = PopulationSizeParameter.ActualValue.Value;80 75 double maxSelPress = MaximumSelectionPressureParameter.ActualValue.Value; 81 76 double successRatio = SuccessRatioParameter.ActualValue.Value; … … 83 78 IScope parents = scope.SubScopes[0]; 84 79 IScope children = scope.SubScopes[1]; 80 int populationSize = parents.SubScopes.Count; 85 81 86 82 // retrieve actual selection pressure and success ratio
Note: See TracChangeset
for help on using the changeset viewer.