Changeset 5356 for trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
- Timestamp:
- 01/22/11 15:18:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r4722 r5356 239 239 } 240 240 private IslandOffspringSelectionGeneticAlgorithmMainLoop MainLoop { 241 get { return (IslandOffspringSelectionGeneticAlgorithmMainLoop)IslandProcessor.Successor; } 241 get { 242 return (IslandOffspringSelectionGeneticAlgorithmMainLoop)( 243 (ResultsCollector)( 244 (UniformSubScopesProcessor)( 245 (VariableCreator)IslandProcessor.Successor 246 ).Successor 247 ).Successor 248 ).Successor; 249 } 242 250 } 243 251 [Storable] … … 300 308 UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor(); 301 309 SolutionsCreator solutionsCreator = new SolutionsCreator(); 310 VariableCreator variableCreator = new VariableCreator(); 311 UniformSubScopesProcessor ussp2 = new UniformSubScopesProcessor(); 312 SubScopesCounter subScopesCounter = new SubScopesCounter(); 313 ResultsCollector resultsCollector = new ResultsCollector(); 302 314 IslandOffspringSelectionGeneticAlgorithmMainLoop mainLoop = new IslandOffspringSelectionGeneticAlgorithmMainLoop(); 303 315 OperatorGraph.InitialOperator = randomCreator; … … 314 326 315 327 ussp1.Operator = solutionsCreator; 316 ussp1.Successor = mainLoop;328 ussp1.Successor = variableCreator; 317 329 318 330 solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name; 319 331 solutionsCreator.Successor = null; 332 333 variableCreator.Name = "Initialize EvaluatedSolutions"; 334 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue())); 335 variableCreator.Successor = ussp2; 336 337 ussp2.Operator = subScopesCounter; 338 ussp2.Successor = resultsCollector; 339 340 subScopesCounter.Name = "Increment EvaluatedSolutions"; 341 subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions"; 342 343 resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", "", "EvaluatedSolutions")); 344 resultsCollector.ResultsParameter.ActualName = "Results"; 345 resultsCollector.Successor = mainLoop; 320 346 321 347 mainLoop.EmigrantsSelectorParameter.ActualName = EmigrantsSelectorParameter.Name; … … 339 365 mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name; 340 366 mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name; 367 mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions"; 341 368 mainLoop.Successor = null; 342 369
Note: See TracChangeset
for help on using the changeset viewer.