Changeset 3750 for trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm
- Timestamp:
- 05/10/10 17:19:34 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
r3680 r3750 213 213 ParameterizeSelectors(); 214 214 ParameterizeAnalyzers(); 215 ParameterizeIterationBasedOperators(); 215 216 UpdateCrossovers(); 216 217 UpdateMutators(); … … 236 237 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 237 238 foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op); 239 ParameterizeIterationBasedOperators(); 238 240 UpdateCrossovers(); 239 241 UpdateMutators(); … … 307 309 qualityAnalyzer.QualityParameter.Depth = 1; 308 310 qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 311 } 312 } 313 private void ParameterizeIterationBasedOperators() { 314 if (Problem != null) { 315 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 316 op.IterationsParameter.ActualName = "Generations"; 317 op.MaximumIterationsParameter.ActualName = "MaximumGenerations"; 318 } 309 319 } 310 320 } -
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithmMainLoop.cs
r3715 r3750 130 130 ConditionalBranch conditionalBranch = new ConditionalBranch(); 131 131 132 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); 132 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class GeneticAlgorithm expects this to be called Generations 133 133 134 134 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations")); -
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
r3704 r3750 304 304 ParameterizeSelectors(); 305 305 ParameterizeAnalyzers(); 306 ParameterizeIterationBasedOperators(); 306 307 UpdateCrossovers(); 307 308 UpdateMutators(); … … 327 328 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 328 329 foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op); 330 ParameterizeIterationBasedOperators(); 329 331 UpdateCrossovers(); 330 332 UpdateMutators(); … … 431 433 } 432 434 } 435 private void ParameterizeIterationBasedOperators() { 436 if (Problem != null) { 437 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 438 op.IterationsParameter.ActualName = "Generations"; 439 op.MaximumIterationsParameter.ActualName = "MaximumGenerations"; 440 } 441 } 442 } 433 443 private void UpdateCrossovers() { 434 444 ICrossover oldCrossover = CrossoverParameter.Value; -
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs
r3715 r3750 177 177 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Migrations", new IntValue(0))); 178 178 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("GenerationsSinceLastMigration", new IntValue(0))); 179 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); 179 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class IslandGeneticAlgorithm expects this to be called Generations 180 180 181 181 islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("Results", new ResultCollection()));
Note: See TracChangeset
for help on using the changeset viewer.