Free cookie consent management tool by TermsFeed Policy Generator

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

#1215

  • worked on configurability of SymbolicExpressionGrammar
File:
1 edited

Legend:

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

    r5665 r5927  
    5959        for (int j = 0; j < problems.Count; j++) {
    6060          IScope child = new Scope(string.Format("Problem {0}, Repetition {1}", j, i));
    61           var algorithm = (IAlgorithm)Activator.CreateInstance(algorithmType);
    62           algorithm.Problem = (IProblem)problems[j].Clone();
    63           ((EngineAlgorithm)algorithm).Engine = new SequentialEngine.SequentialEngine();
    64 
    65           //((GeneticAlgorithm)algorithm).PopulationSize.Value = 10;
    66           //((GeneticAlgorithm)algorithm).MaximumGenerations.Value = 10;
    67 
    68           parameterConfiguration.Parameterize(algorithm);
     61          var algorithm = MetaOptimizationUtil.CreateParameterizedAlgorithmInstance(parameterConfiguration, algorithmType, (IProblem)problems[j].Clone());
    6962          child.Variables.Add(new Variable("Algorithm", algorithm));
    7063          child.Variables.Add(new Variable("ProblemIndex", new IntValue(j)));
Note: See TracChangeset for help on using the changeset viewer.