Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/22 16:23:50 (3 years ago)
Author:
pfleck
Message:

#3040

  • Count batch evaluation as number of evaluations for SOP manipulator.
  • Added the functionality to remove duplicate data matrices or similar to duplicated datasets to remove the size of segment optimization experiment runs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/ShrinkDataAnalysisRunsMenuItem.cs

    r17180 r18212  
    2525using System.Collections.Generic;
    2626using System.Linq;
     27using System.Threading.Tasks;
     28using System.Windows.Forms;
    2729using HeuristicLab.MainForm;
    2830using HeuristicLab.Optimization;
    2931using HeuristicLab.Optimizer;
    30 
     32using HeuristicLab.Problems.DataAnalysis.Symbolic.SegmentOptimization;
    3133using MenuItem = HeuristicLab.MainForm.WindowsForms.MenuItem;
    3234
     
    6769      }
    6870
    69       ToolStripItem.Enabled = runCollection.Any(run => run.Parameters.Any(p => p.Value is IDataAnalysisProblemData));
     71      ToolStripItem.Enabled = true;
     72      //ToolStripItem.Enabled = runCollection.Any(run => run.Parameters.Any(p => p.Value is IDataAnalysisProblemData));
    7073    }
    7174
    72     public override void Execute() {
     75    public override async void Execute() {
    7376      IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView;
    7477      var content = activeView.Content;
    7578      Progress.Show(content, "Removing duplicate datasets.", ProgressMode.Indeterminate);
     79     
     80      var results = await Task.Run(() => {
     81        DatasetUtil.RemoveDuplicateDatasets(content);
     82        return SegmentOptimizationProblem.RemoveDuplicateMatrices(content);
     83      });
    7684
    77       Action<IContentView> action = (view) => DatasetUtil.RemoveDuplicateDatasets(view.Content);
    78 
    79       action.BeginInvoke(activeView, delegate (IAsyncResult result) {
    80         action.EndInvoke(result);
    81         Progress.Hide(content);
    82       }, null);
     85      Progress.Hide(content);
     86      MessageBox.Show($"DoubleMatrix-Count:{results.Item1}\nDoubleMatrix-RemovedDuplicates:{results.Item2}\nQualities-Removed:{results.Item3}");
    8387    }
    8488  }
Note: See TracChangeset for help on using the changeset viewer.