Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/26/11 15:39:28 (14 years ago)
Author:
abeham
Message:

#1377

  • Added hiding to some more algorithms and problems
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs

    r5809 r6053  
    429429    }
    430430    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      }
    433436    }
    434437    private void ParameterizeMoveGenerators() {
    435438      if (Problem != null) {
    436         foreach (IMultiMoveGenerator generator in Problem.Operators.OfType<IMultiMoveGenerator>())
     439        foreach (IMultiMoveGenerator generator in Problem.Operators.OfType<IMultiMoveGenerator>()) {
    437440          generator.SampleSizeParameter.ActualName = SampleSizeParameter.Name;
     441          generator.SampleSizeParameter.Hidden = true;
     442        }
    438443      }
    439444    }
     
    441446      foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) {
    442447        op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     448        op.QualityParameter.Hidden = true;
    443449      }
    444450    }
     
    446452      foreach (IMoveMaker op in Problem.Operators.OfType<IMoveMaker>()) {
    447453        op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
    448         if (MoveEvaluator != null)
     454        op.QualityParameter.Hidden = true;
     455        if (MoveEvaluator != null) {
    449456          op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName;
     457          op.MoveQualityParameter.Hidden = true;
     458        } else {
     459          op.MoveQualityParameter.Hidden = false;
     460        }
    450461      }
    451462    }
     
    453464      foreach (ITabuMaker op in Problem.Operators.OfType<ITabuMaker>()) {
    454465        op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
    455         if (MoveEvaluator != null)
     466        op.QualityParameter.Hidden = true;
     467        if (MoveEvaluator != null) {
    456468          op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName;
     469          op.MoveQualityParameter.Hidden = true;
     470        } else {
     471          op.MoveQualityParameter.Hidden = false;
     472        }
    457473      }
    458474    }
    459475    private void ParameterizeTabuChecker() {
    460476      foreach (ITabuChecker op in Problem.Operators.OfType<ITabuChecker>()) {
    461         if (MoveEvaluator != null)
     477        if (MoveEvaluator != null) {
    462478          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) {
    464484          op.MoveTabuParameter.ActualName = TabuChecker.MoveTabuParameter.ActualName;
     485          op.MoveTabuParameter.Hidden = true;
     486        } else {
     487          op.MoveTabuParameter.Hidden = false;
     488        }
    465489      }
    466490    }
    467491    private void ParameterizeAnalyzers() {
    468492      moveQualityAnalyzer.ResultsParameter.ActualName = "Results";
     493      moveQualityAnalyzer.ResultsParameter.Hidden = true;
    469494      tabuNeighborhoodAnalyzer.ResultsParameter.ActualName = "Results";
     495      tabuNeighborhoodAnalyzer.ResultsParameter.Hidden = true;
    470496      tabuNeighborhoodAnalyzer.PercentTabuParameter.ActualName = "PercentTabu";
     497      tabuNeighborhoodAnalyzer.PercentTabuParameter.Hidden = true;
    471498      if (Problem != null) {
    472499        moveQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
    473         if (MoveEvaluator != null)
     500        moveQualityAnalyzer.MaximizationParameter.Hidden = true;
     501        if (MoveEvaluator != null) {
    474502          moveQualityAnalyzer.QualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName;
     503          moveQualityAnalyzer.QualityParameter.Hidden = true;
     504        } else {
     505          moveQualityAnalyzer.QualityParameter.Hidden = false;
     506        }
    475507        moveQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
    476         if (TabuChecker != null)
     508        moveQualityAnalyzer.BestKnownQualityParameter.Hidden = true;
     509        if (TabuChecker != null) {
    477510          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;
    478520      }
    479521    }
     
    482524        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
    483525          op.IterationsParameter.ActualName = "Iterations";
     526          op.IterationsParameter.Hidden = true;
    484527          op.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name;
     528          op.MaximumIterationsParameter.Hidden = true;
    485529        }
    486530      }
Note: See TracChangeset for help on using the changeset viewer.