Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10240


Ignore:
Timestamp:
12/18/13 14:08:20 (11 years ago)
Author:
pfleck
Message:

Deleted Runs on Algorithm-Cloning for Preprocessing.

Location:
branches/DataPreprocessing
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataPreprocessingView.cs

    r10221 r10240  
    2828using HeuristicLab.MainForm;
    2929using HeuristicLab.MainForm.WindowsForms;
     30using HeuristicLab.Optimization;
    3031using HeuristicLab.Problems.DataAnalysis;
    3132
     
    7172      cloner.RegisterClonedObject(Content.DataAnalysisProblemData.TestPartition, Data.TestPartition);
    7273      cloner.RegisterClonedObject(Content.DataAnalysisProblemData.InputVariables, variables);
     74      if (Content.Algorithm != null) {
     75        cloner.RegisterClonedObject(Content.Algorithm.Runs, new RunCollection { OptimizerName = Content.Algorithm.Name });
     76      }
    7377
    7478      var item = cloner.Clone(Content.ParentItem);
    75 
    7679      MainFormManager.MainForm.ShowContent(item);
    77 
    78       //var clone = null;
    79 
    8080    }
    8181  }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj

    r10239 r10240  
    150150      <Name>HeuristicLab.MainForm-3.3</Name>
    151151    </ProjectReference>
     152    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
     153      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
     154      <Name>HeuristicLab.Optimization-3.3</Name>
     155    </ProjectReference>
    152156    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    153157      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs

    r10221 r10240  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Optimization;
    2425using HeuristicLab.Problems.DataAnalysis;
    2526
     
    2728  [Item("PreprocessingContext", "PreprocessingContext")]
    2829  public class PreprocessingContext : Item, IPreprocessingContext {
    29     public PreprocessingContext(IPreprocessingData data, IItem parentItem, IDataAnalysisProblemData dataAnalysisProblemData) {
     30    public PreprocessingContext(IPreprocessingData data, IItem parentItem, IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm) {
    3031      Data = data;
    3132      ParentItem = parentItem;
    3233      DataAnalysisProblemData = dataAnalysisProblemData;
     34      Algorithm = algorithm;
    3335    }
    3436
     
    3840      ParentItem = original.ParentItem;
    3941      DataAnalysisProblemData = original.DataAnalysisProblemData;
     42      Algorithm = original.Algorithm;
    4043    }
    4144
     
    4952    public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; }
    5053
     54    public IAlgorithm Algorithm { get; private set; }
     55
    5156    public override IDeepCloneable Clone(Cloner cloner) {
    5257      return new PreprocessingContext(this, cloner);
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs

    r10221 r10240  
    2121
    2222using HeuristicLab.Core;
     23using HeuristicLab.Optimization;
    2324using HeuristicLab.Problems.DataAnalysis;
    2425namespace HeuristicLab.DataPreprocessing {
     
    3233
    3334    IDataAnalysisProblemData DataAnalysisProblemData { get; }
     35
     36    IAlgorithm Algorithm { get; }
    3437  }
    3538}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Plugin.cs.frame

    r10221 r10240  
    3333  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3434  [PluginDependency("HeuristicLab.Persistence", "3.3")]
     35  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    3536  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    3637  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs

    r10236 r10240  
    3030using HeuristicLab.MainForm;
    3131using HeuristicLab.MainForm.WindowsForms;
     32using HeuristicLab.Optimization;
    3233
    3334namespace HeuristicLab.Problems.DataAnalysis.Views {
     
    103104
    104105    private void DataPreprocessingButton_Click(object sender, EventArgs e) {
    105       IItem parentItem = GetMostOuterContent();
     106      IAlgorithm algorithm;
     107      IItem parentItem = GetMostOuterContent(out algorithm);
    106108      var preprocessingData = new PreprocessingData(Content);
    107109
    108110      // TODO: ProblemDataView depends on DataPreprocessing
    109111      //ApplicationManager.Manager.GetInstances<IPreprocessingContext>();
    110       var context = new PreprocessingContext(preprocessingData, parentItem, Content);
     112      var context = new PreprocessingContext(preprocessingData, parentItem, Content, algorithm);
    111113      MainFormManager.MainForm.ShowContent(context);
    112114    }
    113115
    114     private IItem GetMostOuterContent() {
     116    private IItem GetMostOuterContent(out IAlgorithm algorithm) {
     117      algorithm = null;
    115118      Control control = this;
    116119      ItemView itemView = null;
    117120      do {
    118121        control = control.Parent;
    119         if (control is ItemView)
     122        if (control is ItemView) {
    120123          itemView = (ItemView)control;
     124          if (itemView.Content is IAlgorithm) {
     125            algorithm = (IAlgorithm)itemView.Content;
     126          }
     127        }
    121128      } while (control != null);
    122129
Note: See TracChangeset for help on using the changeset viewer.