Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/20/11 01:30:44 (13 years ago)
Author:
cneumuel
Message:

#1215

  • made all IAlgorithm types compatible to be loaded into MetaOptimization.
  • valid problem types are now automatically set
File:
1 edited

Legend:

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

    r5328 r5337  
    7272
    7373          if (dlgResult == DialogResult.OK) {
    74             EngineAlgorithm algorithm = Content.Algorithm;
     74            IAlgorithm algorithm = Content.Algorithm;
    7575            if(Content.Problems.Count > 0) algorithm.Problem = Content.Problems.First();
    7676            Experiment experiment;
     
    9393      Type type = e.Data.GetData("Type") as Type;
    9494      if ((type != null) && (Content.AlgorithmType.ValidTypes.Contains(type))) {
    95         EngineAlgorithm algorithm = e.Data.GetData("Value") as EngineAlgorithm;
    96         if (algorithm.Problem == null || Content.ProblemType.ValidTypes.Contains(algorithm.Problem.GetType())) {
     95        IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm;
     96        if (algorithm != null && algorithm.Problem == null || Content.ProblemType.ValidTypes.Contains(algorithm.Problem.GetType())) {
    9797          e.Effect = DragDropEffects.Copy;
    9898        }
     
    101101    protected void parameterCollectionView_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) {
    102102      if (e.Effect != DragDropEffects.None) {
    103         EngineAlgorithm algorithm = e.Data.GetData("Value") as EngineAlgorithm;
     103        IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm;
    104104        Content.ImportAlgorithm(algorithm);
    105105      }
Note: See TracChangeset for help on using the changeset viewer.