Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/17/11 01:04:30 (14 years ago)
Author:
cneumuel
Message:

#1215

  • manipulators for one and all parameters
  • SolutionCache to avoid multiple evaluations of equal solutions
  • RunsAnalyzer which stores all base level runs
  • ItemDictionaryView for runs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/MetaOptimizationProblem.cs

    r5293 r5303  
    101101      get { return Operators.OfType<ReferenceQualityAnalyzer>().FirstOrDefault(); }
    102102    }
    103     #endregion
    104 
    105     public MetaOptimizationProblem() : base() {
     103    private RunsAnalyzer RunsAnalyzer {
     104      get { return Operators.OfType<RunsAnalyzer>().FirstOrDefault(); }
     105    }
     106    #endregion
     107
     108    public MetaOptimizationProblem()
     109      : base() {
    106110      Parameters.Add(new ValueParameter<EngineAlgorithm>(AlgorithmTypeParameterName, "The algorithm which's parameters should be optimized.", new GeneticAlgorithm()));
    107111      Parameters.Add(new ValueParameter<ISingleObjectiveProblem>(ProblemTypeParameterName, "The problem type.", new SingleObjectiveTestFunctionProblem()));
     
    110114      Parameters.Add(new ValueParameter<IntValue>(RepetitionsParameterName, "The number of evaluations for each problem.", new IntValue(3)));
    111115
    112       var validIntManipulators = new ItemSet<IIntValueManipulator>( ApplicationManager.Manager.GetInstances<IIntValueManipulator>());
     116      var validIntManipulators = new ItemSet<IIntValueManipulator>(ApplicationManager.Manager.GetInstances<IIntValueManipulator>());
    113117      var validDoubleManipulators = new ItemSet<IDoubleValueManipulator>(ApplicationManager.Manager.GetInstances<IDoubleValueManipulator>());
    114118      var validIntCrossovers = new ItemSet<IIntValueCrossover>(ApplicationManager.Manager.GetInstances<IIntValueCrossover>());
     
    137141    [StorableConstructor]
    138142    private MetaOptimizationProblem(bool deserializing) : base(deserializing) { }
    139     private MetaOptimizationProblem(MetaOptimizationProblem original, Cloner cloner) : base(original, cloner) {
     143    private MetaOptimizationProblem(MetaOptimizationProblem original, Cloner cloner)
     144      : base(original, cloner) {
    140145      // todo
    141146      this.RegisterParameterEvents();
     
    157162      ProblemTypeParameter.ValueChanged += new EventHandler(ProblemTypeParameter_ValueChanged);
    158163    }
    159    
     164
    160165    private void InitializeOperators() {
    161166      Operators.AddRange(ApplicationManager.Manager.GetInstances<IParameterConfigurationOperator>().Cast<IOperator>());
    162167      Operators.Add(new BestParameterConfigurationAnalyzer());
    163168      Operators.Add(new ReferenceQualityAnalyzer());
     169      Operators.Add(new RunsAnalyzer());
    164170    }
    165171    private void ParameterizeSolutionCreator() {
     
    174180      if (ReferenceQualityAnalyzer != null) {
    175181        ReferenceQualityAnalyzer.ParameterConfigurationParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName;
     182      }
     183      if (RunsAnalyzer != null) {
     184        RunsAnalyzer.ParameterConfigurationParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName;
    176185      }
    177186    }
Note: See TracChangeset for help on using the changeset viewer.