Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/22/11 15:18:20 (13 years ago)
Author:
abeham
Message:

#1344

  • Adapted all algorithms to count evaluated solutions / moves and outside of the parallel region
  • Used the same pattern in every algorithm: Initialize and collect the variable in the Algorithm and increment it in the main loops and main operators
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs

    r5351 r5356  
    159159      UniformSubScopesProcessor uniformSubScopesProcessor3 = new UniformSubScopesProcessor();
    160160      Placeholder evaluator = new Placeholder();
     161      SubScopesCounter subScopesCounter = new SubScopesCounter();
    161162      SubScopesProcessor subScopesProcessor2 = new SubScopesProcessor();
    162163      BestSelector bestSelector = new BestSelector();
     
    165166      IntCounter generationsCounter = new IntCounter();
    166167      UniformSubScopesProcessor uniformSubScopesProcessor4 = new UniformSubScopesProcessor();
    167       SubScopesCounter subScopesCounter = new SubScopesCounter();
    168168      Placeholder islandAnalyzer2 = new Placeholder();
    169169      IntCounter generationsSinceLastMigrationCounter = new IntCounter();
     
    179179      Comparator generationsComparator = new Comparator();
    180180      Placeholder analyzer2 = new Placeholder();
    181       ResultsCollector resultsCollector2 = new ResultsCollector();
    182181      ConditionalBranch generationsTerminationCondition = new ConditionalBranch();
    183182
     
    197196      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
    198197      resultsCollector1.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("IslandResults", "Result set for each island", "Results"));
    199       resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedSolutions"));
    200198      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
    201199
     
    220218      evaluator.Name = "Evaluator (placeholder)";
    221219      evaluator.OperatorParameter.ActualName = EvaluatorParameter.Name;
     220
     221      subScopesCounter.Name = "Increment EvaluatedSolutions";
     222      subScopesCounter.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name;
    222223
    223224      bestSelector.CopySelected = new BoolValue(false);
     
    225226      bestSelector.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
    226227      bestSelector.QualityParameter.ActualName = QualityParameter.Name;
    227 
    228       subScopesCounter.Name = "Increment EvaluatedSolutions";
    229       subScopesCounter.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name;
    230228
    231229      islandAnalyzer2.Name = "Island Analyzer (placeholder)";
     
    274272      analyzer2.Name = "Analyzer (placeholder)";
    275273      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
    276 
    277       resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
    278       resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
    279       resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedSolutions"));
    280       resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name;
    281274
    282275      generationsTerminationCondition.Name = "Terminate?";
     
    335328      uniformSubScopesProcessor6.Successor = null;
    336329      generationsComparator.Successor = analyzer2;
    337       analyzer2.Successor = resultsCollector2;
    338       resultsCollector2.Successor = generationsTerminationCondition;
     330      analyzer2.Successor = generationsTerminationCondition;
    339331      generationsTerminationCondition.TrueBranch = null;
    340332      generationsTerminationCondition.FalseBranch = uniformSubScopesProcessor1;
Note: See TracChangeset for help on using the changeset viewer.