Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/11 19:26:58 (14 years ago)
Author:
cneumuel
Message:

#1215

  • implemented optimization of problem parameters
File:
1 edited

Legend:

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

    r5655 r5665  
    269269      // the first problem in the list is always the instance for the algorithm - this way some basic wiring between problem and algorithm can be sustained
    270270      if (e.Items.Single().Index == 0) {
    271         ParameterConfigurationTreeParameter.ActualValue = new ParameterConfigurationTree(CreateAlgorithm(AlgorithmType.Value, e.Items.Single().Value));
     271        ParameterConfigurationTreeParameter.ActualValue = new ParameterConfigurationTree(CreateAlgorithm(AlgorithmType.Value, e.Items.Single().Value), e.Items.Single().Value);
    272272
    273273        // special for DataAnalysisProblem: Because of wiring between algorithm and problem, ParameterConfigurationTree needs to be recreated on Reset event
     
    291291
    292292    private void DataAnalysisProblem_Reset(object sender, EventArgs e) {
    293       ParameterConfigurationTreeParameter.ActualValue = new ParameterConfigurationTree(CreateAlgorithm(AlgorithmType.Value, Problems.First()));
     293      ParameterConfigurationTreeParameter.ActualValue = new ParameterConfigurationTree(CreateAlgorithm(AlgorithmType.Value, Problems.First()), Problems.First());
    294294    }
    295295    #endregion
     
    304304      AlgorithmType.Value = algorithm.GetType();
    305305      if (algorithm.Problem != null) ProblemType.Value = algorithm.Problem.GetType();
    306       ParameterConfigurationTreeParameter.ActualValue = new ParameterConfigurationTree(algorithm);
    307       if (algorithm.Problem != null) Problems.Add((IProblem)algorithm.Problem);
     306      if (algorithm.Problem != null) {
     307        Problems.Clear();
     308        Problems.Add((IProblem)algorithm.Problem);
     309      }
     310      ParameterConfigurationTreeParameter.ActualValue = new ParameterConfigurationTree(algorithm, Problems.First());
     311     
    308312    }
    309313  }
Note: See TracChangeset for help on using the changeset viewer.