Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3713 for trunk/sources


Ignore:
Timestamp:
05/08/10 02:17:21 (15 years ago)
Author:
abeham
Message:

#839, #893, #976

  • changed elites replacement in all offspring selection algorithms
File:
1 edited

Legend:

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

    r3699 r3713  
    137137      OffspringSelector offspringSelector = new OffspringSelector();
    138138      SubScopesProcessor subScopesProcessor2 = new SubScopesProcessor();
    139       BestSelector bestSelector1 = new BestSelector();
    140       BestSelector bestSelector2 = new BestSelector();
     139      BestSelector bestSelector = new BestSelector();
     140      WorstSelector worstSelector = new WorstSelector();
    141141      RightReducer rightReducer = new RightReducer();
    142142      LeftReducer leftReducer = new LeftReducer();
     
    211211      offspringSelector.WinnersParameter.ActualName = "OSWinners";
    212212
    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;
     213      bestSelector.CopySelected = new BoolValue(false);
     214      bestSelector.MaximizationParameter.ActualName = MaximizationParameter.Name;
     215      bestSelector.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
     216      bestSelector.QualityParameter.ActualName = QualityParameter.Name;
     217
     218      worstSelector.CopySelected = new BoolValue(false);
     219      worstSelector.MaximizationParameter.ActualName = MaximizationParameter.Name;
     220      worstSelector.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
     221      worstSelector.QualityParameter.ActualName = QualityParameter.Name;
    222222      #endregion
    223223
     
    253253      offspringSelector.OffspringCreator = selector;
    254254      offspringSelector.Successor = subScopesProcessor2;
    255       subScopesProcessor2.Operators.Add(bestSelector1);
    256       subScopesProcessor2.Operators.Add(bestSelector2);
     255      subScopesProcessor2.Operators.Add(bestSelector);
     256      subScopesProcessor2.Operators.Add(worstSelector);
    257257      subScopesProcessor2.Successor = mergingReducer;
    258       bestSelector1.Successor = rightReducer;
     258      bestSelector.Successor = rightReducer;
    259259      rightReducer.Successor = null;
    260       bestSelector2.Successor = leftReducer;
     260      worstSelector.Successor = leftReducer;
    261261      leftReducer.Successor = null;
    262262      mergingReducer.Successor = null;
Note: See TracChangeset for help on using the changeset viewer.