Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/21/11 22:51:59 (14 years ago)
Author:
abeham
Message:

#1333

  • Removed changes to IntCounter that would make it thread-safe, if a thread-safe operator is needed a separate one should be implemented
  • Moved counting of evaluated solutions out of the parallel region
File:
1 edited

Legend:

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

    r5346 r5352  
    135135    }
    136136    private GeneticAlgorithmMainLoop GeneticAlgorithmMainLoop {
    137       get { return (GeneticAlgorithmMainLoop)((Assigner)SolutionsCreator.Successor).Successor; }
     137      get { return (GeneticAlgorithmMainLoop)((SubScopesCounter)SolutionsCreator.Successor).Successor; }
    138138    }
    139139    [Storable]
     
    156156      RandomCreator randomCreator = new RandomCreator();
    157157      SolutionsCreator solutionsCreator = new SolutionsCreator();
    158       Assigner assigner = new Assigner();
     158      SubScopesCounter subScopesCounter = new SubScopesCounter();
    159159      GeneticAlgorithmMainLoop geneticAlgorithmMainLoop = new GeneticAlgorithmMainLoop();
    160160      OperatorGraph.InitialOperator = randomCreator;
     
    168168
    169169      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
    170       solutionsCreator.Successor = assigner;
    171 
    172       assigner.Name = "Initialize EvaluatedSolutions";
    173       assigner.LeftSideParameter.ActualName = "EvaluatedSolutions";
    174       assigner.RightSideParameter.ActualName = PopulationSizeParameter.Name;
    175       assigner.Successor = geneticAlgorithmMainLoop;
     170      solutionsCreator.Successor = subScopesCounter;
     171
     172      subScopesCounter.Name = "Initialize EvaluatedSolutions";
     173      subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions";
     174      subScopesCounter.Successor = geneticAlgorithmMainLoop;
    176175
    177176      geneticAlgorithmMainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
Note: See TracChangeset for help on using the changeset viewer.