- Timestamp:
- 04/27/11 09:22:20 (14 years ago)
- Location:
- branches/histogram
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
- Property svn:mergeinfo changed
/trunk/sources merged: 6047-6048,6051-6054
- Property svn:mergeinfo changed
-
branches/histogram/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
r5809 r6055 305 305 } 306 306 private void ParameterizeStochasticOperator(IOperator op) { 307 if (op is IStochasticOperator) 308 ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 307 IStochasticOperator stochasticOp = op as IStochasticOperator; 308 if (stochasticOp != null) { 309 stochasticOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 310 stochasticOp.RandomParameter.Hidden = true; 311 } 309 312 } 310 313 private void ParameterizeSelectors() { … … 312 315 selector.CopySelected = new BoolValue(true); 313 316 selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSizeParameter.Value.Value - ElitesParameter.Value.Value)); 317 selector.NumberOfSelectedSubScopesParameter.Hidden = true; 314 318 ParameterizeStochasticOperator(selector); 315 319 } … … 317 321 foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) { 318 322 selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 323 selector.MaximizationParameter.Hidden = true; 319 324 selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 325 selector.QualityParameter.Hidden = true; 320 326 } 321 327 } … … 323 329 private void ParameterizeAnalyzers() { 324 330 qualityAnalyzer.ResultsParameter.ActualName = "Results"; 331 qualityAnalyzer.ResultsParameter.Hidden = true; 325 332 if (Problem != null) { 326 333 qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 334 qualityAnalyzer.MaximizationParameter.Hidden = true; 327 335 qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 328 336 qualityAnalyzer.QualityParameter.Depth = 1; 337 qualityAnalyzer.QualityParameter.Hidden = true; 329 338 qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 339 qualityAnalyzer.BestKnownQualityParameter.Hidden = true; 330 340 } 331 341 } … … 334 344 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 335 345 op.IterationsParameter.ActualName = "Generations"; 346 op.IterationsParameter.Hidden = true; 336 347 op.MaximumIterationsParameter.ActualName = "MaximumGenerations"; 348 op.MaximumIterationsParameter.Hidden = true; 337 349 } 338 350 } -
branches/histogram/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
r5809 r6055 410 410 } 411 411 private void ParameterizeStochasticOperator(IOperator op) { 412 if (op is IStochasticOperator) 413 ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 412 IStochasticOperator stochasticOp = op as IStochasticOperator; 413 if (stochasticOp != null) { 414 stochasticOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 415 stochasticOp.RandomParameter.Hidden = true; 416 } 414 417 } 415 418 private void ParameterizeSelectors() { … … 417 420 selector.CopySelected = new BoolValue(true); 418 421 selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSize.Value - Elites.Value)); 422 selector.NumberOfSelectedSubScopesParameter.Hidden = true; 419 423 ParameterizeStochasticOperator(selector); 420 424 } … … 422 426 selector.CopySelected = new BoolValue(true); 423 427 selector.NumberOfSelectedSubScopesParameter.Value = new IntValue((int)Math.Ceiling(PopulationSize.Value * MigrationRate.Value)); 428 selector.NumberOfSelectedSubScopesParameter.Hidden = true; 424 429 ParameterizeStochasticOperator(selector); 425 430 } … … 430 435 foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) { 431 436 selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 437 selector.MaximizationParameter.Hidden = true; 432 438 selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 439 selector.QualityParameter.Hidden = true; 433 440 } 434 441 foreach (ISingleObjectiveSelector selector in EmigrantsSelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) { 435 442 selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 443 selector.MaximizationParameter.Hidden = true; 436 444 selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 445 selector.QualityParameter.Hidden = true; 437 446 } 438 447 foreach (ISingleObjectiveReplacer selector in ImmigrationReplacerParameter.ValidValues.OfType<ISingleObjectiveReplacer>()) { 439 448 selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 449 selector.MaximizationParameter.Hidden = true; 440 450 selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 451 selector.QualityParameter.Hidden = true; 441 452 } 442 453 } … … 444 455 private void ParameterizeAnalyzers() { 445 456 islandQualityAnalyzer.ResultsParameter.ActualName = "Results"; 457 islandQualityAnalyzer.ResultsParameter.Hidden = true; 446 458 islandQualityAnalyzer.QualityParameter.Depth = 1; 447 459 qualityAnalyzer.ResultsParameter.ActualName = "Results"; 460 qualityAnalyzer.ResultsParameter.Hidden = true; 448 461 qualityAnalyzer.QualityParameter.Depth = 2; 449 462 450 463 if (Problem != null) { 451 464 islandQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 465 islandQualityAnalyzer.MaximizationParameter.Hidden = true; 452 466 islandQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 467 islandQualityAnalyzer.QualityParameter.Hidden = true; 453 468 islandQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 469 islandQualityAnalyzer.BestKnownQualityParameter.Hidden = true; 454 470 qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 471 qualityAnalyzer.MaximizationParameter.Hidden = true; 455 472 qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 473 qualityAnalyzer.QualityParameter.Hidden = true; 456 474 qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 475 qualityAnalyzer.BestKnownQualityParameter.Hidden = true; 457 476 } 458 477 } … … 461 480 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 462 481 op.IterationsParameter.ActualName = "Generations"; 482 op.IterationsParameter.Hidden = true; 463 483 op.MaximumIterationsParameter.ActualName = "MaximumGenerations"; 484 op.MaximumIterationsParameter.Hidden = true; 464 485 } 465 486 }
Note: See TracChangeset
for help on using the changeset viewer.