Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/15 11:47:44 (8 years ago)
Author:
pfleck
Message:

#2269

  • Added some missing wiring.
  • Unified some parameter properties.
  • Removed some operators.
File:
1 edited

Legend:

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

    r13124 r13127  
    291291
    292292      Parameters.Add(new ValueParameter<EnumValue<AgingScheme>>("AgingScheme", "The aging scheme for setting the age-limits for the layers.", new EnumValue<AgingScheme>(ALPS.AgingScheme.Polynomial)));
    293       Parameters.Add(new ValueParameter<IntValue>("AgeGap", "The frequency of reseeding the lowest layer and scaling factor for the age-limits for the layers", new IntValue(20)));
     293      Parameters.Add(new ValueParameter<IntValue>("AgeGap", "The frequency of reseeding the lowest layer and scaling factor for the age-limits for the layers.", new IntValue(20)));
    294294      Parameters.Add(new ValueParameter<DoubleValue>("AgeInheritance", "A weight that determines the age of a child after crossover based on the older (1.0) and younger (0.0) parent.", new DoubleValue(1.0)) { Hidden = true });
    295295      Parameters.Add(new ValueParameter<IntArray>("AgeLimits", "The maximum ages for the Layers.", new IntArray(new int[0])) { Hidden = true });
    296296
    297297      Parameters.Add(new ValueParameter<IntValue>("MatingPoolRange", "The range of layers used for creating a mating pool. (1 = current + previous layer)", new IntValue(1)) { Hidden = true });
    298       Parameters.Add(new ValueParameter<BoolValue>("ReduceToPopulationSize", "Reduce the LayerPopulationSize after elder migration to PopulationSize", new BoolValue(true)) { Hidden = true });
    299 
    300       Parameters.Add(new ValueParameter<MultiTerminator>("Terminator", "The termination criteria which sould be checked.", new MultiTerminator()));
     298      Parameters.Add(new ValueParameter<BoolValue>("ReduceToPopulationSize", "Reduce the CurrentPopulationSize after elder migration to PopulationSize", new BoolValue(true)) { Hidden = true });
     299
     300      Parameters.Add(new ValueParameter<MultiTerminator>("Terminator", "The termination criteria that defines if the algorithm should continue or stop.", new MultiTerminator()));
    301301      #endregion
    302302
     
    306306      var layer0Processor = new SubScopesProcessor();
    307307      var localRandomCreator = new LocalRandomCreator();
    308       var layerVariableCreator = new VariableCreator();
    309308      var layerSolutionsCreator = new SolutionsCreator();
    310309      var initializeAgeProcessor = new UniformSubScopesProcessor();
    311310      var initializeAge = new VariableCreator() { Name = "Initialize Age" };
    312       var initializeLayerPopulationSize = new SubScopesCounter() { Name = "Init LayerPopulationCounter" };
     311      var initializeCurrentPopulationSize = new SubScopesCounter() { Name = "Init CurrentPopulationCounter" };
    313312      var initializeLocalEvaluatedSolutions = new Assigner() { Name = "Initialize LayerEvaluatedSolutions" };
    314313      var initializeGlobalEvaluatedSolutions = new DataReducer() { Name = "Initialize EvaluatedSolutions" };
     
    331330      layer0Processor.Successor = initializeGlobalEvaluatedSolutions;
    332331
    333       localRandomCreator.Successor = layerVariableCreator;
    334 
    335       layerVariableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Layer", new IntValue(0)));
    336       layerVariableCreator.Successor = layerSolutionsCreator;
     332      localRandomCreator.Successor = layerSolutionsCreator;
    337333
    338334      layerSolutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
     
    340336
    341337      initializeAgeProcessor.Operator = initializeAge;
    342       initializeAgeProcessor.Successor = initializeLayerPopulationSize;
    343 
    344       initializeLayerPopulationSize.ValueParameter.ActualName = "LayerPopulationSize";
    345       initializeLayerPopulationSize.Successor = initializeLocalEvaluatedSolutions;
     338      initializeAgeProcessor.Successor = initializeCurrentPopulationSize;
     339
     340      initializeCurrentPopulationSize.ValueParameter.ActualName = "CurrentPopulationSize";
     341      initializeCurrentPopulationSize.Successor = initializeLocalEvaluatedSolutions;
    346342
    347343      initializeAge.CollectedValues.Add(new ValueParameter<DoubleValue>("Age", new DoubleValue(0)));
     
    349345
    350346      initializeLocalEvaluatedSolutions.LeftSideParameter.ActualName = "LayerEvaluatedSolutions";
    351       initializeLocalEvaluatedSolutions.RightSideParameter.ActualName = "LayerPopulationSize";
     347      initializeLocalEvaluatedSolutions.RightSideParameter.ActualName = "CurrentPopulationSize";
    352348      initializeLocalEvaluatedSolutions.Successor = null;
    353349
     
    362358
    363359      mainLoop.GlobalRandomParameter.ActualName = "GlobalRandom";
    364       mainLoop.LocalRandomParameter.ActualName = "LocalRandom";
     360      mainLoop.LocalRandomParameter.ActualName = localRandomCreator.LocalRandomParameter.Name;
    365361      mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
    366362      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
     
    377373      mainLoop.PlusSelectionParameter.ActualName = PlusSelectionParameter.Name;
    378374      mainLoop.AgeParameter.ActualName = "Age";
     375      mainLoop.AgeGapParameter.ActualName = AgeGapParameter.Name;
    379376      mainLoop.AgeInheritanceParameter.ActualName = AgeInheritanceParameter.Name;
    380377      mainLoop.AgeLimitsParameter.ActualName = AgeLimitsParameter.Name;
    381378      mainLoop.MatingPoolRangeParameter.ActualName = MatingPoolRangeParameter.Name;
    382379      mainLoop.ReduceToPopulationSizeParameter.ActualName = ReduceToPopulationSizeParameter.Name;
     380      mainLoop.TerminatorParameter.ActualName = TerminatorParameter.Name;
    383381      #endregion
    384382
Note: See TracChangeset for help on using the changeset viewer.