Changeset 6053 for trunk/sources/HeuristicLab.Algorithms.TabuSearch
- Timestamp:
- 04/26/11 15:39:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
r5809 r6053 429 429 } 430 430 private void ParameterizeStochasticOperator(IOperator op) { 431 if (op is IStochasticOperator) 432 ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 431 if (op is IStochasticOperator) { 432 IStochasticOperator stOp = (IStochasticOperator)op; 433 stOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 434 stOp.RandomParameter.Hidden = true; 435 } 433 436 } 434 437 private void ParameterizeMoveGenerators() { 435 438 if (Problem != null) { 436 foreach (IMultiMoveGenerator generator in Problem.Operators.OfType<IMultiMoveGenerator>()) 439 foreach (IMultiMoveGenerator generator in Problem.Operators.OfType<IMultiMoveGenerator>()) { 437 440 generator.SampleSizeParameter.ActualName = SampleSizeParameter.Name; 441 generator.SampleSizeParameter.Hidden = true; 442 } 438 443 } 439 444 } … … 441 446 foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) { 442 447 op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 448 op.QualityParameter.Hidden = true; 443 449 } 444 450 } … … 446 452 foreach (IMoveMaker op in Problem.Operators.OfType<IMoveMaker>()) { 447 453 op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 448 if (MoveEvaluator != null) 454 op.QualityParameter.Hidden = true; 455 if (MoveEvaluator != null) { 449 456 op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 457 op.MoveQualityParameter.Hidden = true; 458 } else { 459 op.MoveQualityParameter.Hidden = false; 460 } 450 461 } 451 462 } … … 453 464 foreach (ITabuMaker op in Problem.Operators.OfType<ITabuMaker>()) { 454 465 op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 455 if (MoveEvaluator != null) 466 op.QualityParameter.Hidden = true; 467 if (MoveEvaluator != null) { 456 468 op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 469 op.MoveQualityParameter.Hidden = true; 470 } else { 471 op.MoveQualityParameter.Hidden = false; 472 } 457 473 } 458 474 } 459 475 private void ParameterizeTabuChecker() { 460 476 foreach (ITabuChecker op in Problem.Operators.OfType<ITabuChecker>()) { 461 if (MoveEvaluator != null) 477 if (MoveEvaluator != null) { 462 478 op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 463 if (TabuChecker != null) 479 op.MoveQualityParameter.Hidden = true; 480 } else { 481 op.MoveQualityParameter.Hidden = false; 482 } 483 if (TabuChecker != null) { 464 484 op.MoveTabuParameter.ActualName = TabuChecker.MoveTabuParameter.ActualName; 485 op.MoveTabuParameter.Hidden = true; 486 } else { 487 op.MoveTabuParameter.Hidden = false; 488 } 465 489 } 466 490 } 467 491 private void ParameterizeAnalyzers() { 468 492 moveQualityAnalyzer.ResultsParameter.ActualName = "Results"; 493 moveQualityAnalyzer.ResultsParameter.Hidden = true; 469 494 tabuNeighborhoodAnalyzer.ResultsParameter.ActualName = "Results"; 495 tabuNeighborhoodAnalyzer.ResultsParameter.Hidden = true; 470 496 tabuNeighborhoodAnalyzer.PercentTabuParameter.ActualName = "PercentTabu"; 497 tabuNeighborhoodAnalyzer.PercentTabuParameter.Hidden = true; 471 498 if (Problem != null) { 472 499 moveQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 473 if (MoveEvaluator != null) 500 moveQualityAnalyzer.MaximizationParameter.Hidden = true; 501 if (MoveEvaluator != null) { 474 502 moveQualityAnalyzer.QualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 503 moveQualityAnalyzer.QualityParameter.Hidden = true; 504 } else { 505 moveQualityAnalyzer.QualityParameter.Hidden = false; 506 } 475 507 moveQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 476 if (TabuChecker != null) 508 moveQualityAnalyzer.BestKnownQualityParameter.Hidden = true; 509 if (TabuChecker != null) { 477 510 tabuNeighborhoodAnalyzer.IsTabuParameter.ActualName = TabuChecker.MoveTabuParameter.ActualName; 511 tabuNeighborhoodAnalyzer.IsTabuParameter.Hidden = true; 512 } else { 513 tabuNeighborhoodAnalyzer.IsTabuParameter.Hidden = false; 514 } 515 } else { 516 moveQualityAnalyzer.MaximizationParameter.Hidden = false; 517 moveQualityAnalyzer.QualityParameter.Hidden = false; 518 moveQualityAnalyzer.BestKnownQualityParameter.Hidden = false; 519 tabuNeighborhoodAnalyzer.IsTabuParameter.Hidden = false; 478 520 } 479 521 } … … 482 524 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 483 525 op.IterationsParameter.ActualName = "Iterations"; 526 op.IterationsParameter.Hidden = true; 484 527 op.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name; 528 op.MaximumIterationsParameter.Hidden = true; 485 529 } 486 530 }
Note: See TracChangeset
for help on using the changeset viewer.