Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/02/21 16:42:16 (3 years ago)
Author:
dpiringe
Message:

#3026

  • added a first version of a new feature called ResultCollectionPostProcessors, which should transform/process the results of an optimizer run
    • created a new interface IResultCollectionPostProcessor
    • created a new class SymRegPythonPostProcessor, which formats all ISymbolicRegressionSolution with the usage of the SymbolicDataAnalysisExpressionPythonFormatter
    • changed the generation and instantiation of templates to handle this new feature
    • the template files contains a new area PostProcessors
    • added functionality in Runner to use these new type of result processing
    • added a new tab in ExportJsonDialog to configure PostProcessors
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.Designer.cs

    r17828 r18046  
    1 namespace HeuristicLab.JsonInterface.OptimizerIntegration {
     1using HeuristicLab.Core;
     2
     3namespace HeuristicLab.JsonInterface.OptimizerIntegration {
    24  partial class ExportJsonDialog {
    35    /// <summary>
     
    3840      this.tabPage1 = new System.Windows.Forms.TabPage();
    3941      this.tabPage2 = new System.Windows.Forms.TabPage();
     42      this.tabPage3 = new System.Windows.Forms.TabPage();
    4043      this.label1 = new System.Windows.Forms.Label();
    4144      this.textBoxTemplateName = new System.Windows.Forms.TextBox();
     
    172175      this.splitContainer2.SplitterDistance = 380;
    173176      this.splitContainer2.TabIndex = 9;
     177      // postProcessorListView
     178      this.postProcessorListView = new Core.Views.CheckedItemListView<IResultCollectionPostProcessor>();
     179      this.postProcessorListView.Content = new CheckedItemList<IResultCollectionPostProcessor>();
     180      this.postProcessorListView.Content.Add(new SymRegPythonPostProcessor());
     181      this.postProcessorListView.Location = new System.Drawing.Point(0, 6);
     182      this.postProcessorListView.Dock = System.Windows.Forms.DockStyle.Fill;
    174183      //
    175184      // tabControl1
     
    180189      this.tabControl1.Controls.Add(this.tabPage1);
    181190      this.tabControl1.Controls.Add(this.tabPage2);
     191      this.tabControl1.Controls.Add(this.tabPage3);
    182192      this.tabControl1.Location = new System.Drawing.Point(12, 38);
    183193      this.tabControl1.Name = "tabControl1";
     
    207217      this.tabPage2.Text = "Results";
    208218      this.tabPage2.UseVisualStyleBackColor = true;
     219      //
     220      // tabPage3
     221      //
     222      this.tabPage3.Controls.Add(this.postProcessorListView);
     223      this.tabPage3.Location = new System.Drawing.Point(4, 22);
     224      this.tabPage3.Name = "tabPage3";
     225      this.tabPage3.Size = new System.Drawing.Size(802, 505);
     226      this.tabPage3.TabIndex = 2;
     227      this.tabPage3.Text = "Post Processors";
     228      this.tabPage3.UseVisualStyleBackColor = true;
    209229      //
    210230      // label1
     
    289309    private System.Windows.Forms.GroupBox groupBox;
    290310    private System.Windows.Forms.Panel panelResultDetails;
     311    private System.Windows.Forms.TabPage tabPage3;
     312    private Core.Views.CheckedItemListView<IResultCollectionPostProcessor> postProcessorListView;
    291313  }
    292314}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs

    r18043 r18046  
    44using System.Drawing;
    55using System.IO;
     6using System.Linq;
    67using System.Windows.Forms;
    78using HeuristicLab.Common;
     9using HeuristicLab.Core;
    810using HeuristicLab.Optimization;
    911using HeuristicLab.PluginInfrastructure;
     
    2022    private IOptimizer Optimizer { get; set; }
    2123    private IList<IJsonItemVM> VMs { get; set; }
     24    private ICheckedItemList<IResultCollectionPostProcessor> PostProcessors { get; set; }
    2225    #endregion
    2326
     
    2730      set {
    2831        content = value;
    29 
     32        //CheckedItemListView
    3033        #region Clear
    3134        VMs = new List<IJsonItemVM>();
     
    3336        treeViewResults.Nodes.Clear();
    3437        #endregion
    35 
    3638        Optimizer = content as IOptimizer;
    3739        if(Optimizer != null) {
     
    5961    public ExportJsonDialog() {
    6062      InitializeComponent();
     63      this.PostProcessors = this.postProcessorListView.Content;
    6164      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
    6265      InitCache();
     
    7174      if (FolderBrowserDialog.ShowDialog() == DialogResult.OK) {
    7275        try {
     76          //foreach(var x in PostProcessors.CheckedItems)
     77           
    7378          JsonTemplateGenerator.GenerateTemplate(
    7479            Path.Combine(FolderBrowserDialog.SelectedPath, textBoxTemplateName.Text),
    75             Optimizer, Root);
     80            Optimizer, Root, PostProcessors.CheckedItems.Select(x => x.Value));
    7681          Close();
    7782        } catch (Exception ex) {
Note: See TracChangeset for help on using the changeset viewer.