Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/04/15 17:28:03 (9 years ago)
Author:
pfleck
Message:

#2269 Added ReduceToPopulationSize parameter to control if the population is reduced to the PopulationSize after elder migration (default) or the layer can have more than PopulationSize individuals until the next generation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs

    r13113 r13117  
    162162      var mergingReducer = new MergingReducer();
    163163      var subScopesCounter = new SubScopesCounter();
     164      var reduceToPopulationSizeBranch = new ConditionalBranch() { Name = "ReduceToPopulationSize?" };
    164165      var countCalculator = new ExpressionCalculator() { Name = "LayerPopulationSize = Min(LayerPopulationSize, PopulationSize)" };
    165166      var bestSelector = new BestSelector();
     
    180181      subScopesCounter.ValueParameter.ActualName = "LayerPopulationSize";
    181182      subScopesCounter.AccumulateParameter.Value = new BoolValue(false);
    182       subScopesCounter.Successor = countCalculator;
     183      subScopesCounter.Successor = reduceToPopulationSizeBranch;
     184
     185      reduceToPopulationSizeBranch.ConditionParameter.ActualName = "ReduceToPopulationSize";
     186      reduceToPopulationSizeBranch.TrueBranch = countCalculator;
    183187
    184188      countCalculator.CollectedValues.Add(new LookupParameter<IntValue>("PopulationSize"));
Note: See TracChangeset for help on using the changeset viewer.