Changeset 6053 for trunk/sources/HeuristicLab.Algorithms.LocalSearch
- Timestamp:
- 04/26/11 15:39:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs
r6042 r6053 349 349 } 350 350 private void ParameterizeMainLoop() { 351 MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 352 MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 353 MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 351 if (Problem != null) { 352 MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 353 MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 354 MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 355 } 354 356 if (MoveEvaluator != null) 355 357 MainLoop.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 356 358 } 357 359 private void ParameterizeStochasticOperator(IOperator op) { 358 if (op is IStochasticOperator) 359 ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 360 if (op is IStochasticOperator) { 361 IStochasticOperator stOp = (IStochasticOperator)op; 362 stOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName; 363 stOp.RandomParameter.Hidden = true; 364 } 360 365 } 361 366 private void ParameterizeMoveGenerators() { 362 367 if (Problem != null) { 363 foreach (IMultiMoveGenerator generator in Problem.Operators.OfType<IMultiMoveGenerator>()) 368 foreach (IMultiMoveGenerator generator in Problem.Operators.OfType<IMultiMoveGenerator>()) { 364 369 generator.SampleSizeParameter.ActualName = SampleSizeParameter.Name; 370 generator.SampleSizeParameter.Hidden = true; 371 } 365 372 } 366 373 } … … 368 375 foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) { 369 376 op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 377 op.QualityParameter.Hidden = true; 370 378 } 371 379 } … … 373 381 foreach (IMoveMaker op in Problem.Operators.OfType<IMoveMaker>()) { 374 382 op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 375 if (MoveEvaluator != null) 383 op.QualityParameter.Hidden = true; 384 if (MoveEvaluator != null) { 376 385 op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 386 op.MoveQualityParameter.Hidden = true; 387 } else { 388 op.MoveQualityParameter.Hidden = false; 389 } 377 390 } 378 391 } 379 392 private void ParameterizeAnalyzers() { 380 393 moveQualityAnalyzer.ResultsParameter.ActualName = "Results"; 394 moveQualityAnalyzer.ResultsParameter.Hidden = true; 381 395 if (Problem != null) { 382 396 moveQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 383 if (MoveEvaluator != null) 397 moveQualityAnalyzer.MaximizationParameter.Hidden = true; 398 if (MoveEvaluator != null) { 384 399 moveQualityAnalyzer.QualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 400 moveQualityAnalyzer.QualityParameter.Hidden = true; 401 } else moveQualityAnalyzer.QualityParameter.Hidden = false; 385 402 moveQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 403 moveQualityAnalyzer.BestKnownQualityParameter.Hidden = true; 404 } else { 405 moveQualityAnalyzer.MaximizationParameter.Hidden = false; 406 moveQualityAnalyzer.BestKnownQualityParameter.Hidden = false; 386 407 } 387 408 } … … 390 411 foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) { 391 412 op.IterationsParameter.ActualName = "Iterations"; 413 op.IterationsParameter.Hidden = true; 392 414 op.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name; 415 op.MaximumIterationsParameter.Hidden = true; 393 416 } 394 417 }
Note: See TracChangeset
for help on using the changeset viewer.