Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/21/10 22:05:40 (14 years ago)
Author:
abeham
Message:

added first draft of SASEGASA #839

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs

    r3413 r3479  
    3434  public class OffspringSelector : SingleSuccessorOperator {
    3535
    36     public ValueLookupParameter<IntValue> PopulationSizeParameter {
    37       get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }
    38     }
    3936    public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
    4037      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
     
    6663    public OffspringSelector()
    6764      : base() {
    68       Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The number of offspring to create."));
    6965      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure which prematurely terminates the offspring selection step."));
    7066      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful offspring that has to be produced."));
     
    7773
    7874    public override IOperation Apply() {
    79       int populationSize = PopulationSizeParameter.ActualValue.Value;
    8075      double maxSelPress = MaximumSelectionPressureParameter.ActualValue.Value;
    8176      double successRatio = SuccessRatioParameter.ActualValue.Value;
     
    8378      IScope parents = scope.SubScopes[0];
    8479      IScope children = scope.SubScopes[1];
     80      int populationSize = parents.SubScopes.Count;
    8581
    8682      // retrieve actual selection pressure and success ratio
Note: See TracChangeset for help on using the changeset viewer.