Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/16 13:28:23 (8 years ago)
Author:
abeham
Message:

#2457:

  • improved mapping of problem instances by normalization (z-score) and handling of missing values (median)
  • enabled to select the characteristics that should be included in the mapping
  • improved speed of OKB download by calling service methods in parallel
Location:
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.cs

    r13722 r13752  
    5050      RegisterContentProblemEvents();
    5151      RegisterContentProblemInstancesEvents();
     52      RegisterContentProblemCharacteristicsEvents();
    5253      RegisterContentSolutionSeedingPoolEvents();
    5354      RegisterContentSuggestedInstancesEvents();
     
    7071    }
    7172
     73    private void RegisterContentProblemCharacteristicsEvents() {
     74      Content.ProblemCharacteristics.ItemsAdded += ContentOnProblemCharacteristicsChanged;
     75      Content.ProblemCharacteristics.ItemsReplaced += ContentOnProblemCharacteristicsChanged;
     76      Content.ProblemCharacteristics.ItemsRemoved += ContentOnProblemCharacteristicsChanged;
     77      Content.ProblemCharacteristics.CheckedItemsChanged += ContentOnProblemCharacteristicsChanged;
     78      Content.ProblemCharacteristics.CollectionReset += ContentOnProblemCharacteristicsChanged;
     79    }
     80
    7281    private void RegisterContentSolutionSeedingPoolEvents() {
    7382      Content.SolutionSeedingPool.CheckedItemsChanged += ContentOnSolutionSeedingPoolChanged;
     
    92101      DeregisterContentProblemEvents();
    93102      DeregisterContentProblemInstancesEvents();
     103      DeregisterContentProblemCharacteristicsEvents();
    94104      DeregisterContentSolutionSeedingPoolEvents();
    95105      DeregisterContentSuggestedInstancesEvents();
     
    110120      Content.ProblemInstances.CollectionReset -= ContentOnProblemInstancesChanged;
    111121      Content.ProblemInstances.ItemChanged -= ContentOnProblemInstancesChanged;
     122    }
     123
     124    private void DeregisterContentProblemCharacteristicsEvents() {
     125      Content.ProblemCharacteristics.ItemsAdded -= ContentOnProblemCharacteristicsChanged;
     126      Content.ProblemCharacteristics.ItemsReplaced -= ContentOnProblemCharacteristicsChanged;
     127      Content.ProblemCharacteristics.ItemsRemoved -= ContentOnProblemCharacteristicsChanged;
     128      Content.ProblemCharacteristics.CheckedItemsChanged -= ContentOnProblemCharacteristicsChanged;
     129      Content.ProblemCharacteristics.CollectionReset -= ContentOnProblemCharacteristicsChanged;
    112130    }
    113131
     
    136154    protected virtual void OnProblemSolutionsChanged() { }
    137155    protected virtual void OnProblemInstancesChanged() { }
     156    protected virtual void OnProblemCharacteristicsChanged() { }
    138157    protected virtual void OnSolutionSeedingPoolChanged() { }
    139158    protected virtual void OnSuggestedInstancesChanged() { }
     
    175194    }
    176195
     196    private void ContentOnProblemCharacteristicsChanged(object sender, EventArgs e) {
     197      if (InvokeRequired) Invoke((Action)OnProblemCharacteristicsChanged);
     198      else OnProblemCharacteristicsChanged();
     199    }
     200
    177201    private void ContentOnSolutionSeedingPoolChanged(object sender, EventArgs e) {
    178202      if (InvokeRequired) Invoke((Action)OnSolutionSeedingPoolChanged);
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.Designer.cs

    r13751 r13752  
    5252      this.problemInstancesTabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
    5353      this.mapTabPage = new System.Windows.Forms.TabPage();
    54       this.instancesTabPage = new System.Windows.Forms.TabPage();
    55       this.problemInstancesView = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    5654      this.mapSplitContainer = new System.Windows.Forms.SplitContainer();
     55      this.showCharacteristicsCheckBox = new System.Windows.Forms.CheckBox();
    5756      this.invPropCheckBox = new System.Windows.Forms.CheckBox();
    5857      this.sizeLabel = new System.Windows.Forms.Label();
     
    6160      this.sizeComboBox = new System.Windows.Forms.ComboBox();
    6261      this.projectionComboBox = new System.Windows.Forms.ComboBox();
    63       this.showCharacteristicsCheckBox = new System.Windows.Forms.CheckBox();
     62      this.instancesTabPage = new System.Windows.Forms.TabPage();
     63      this.problemInstancesView = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    6464      this.problemInstancesTabControl.SuspendLayout();
    6565      this.mapTabPage.SuspendLayout();
    66       this.instancesTabPage.SuspendLayout();
    6766      ((System.ComponentModel.ISupportInitialize)(this.mapSplitContainer)).BeginInit();
    6867      this.mapSplitContainer.Panel1.SuspendLayout();
    6968      this.mapSplitContainer.SuspendLayout();
    7069      ((System.ComponentModel.ISupportInitialize)(this.instanceMapChart)).BeginInit();
     70      this.instancesTabPage.SuspendLayout();
    7171      this.SuspendLayout();
    7272      //
     
    9696      this.mapTabPage.UseVisualStyleBackColor = true;
    9797      //
    98       // instancesTabPage
    99       //
    100       this.instancesTabPage.Controls.Add(this.problemInstancesView);
    101       this.instancesTabPage.Location = new System.Drawing.Point(4, 22);
    102       this.instancesTabPage.Name = "instancesTabPage";
    103       this.instancesTabPage.Padding = new System.Windows.Forms.Padding(3);
    104       this.instancesTabPage.Size = new System.Drawing.Size(992, 734);
    105       this.instancesTabPage.TabIndex = 0;
    106       this.instancesTabPage.Text = "Instances";
    107       this.instancesTabPage.UseVisualStyleBackColor = true;
    108       //
    109       // problemInstancesView
    110       //
    111       this.problemInstancesView.Caption = "View";
    112       this.problemInstancesView.Content = null;
    113       this.problemInstancesView.Dock = System.Windows.Forms.DockStyle.Fill;
    114       this.problemInstancesView.Enabled = false;
    115       this.problemInstancesView.Location = new System.Drawing.Point(3, 3);
    116       this.problemInstancesView.Name = "problemInstancesView";
    117       this.problemInstancesView.ReadOnly = false;
    118       this.problemInstancesView.Size = new System.Drawing.Size(986, 728);
    119       this.problemInstancesView.TabIndex = 0;
    120       this.problemInstancesView.ViewsLabelVisible = true;
    121       this.problemInstancesView.ViewType = null;
    122       //
    12398      // mapSplitContainer
    12499      //
     
    138113      this.mapSplitContainer.Panel1.Controls.Add(this.projectionComboBox);
    139114      this.mapSplitContainer.Panel1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 0);
     115      this.mapSplitContainer.Panel2Collapsed = true;
    140116      this.mapSplitContainer.Size = new System.Drawing.Size(986, 728);
    141117      this.mapSplitContainer.SplitterDistance = 847;
    142118      this.mapSplitContainer.TabIndex = 12;
     119      //
     120      // showCharacteristicsCheckBox
     121      //
     122      this.showCharacteristicsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     123      this.showCharacteristicsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
     124      this.showCharacteristicsCheckBox.Location = new System.Drawing.Point(957, 4);
     125      this.showCharacteristicsCheckBox.Name = "showCharacteristicsCheckBox";
     126      this.showCharacteristicsCheckBox.Size = new System.Drawing.Size(26, 23);
     127      this.showCharacteristicsCheckBox.TabIndex = 18;
     128      this.showCharacteristicsCheckBox.Text = "Detail";
     129      this.showCharacteristicsCheckBox.UseVisualStyleBackColor = true;
     130      this.showCharacteristicsCheckBox.CheckedChanged += new System.EventHandler(this.showCharacteristicsCheckBox_CheckedChanged);
    143131      //
    144132      // invPropCheckBox
     
    153141      this.invPropCheckBox.Text = "inverse proportional";
    154142      this.invPropCheckBox.UseVisualStyleBackColor = true;
     143      this.invPropCheckBox.CheckedChanged += new System.EventHandler(this.InvPropCheckBoxOnCheckedChanged);
    155144      //
    156145      // sizeLabel
     
    203192      this.instanceMapChart.Series.Add(series1);
    204193      this.instanceMapChart.Series.Add(series2);
    205       this.instanceMapChart.Size = new System.Drawing.Size(841, 692);
     194      this.instanceMapChart.Size = new System.Drawing.Size(980, 692);
    206195      this.instanceMapChart.TabIndex = 12;
    207196      //
     
    214203      this.sizeComboBox.Size = new System.Drawing.Size(273, 21);
    215204      this.sizeComboBox.TabIndex = 13;
     205      this.sizeComboBox.SelectedIndexChanged += new System.EventHandler(this.SizeComboBoxOnSelectedIndexChanged);
    216206      //
    217207      // projectionComboBox
     
    223213      this.projectionComboBox.Size = new System.Drawing.Size(158, 21);
    224214      this.projectionComboBox.TabIndex = 14;
    225       //
    226       // showCharacteristicsCheckBox
    227       //
    228       this.showCharacteristicsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    229       this.showCharacteristicsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
    230       this.showCharacteristicsCheckBox.Location = new System.Drawing.Point(818, 4);
    231       this.showCharacteristicsCheckBox.Name = "showCharacteristicsCheckBox";
    232       this.showCharacteristicsCheckBox.Size = new System.Drawing.Size(26, 23);
    233       this.showCharacteristicsCheckBox.TabIndex = 18;
    234       this.showCharacteristicsCheckBox.Text = "Detail";
    235       this.showCharacteristicsCheckBox.UseVisualStyleBackColor = true;
     215      this.projectionComboBox.SelectedIndexChanged += new System.EventHandler(this.ProjectionComboBoxOnSelectedIndexChanged);
     216      //
     217      // instancesTabPage
     218      //
     219      this.instancesTabPage.Controls.Add(this.problemInstancesView);
     220      this.instancesTabPage.Location = new System.Drawing.Point(4, 22);
     221      this.instancesTabPage.Name = "instancesTabPage";
     222      this.instancesTabPage.Padding = new System.Windows.Forms.Padding(3);
     223      this.instancesTabPage.Size = new System.Drawing.Size(992, 734);
     224      this.instancesTabPage.TabIndex = 0;
     225      this.instancesTabPage.Text = "Instances";
     226      this.instancesTabPage.UseVisualStyleBackColor = true;
     227      //
     228      // problemInstancesView
     229      //
     230      this.problemInstancesView.Caption = "View";
     231      this.problemInstancesView.Content = null;
     232      this.problemInstancesView.Dock = System.Windows.Forms.DockStyle.Fill;
     233      this.problemInstancesView.Enabled = false;
     234      this.problemInstancesView.Location = new System.Drawing.Point(3, 3);
     235      this.problemInstancesView.Name = "problemInstancesView";
     236      this.problemInstancesView.ReadOnly = false;
     237      this.problemInstancesView.Size = new System.Drawing.Size(986, 728);
     238      this.problemInstancesView.TabIndex = 0;
     239      this.problemInstancesView.ViewsLabelVisible = true;
     240      this.problemInstancesView.ViewType = null;
    236241      //
    237242      // UnderstandingProblemInstanceView
     
    244249      this.problemInstancesTabControl.ResumeLayout(false);
    245250      this.mapTabPage.ResumeLayout(false);
    246       this.instancesTabPage.ResumeLayout(false);
    247251      this.mapSplitContainer.Panel1.ResumeLayout(false);
    248252      this.mapSplitContainer.Panel1.PerformLayout();
     
    250254      this.mapSplitContainer.ResumeLayout(false);
    251255      ((System.ComponentModel.ISupportInitialize)(this.instanceMapChart)).EndInit();
     256      this.instancesTabPage.ResumeLayout(false);
    252257      this.ResumeLayout(false);
    253258
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.cs

    r13751 r13752  
    2020#endregion
    2121
     22using HeuristicLab.Common.Resources;
    2223using HeuristicLab.Core;
     24using HeuristicLab.Core.Views;
     25using HeuristicLab.Data;
    2326using HeuristicLab.MainForm;
    2427using HeuristicLab.OptimizationExpertSystem.Common;
     
    2730using System.Linq;
    2831using System.Text.RegularExpressions;
     32using System.Windows.Forms;
    2933using System.Windows.Forms.DataVisualization.Charting;
    3034
     
    3438  public sealed partial class UnderstandingProblemInstanceView : KnowledgeCenterViewBase {
    3539    private bool SuppressEvents { get; set; }
    36 
     40    private readonly CheckedItemListView<StringValue> characteristicsView;
     41 
    3742    public UnderstandingProblemInstanceView() {
    3843      InitializeComponent();
     44      showCharacteristicsCheckBox.Text = string.Empty;
     45      showCharacteristicsCheckBox.Image = VSImageLibrary.Properties;
     46      characteristicsView = new CheckedItemListView<StringValue>() {
     47        Dock = DockStyle.Fill
     48      };
     49      mapSplitContainer.Panel2.Controls.Add(characteristicsView);
    3950    }
    4051
     
    4354      if (Content == null) {
    4455        problemInstancesView.Content = null;
     56        characteristicsView.Content = null;
    4557        instanceMapChart.Series["InstancesSeries"].Points.Clear();
    4658        instanceMapChart.Series["CurrentInstanceSeries"].Points.Clear();
    4759      } else {
    4860        problemInstancesView.Content = Content.ProblemInstances;
     61        characteristicsView.Content = Content.ProblemCharacteristics;
    4962        UpdateProjectionComboBox();
    5063        UpdateSizeComboBox();
     
    175188      UpdateProjection();
    176189    }
     190
     191    private void showCharacteristicsCheckBox_CheckedChanged(object sender, EventArgs e) {
     192      mapSplitContainer.Panel2Collapsed = !showCharacteristicsCheckBox.Checked;
     193    }
    177194    #endregion
    178195  }
Note: See TracChangeset for help on using the changeset viewer.