- Timestamp:
- 01/22/11 15:18:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
r5352 r5356 135 135 } 136 136 private GeneticAlgorithmMainLoop GeneticAlgorithmMainLoop { 137 get { return (GeneticAlgorithmMainLoop)((SubScopesCounter)SolutionsCreator.Successor).Successor; } 137 get { 138 return (GeneticAlgorithmMainLoop)( 139 (ResultsCollector)( 140 (SubScopesCounter)SolutionsCreator.Successor 141 ).Successor 142 ).Successor; 143 } 138 144 } 139 145 [Storable] … … 157 163 SolutionsCreator solutionsCreator = new SolutionsCreator(); 158 164 SubScopesCounter subScopesCounter = new SubScopesCounter(); 159 GeneticAlgorithmMainLoop geneticAlgorithmMainLoop = new GeneticAlgorithmMainLoop(); 165 ResultsCollector resultsCollector = new ResultsCollector(); 166 GeneticAlgorithmMainLoop mainLoop = new GeneticAlgorithmMainLoop(); 160 167 OperatorGraph.InitialOperator = randomCreator; 161 168 … … 172 179 subScopesCounter.Name = "Initialize EvaluatedSolutions"; 173 180 subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions"; 174 subScopesCounter.Successor = geneticAlgorithmMainLoop; 175 176 geneticAlgorithmMainLoop.SelectorParameter.ActualName = SelectorParameter.Name; 177 geneticAlgorithmMainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name; 178 geneticAlgorithmMainLoop.ElitesParameter.ActualName = ElitesParameter.Name; 179 geneticAlgorithmMainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name; 180 geneticAlgorithmMainLoop.MutatorParameter.ActualName = MutatorParameter.Name; 181 geneticAlgorithmMainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name; 182 geneticAlgorithmMainLoop.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 183 geneticAlgorithmMainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name; 184 geneticAlgorithmMainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions"; 185 geneticAlgorithmMainLoop.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name; 186 geneticAlgorithmMainLoop.ResultsParameter.ActualName = "Results"; 181 subScopesCounter.Successor = resultsCollector; 182 183 resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "EvaluatedSolutions")); 184 resultsCollector.ResultsParameter.ActualName = "Results"; 185 resultsCollector.Successor = mainLoop; 186 187 mainLoop.SelectorParameter.ActualName = SelectorParameter.Name; 188 mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name; 189 mainLoop.ElitesParameter.ActualName = ElitesParameter.Name; 190 mainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name; 191 mainLoop.MutatorParameter.ActualName = MutatorParameter.Name; 192 mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name; 193 mainLoop.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 194 mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name; 195 mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions"; 196 mainLoop.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name; 197 mainLoop.ResultsParameter.ActualName = "Results"; 187 198 188 199 foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
Note: See TracChangeset
for help on using the changeset viewer.