Ignore:
Timestamp:
04/27/11 09:22:20 (8 years ago)
Author:
abeham
Message:

#1465

  • updated branch from trunk
Location:
branches/histogram
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram

  • branches/histogram/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs

    r5809 r6055  
    410410    }
    411411    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      }
    414417    }
    415418    private void ParameterizeSelectors() {
     
    417420        selector.CopySelected = new BoolValue(true);
    418421        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSize.Value - Elites.Value));
     422        selector.NumberOfSelectedSubScopesParameter.Hidden = true;
    419423        ParameterizeStochasticOperator(selector);
    420424      }
     
    422426        selector.CopySelected = new BoolValue(true);
    423427        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue((int)Math.Ceiling(PopulationSize.Value * MigrationRate.Value));
     428        selector.NumberOfSelectedSubScopesParameter.Hidden = true;
    424429        ParameterizeStochasticOperator(selector);
    425430      }
     
    430435        foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
    431436          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     437          selector.MaximizationParameter.Hidden = true;
    432438          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     439          selector.QualityParameter.Hidden = true;
    433440        }
    434441        foreach (ISingleObjectiveSelector selector in EmigrantsSelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
    435442          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     443          selector.MaximizationParameter.Hidden = true;
    436444          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     445          selector.QualityParameter.Hidden = true;
    437446        }
    438447        foreach (ISingleObjectiveReplacer selector in ImmigrationReplacerParameter.ValidValues.OfType<ISingleObjectiveReplacer>()) {
    439448          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     449          selector.MaximizationParameter.Hidden = true;
    440450          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     451          selector.QualityParameter.Hidden = true;
    441452        }
    442453      }
     
    444455    private void ParameterizeAnalyzers() {
    445456      islandQualityAnalyzer.ResultsParameter.ActualName = "Results";
     457      islandQualityAnalyzer.ResultsParameter.Hidden = true;
    446458      islandQualityAnalyzer.QualityParameter.Depth = 1;
    447459      qualityAnalyzer.ResultsParameter.ActualName = "Results";
     460      qualityAnalyzer.ResultsParameter.Hidden = true;
    448461      qualityAnalyzer.QualityParameter.Depth = 2;
    449462
    450463      if (Problem != null) {
    451464        islandQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     465        islandQualityAnalyzer.MaximizationParameter.Hidden = true;
    452466        islandQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     467        islandQualityAnalyzer.QualityParameter.Hidden = true;
    453468        islandQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
     469        islandQualityAnalyzer.BestKnownQualityParameter.Hidden = true;
    454470        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     471        qualityAnalyzer.MaximizationParameter.Hidden = true;
    455472        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     473        qualityAnalyzer.QualityParameter.Hidden = true;
    456474        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
     475        qualityAnalyzer.BestKnownQualityParameter.Hidden = true;
    457476      }
    458477    }
     
    461480        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
    462481          op.IterationsParameter.ActualName = "Generations";
     482          op.IterationsParameter.Hidden = true;
    463483          op.MaximumIterationsParameter.ActualName = "MaximumGenerations";
     484          op.MaximumIterationsParameter.Hidden = true;
    464485        }
    465486      }
Note: See TracChangeset for help on using the changeset viewer.