- Timestamp:
- 05/10/10 17:19:34 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r3744 r3750 373 373 ParameterizeSelectors(); 374 374 ParameterizeAnalyzers(); 375 ParameterizeIterationBasedOperators(); 375 376 UpdateCrossovers(); 376 377 UpdateMutators(); … … 396 397 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 397 398 foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op); 399 ParameterizeIterationBasedOperators(); 398 400 UpdateCrossovers(); 399 401 UpdateMutators(); … … 542 544 } 543 545 } 546 private void ParameterizeIterationBasedOperators() { 547 if (Problem != null) { 548 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 549 op.IterationsParameter.ActualName = "Generations"; 550 op.MaximumIterationsParameter.ActualName = MaximumGenerationsParameter.Name; 551 } 552 } 553 } 544 554 private void UpdateCrossovers() { 545 555 ICrossover oldCrossover = CrossoverParameter.Value; -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs
r3744 r3750 210 210 211 211 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Migrations", new IntValue(0))); 212 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); 212 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class IslandOffspringSelectionGeneticAlgorithm expects this to be called Generations 213 213 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("GenerationsSinceLastMigration", new IntValue(0))); 214 214 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("TerminatedIslands", new IntValue(0))); -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
r3744 r3750 284 284 ParameterizeSelectors(); 285 285 ParameterizeAnalyzers(); 286 ParameterizeIterationBasedOperators(); 286 287 UpdateCrossovers(); 287 288 UpdateMutators(); … … 307 308 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 308 309 foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op); 310 ParameterizeIterationBasedOperators(); 309 311 UpdateCrossovers(); 310 312 UpdateMutators(); … … 394 396 } 395 397 } 398 private void ParameterizeIterationBasedOperators() { 399 if (Problem != null) { 400 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 401 op.IterationsParameter.ActualName = "Generations"; 402 op.MaximumIterationsParameter.ActualName = MaximumGenerationsParameter.Name; 403 } 404 } 405 } 396 406 private void UpdateCrossovers() { 397 407 ICrossover oldCrossover = CrossoverParameter.Value; -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs
r3744 r3750 139 139 ConditionalBranch conditionalBranch2 = new ConditionalBranch(); 140 140 141 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); 141 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class OffspringSelectionGeneticAlgorithm expects this to be called Generations 142 142 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0))); 143 143 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0))); -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
r3744 r3750 332 332 ParameterizeSelectors(); 333 333 ParameterizeAnalyzers(); 334 ParameterizeIterationBasedOperators(); 334 335 UpdateCrossovers(); 335 336 UpdateMutators(); … … 355 356 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 356 357 foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op); 358 ParameterizeIterationBasedOperators(); 357 359 UpdateCrossovers(); 358 360 UpdateMutators(); … … 480 482 } 481 483 } 484 private void ParameterizeIterationBasedOperators() { 485 if (Problem != null) { 486 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 487 op.IterationsParameter.ActualName = "Generations"; 488 op.MaximumIterationsParameter.ActualName = MaximumGenerationsParameter.Name; 489 } 490 } 491 } 482 492 private void UpdateCrossovers() { 483 493 ICrossover oldCrossover = CrossoverParameter.Value; -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs
r3744 r3750 191 191 192 192 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Reunifications", new IntValue(0))); 193 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); 193 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class SASEGASA expects this to be called Generations 194 194 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("GenerationsSinceLastReunification", new IntValue(0))); 195 195 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
Note: See TracChangeset
for help on using the changeset viewer.