Changeset 5313 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Evaluators
- Timestamp:
- 01/17/11 19:17:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Evaluators/ParameterConfigurationEvaluator.cs
r5303 r5313 27 27 get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; } 28 28 } 29 public ILookupParameter< EngineAlgorithm> AlgorithmParameter {30 get { return (ILookupParameter< EngineAlgorithm>)Parameters[MetaOptimizationProblem.AlgorithmTypeParameterName]; }29 public ILookupParameter<TypeValue> AlgorithmTypeParameter { 30 get { return (ILookupParameter<TypeValue>)Parameters[MetaOptimizationProblem.AlgorithmTypeParameterName]; } 31 31 } 32 32 public ILookupParameter<IItemList<ISingleObjectiveProblem>> ProblemsParameter { … … 57 57 : base() { 58 58 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The evaluated quality of the ParameterVector.")); 59 Parameters.Add(new LookupParameter< EngineAlgorithm>(MetaOptimizationProblem.AlgorithmTypeParameterName, "Missing description."));59 Parameters.Add(new LookupParameter<TypeValue>(MetaOptimizationProblem.AlgorithmTypeParameterName, "Missing description.")); 60 60 Parameters.Add(new LookupParameter<IItemList<ISingleObjectiveProblem>>(MetaOptimizationProblem.ProblemsParameterName, "Missing description.")); 61 61 Parameters.Add(new LookupParameter<ParameterConfigurationTree>("ParameterConfigurationTree", "Missing description.")); … … 77 77 public override IOperation Apply() { 78 78 ParameterConfigurationTree parameterConfiguration = ParameterConfigurationParameter.ActualValue; 79 EngineAlgorithm algorithm = (EngineAlgorithm)A lgorithmParameter.ActualValue;79 EngineAlgorithm algorithm = (EngineAlgorithm)Activator.CreateInstance(AlgorithmTypeParameter.ActualValue.Value); 80 80 IItemList<ISingleObjectiveProblem> problems = ProblemsParameter.ActualValue; 81 81 ItemDictionary<StringValue, RunCollection> runsCache = ResultsParameter.ActualValue.ContainsKey("Runs") ? (ItemDictionary<StringValue, RunCollection>)ResultsParameter.ActualValue["Runs"].Value : null;
Note: See TracChangeset
for help on using the changeset viewer.