- Timestamp:
- 02/08/16 15:55:31 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorthmsMainLoop.cs
r13595 r13604 225 225 var resultsCollector = new ResultsCollector(); 226 226 227 var processIslandsUssp = new UniformSubScopesProcessor() {Name = "Process Islands" };227 var processIslandsUssp = new UniformSubScopesProcessor() {Name = "Process Islands", Parallel = new BoolValue(true)}; 228 228 var initIslandGenerationsAss = new Assigner() {Name = "Init Island Generations"}; 229 229 var initIslandEvaluationsAss = new Assigner() {Name = "Init Island Evaluations"}; … … 231 231 var incrementGenerationDr = new DataReducer() { Name = "Increment Generations" }; 232 232 var incrementEvaluatedSolutionDr = new DataReducer() { Name = "Increment Evaluated Solutions" }; 233 //TODO: increase migration count + migrate234 233 235 234 var elderMigrator = CreateEldersEmigrator(); … … 250 249 var groupResultsExtractor = new ResultsExtractor() {Name = "Collect group results into variable"}; 251 250 var groupResultsCollector = new ResultsCollector() {Name = "Collect group results into into global results"}; 252 251 var groupLayerNumberResultsCollector = new ResultsCollector() {Name = "Add Layernumber to Results"}; 253 252 254 253 var matingPoolCreator = new MatingPoolCreator(); 255 254 var matingPoolUssp = new UniformSubScopesProcessor() {Name = "Process Mating Pools"}; 256 var alpsMainOperator = new AlpsGeneticAlgorithmMainOperator();255 var alpsMainOperator = new AlpsGeneticAlgorithmMainOperator(); 257 256 258 257 var incrementIslandGeneration = new IntCounter() {Name = "incrementIslandGeneration" }; 259 258 var setIslandEvaluatedSolutions = new DataReducer() {Name = "Set IslandEvaluatedSolutions" }; 259 260 var migrationCounter = new IntCounter() {Name = "Increment Migrations"}; 261 var selectforMigrationUssp = new UniformSubScopesProcessor(); 262 var emigrantSelector = new Placeholder() {Name = "Emigrant Selector (Placeholder)"}; 263 var migrator = new LayerMigrator(); 264 var replaceforMigrationUssp = new UniformSubScopesProcessor(); 265 var immigrantSelector = new Placeholder() { Name = "Immigrant Replacer (Placeholder)" }; 260 266 261 267 var migrateComparator = new Comparator(); … … 283 289 resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("IslandResults","","IslandResults")); 284 290 resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("GroupResults","","GroupResults")); 291 resultsCollector.CollectedValues.Add(new ValueLookupParameter<IntValue>("Migrations")); 285 292 resultsCollector.CopyValue = new BoolValue(false); 286 293 … … 314 321 migrateCondBranch.ConditionParameter.ActualName = "Migrate"; 315 322 323 migrationCounter.ValueParameter.ActualName = "Migrations"; 324 selectforMigrationUssp.Depth = new IntValue(2); 325 emigrantSelector.OperatorParameter.ActualName = EmigrantsSelectorParameter.Name; 326 327 replaceforMigrationUssp.Depth = new IntValue(2); 328 immigrantSelector.OperatorParameter.ActualName = ImmigrationReplacerParameter.Name; 329 316 330 groupAnalyzer.OperatorParameter.ActualName = GroupAnalyzerParameter.Name; 331 groupLayerNumberResultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("LayerNumber")); 332 groupLayerNumberResultsCollector.ResultsParameter.ActualName = "GroupResults"; 333 317 334 layerAnalyzerPlaceholder.OperatorParameter.ActualName = LayerAnalyzerParameter.Name; 318 335 layerResultsCollector.ResultsParameter.ActualName = "LayerResults"; … … 384 401 processIslandsUssp.Successor = incrementGenerationDr; 385 402 incrementGenerationDr.Successor = incrementEvaluatedSolutionDr; 386 incrementEvaluatedSolutionDr.Successor = globalAnalyzerPlacerholder; 403 incrementEvaluatedSolutionDr.Successor = migrationCounter; 404 405 migrationCounter.Successor = selectforMigrationUssp; 406 selectforMigrationUssp.Operator = emigrantSelector; 407 emigrantSelector.Successor = null; 408 selectforMigrationUssp.Successor = migrator; 409 410 migrator.Successor = replaceforMigrationUssp; 411 replaceforMigrationUssp.Operator = immigrantSelector; 412 immigrantSelector.Successor = null; 413 replaceforMigrationUssp.Successor = globalAnalyzerPlacerholder; 414 387 415 globalAnalyzerPlacerholder.Successor = groupingOperator; 388 416 groupingOperator.Operator = groupAnalyzer; 389 groupAnalyzer.Successor = null; 417 groupAnalyzer.Successor = groupLayerNumberResultsCollector; 418 groupLayerNumberResultsCollector.Successor = null; 390 419 groupingOperator.Successor = groupResultsExtractor; 391 420 groupResultsExtractor.Successor = groupResultsCollector;
Note: See TracChangeset
for help on using the changeset viewer.