Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/15/10 15:43:43 (14 years ago)
Author:
cneumuel
Message:

#1215

  • optional parameter values now can be null
  • problem type can now be set specifically
  • values are constrained to the encoding of the Problem
  • moved repetitions parameter to MetaOptimizationProblem
File:
1 edited

Legend:

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

    r5087 r5110  
    1818  [StorableClass]
    1919  public class MetaOptimizationEvaluator : SingleSuccessorOperator, IMetaOptimizationEvaluator {
    20     private const string RepetitionsParameterName = "Repetitions";
    21 
    2220    private bool algorithmStopped;
    2321
     
    2624    }
    2725    public ILookupParameter<EngineAlgorithm> AlgorithmParameter {
    28       get { return (ILookupParameter<EngineAlgorithm>)Parameters["Algorithm"]; }
     26      get { return (ILookupParameter<EngineAlgorithm>)Parameters[MetaOptimizationProblem.AlgorithmTypeParameterName]; }
    2927    }
    3028    public ILookupParameter<IItemList<ISingleObjectiveProblem>> ProblemsParameter {
    31       get { return (ILookupParameter<IItemList<ISingleObjectiveProblem>>)Parameters["Problems"]; }
     29      get { return (ILookupParameter<IItemList<ISingleObjectiveProblem>>)Parameters[MetaOptimizationProblem.ProblemsParameterName]; }
    3230    }
    3331    public ILookupParameter<ParameterConfigurationTree> ParameterConfigurationParameter {
    3432      get { return (ILookupParameter<ParameterConfigurationTree>)Parameters["ParameterConfigurationTree"]; }
    3533    }
    36     public ValueParameter<IntValue> RepetitionsParameter {
    37       get { return (ValueParameter<IntValue>)Parameters[RepetitionsParameterName]; }
     34    public LookupParameter<IntValue> RepetitionsParameter {
     35      get { return (LookupParameter<IntValue>)Parameters[MetaOptimizationProblem.RepetitionsParameterName]; }
    3836    }
    3937
    4038    public IntValue Repetitions {
    41       get { return RepetitionsParameter.Value; }
    42       set { RepetitionsParameter.Value = value; }
     39      get { return RepetitionsParameter.ActualValue; }
    4340    }
    4441
     
    4643      : base() {
    4744      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The evaluated quality of the ParameterVector."));
    48       Parameters.Add(new LookupParameter<EngineAlgorithm>("Algorithm", "Missing description."));
    49       Parameters.Add(new LookupParameter<IItemList<ISingleObjectiveProblem>>("Problems", "Missing description."));
     45      Parameters.Add(new LookupParameter<EngineAlgorithm>(MetaOptimizationProblem.AlgorithmTypeParameterName, "Missing description."));
     46      Parameters.Add(new LookupParameter<IItemList<ISingleObjectiveProblem>>(MetaOptimizationProblem.ProblemsParameterName, "Missing description."));
    5047      Parameters.Add(new LookupParameter<ParameterConfigurationTree>("ParameterConfigurationTree", "Missing description."));
    51       Parameters.Add(new ValueParameter<IntValue>(RepetitionsParameterName, "Number of evaluations for one individual.", new IntValue(3)));
     48      Parameters.Add(new LookupParameter<IntValue>(MetaOptimizationProblem.RepetitionsParameterName, "Number of evaluations on one problem."));
    5249    }
    5350
Note: See TracChangeset for help on using the changeset viewer.