Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/18/15 14:25:08 (8 years ago)
Author:
pfleck
Message:

#2350

  • Implemented elitism by sorting the layer and restricting the random target index.
  • Renamed Layers in LayersScope.
File:
1 edited

Legend:

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

    r12192 r12220  
    134134
    135135      var randomCreator = new RandomCreator();
    136       var workingScopeCreator = new NamedSubScopesCreator() { Name = "Create WorkingScope and Layers-Scope" };
     136      var workingScopeCreator = new NamedSubScopesCreator() { Name = "Create Working- and Layers-Scope" };
    137137      var layersProcessor = new NamedSubScopeProcessor() { Name = "Process Layers-Scope" };
    138       var layerCreator = new SubScopesCreator() { Name = "Create Layer" };
    139       var layerProcessor = new /*Layer*/UniformSubScopesProcessor();
     138      var layerCreator = new SubScopesCreator() { Name = "Create Layers" };
     139      var layerProcessor = new UniformSubScopesProcessor();
    140140      var layerVariableCreator = new VariableCreator() { Name = "Initialize Layer" };
    141141      var layerNumberCreator = new ScopeIndexAssigner() { Name = "Create Layer Number" };
     
    155155      randomCreator.Successor = workingScopeCreator;
    156156
    157       workingScopeCreator.NamesParameter.Value = new StringArray(new[] { "WorkingScope", "Layers" });
     157      workingScopeCreator.NamesParameter.Value = new StringArray(new[] { "WorkingScope", "LayersScope", "ElitesScope" });
    158158      workingScopeCreator.Successor = layersProcessor;
    159159
    160       layersProcessor.TargetScopeParameter.ActualName = "Layers";
     160      layersProcessor.TargetScopeParameter.ActualName = "LayersScope";
    161161      layersProcessor.Operator = layerCreator;
    162162      layersProcessor.Successor = initializeEvaluatedSolutions;
     
    198198
    199199      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "ResultEvaluatedSolutions"));
     200      resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("LayerResults", "Result set for each layer", "LayerResults", 2));
    200201      resultsCollector.Successor = mainLoop;
    201202
     
    204205      var tournamentSelector = SelectorParameter.ValidValues.OfType<TournamentSelector>().FirstOrDefault();
    205206      if (tournamentSelector != null) {
    206         tournamentSelector.GroupSizeParameter.Value = new IntValue(5);
     207        tournamentSelector.GroupSizeParameter.Value = new IntValue(4);
    207208        SelectorParameter.Value = tournamentSelector;
    208209      }
Note: See TracChangeset for help on using the changeset viewer.