Changeset 3699


Ignore:
Timestamp:
05/07/10 14:19:55 (11 years ago)
Author:
abeham
Message:

#893, #976, #839

  • fixed replacement in OSGA, Island OSGA, and SASEGASA
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs

    r3659 r3699  
    137137      OffspringSelector offspringSelector = new OffspringSelector();
    138138      SubScopesProcessor subScopesProcessor2 = new SubScopesProcessor();
    139       BestSelector bestSelector = new BestSelector();
     139      BestSelector bestSelector1 = new BestSelector();
     140      BestSelector bestSelector2 = new BestSelector();
    140141      RightReducer rightReducer = new RightReducer();
     142      LeftReducer leftReducer = new LeftReducer();
    141143      MergingReducer mergingReducer = new MergingReducer();
    142144     
     
    209211      offspringSelector.WinnersParameter.ActualName = "OSWinners";
    210212
    211       bestSelector.CopySelected = new BoolValue(false);
    212       bestSelector.MaximizationParameter.ActualName = MaximizationParameter.Name;
    213       bestSelector.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
    214       bestSelector.QualityParameter.ActualName = QualityParameter.Name;
     213      bestSelector1.CopySelected = new BoolValue(false);
     214      bestSelector1.MaximizationParameter.ActualName = MaximizationParameter.Name;
     215      bestSelector1.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
     216      bestSelector1.QualityParameter.ActualName = QualityParameter.Name;
     217
     218      bestSelector2.CopySelected = new BoolValue(false);
     219      bestSelector2.MaximizationParameter.ActualName = MaximizationParameter.Name;
     220      bestSelector2.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
     221      bestSelector2.QualityParameter.ActualName = QualityParameter.Name;
    215222      #endregion
    216223
     
    246253      offspringSelector.OffspringCreator = selector;
    247254      offspringSelector.Successor = subScopesProcessor2;
    248       subScopesProcessor2.Operators.Add(bestSelector);
    249       subScopesProcessor2.Operators.Add(new EmptyOperator());
     255      subScopesProcessor2.Operators.Add(bestSelector1);
     256      subScopesProcessor2.Operators.Add(bestSelector2);
    250257      subScopesProcessor2.Successor = mergingReducer;
    251       bestSelector.Successor = rightReducer;
     258      bestSelector1.Successor = rightReducer;
    252259      rightReducer.Successor = null;
     260      bestSelector2.Successor = leftReducer;
     261      leftReducer.Successor = null;
    253262      mergingReducer.Successor = null;
    254263      #endregion
Note: See TracChangeset for help on using the changeset viewer.