Free cookie consent management tool by TermsFeed Policy Generator

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

#1465

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

Legend:

Unmodified
Added
Removed
  • branches/histogram

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

    r5809 r6055  
    305305    }
    306306    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      }
    309312    }
    310313    private void ParameterizeSelectors() {
     
    312315        selector.CopySelected = new BoolValue(true);
    313316        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSizeParameter.Value.Value - ElitesParameter.Value.Value));
     317        selector.NumberOfSelectedSubScopesParameter.Hidden = true;
    314318        ParameterizeStochasticOperator(selector);
    315319      }
     
    317321        foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
    318322          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     323          selector.MaximizationParameter.Hidden = true;
    319324          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     325          selector.QualityParameter.Hidden = true;
    320326        }
    321327      }
     
    323329    private void ParameterizeAnalyzers() {
    324330      qualityAnalyzer.ResultsParameter.ActualName = "Results";
     331      qualityAnalyzer.ResultsParameter.Hidden = true;
    325332      if (Problem != null) {
    326333        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     334        qualityAnalyzer.MaximizationParameter.Hidden = true;
    327335        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
    328336        qualityAnalyzer.QualityParameter.Depth = 1;
     337        qualityAnalyzer.QualityParameter.Hidden = true;
    329338        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
     339        qualityAnalyzer.BestKnownQualityParameter.Hidden = true;
    330340      }
    331341    }
     
    334344        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
    335345          op.IterationsParameter.ActualName = "Generations";
     346          op.IterationsParameter.Hidden = true;
    336347          op.MaximumIterationsParameter.ActualName = "MaximumGenerations";
     348          op.MaximumIterationsParameter.Hidden = true;
    337349        }
    338350      }
  • 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.