Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/25/16 12:56:17 (9 years ago)
Author:
abeham
Message:

#2457: working on recommendation algorithms

Location:
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/100_Understanding/110_ProblemInstanceMenuItem.cs

    r13720 r13791  
    2828namespace HeuristicLab.OptimizationExpertSystem.Menu {
    2929  internal class ProblemInstanceMenuItem : MenuItemBase {
    30     public override Image Image { get { return VSImageLibrary.Statistics; } }
     30    public override Image Image { get { return VSImageLibrary.RadialChart; } }
    3131
    3232    public override string Name {
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/200_Solving/210_PerformanceModelingMenuItem.cs

    r13787 r13791  
    2828namespace HeuristicLab.OptimizationExpertSystem.Menu {
    2929  internal class PerformanceModelingMenuItem : MenuItemBase {
    30     public override Image Image { get { return VSImageLibrary.Event; } }
     30    public override Image Image { get { return VSImageLibrary.Graph; } }
    3131
    3232    public override string Name {
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/PerformanceModelingView.Designer.cs

    r13787 r13791  
    5050      this.tabControl = new System.Windows.Forms.TabControl();
    5151      this.characteristicsTabPage = new System.Windows.Forms.TabPage();
     52      this.characteristicsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    5253      this.refreshCharacteristicsButton = new System.Windows.Forms.Button();
    5354      this.parametersTabPage = new System.Windows.Forms.TabPage();
    5455      this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
    55       this.resultsTabPage = new System.Windows.Forms.TabPage();
    56       this.characteristicsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
     56      this.crossvalidationTabPage = new System.Windows.Forms.TabPage();
     57      this.xValidateButton = new System.Windows.Forms.Button();
     58      this.minTargetView = new HeuristicLab.Data.Views.StringConvertibleValueView();
     59      this.minimumTargetLabel = new System.Windows.Forms.Label();
    5760      this.tabControl.SuspendLayout();
    5861      this.characteristicsTabPage.SuspendLayout();
    5962      this.parametersTabPage.SuspendLayout();
     63      this.crossvalidationTabPage.SuspendLayout();
    6064      this.SuspendLayout();
    6165      //
     
    7781      this.recommenderComboBox.Location = new System.Drawing.Point(90, 3);
    7882      this.recommenderComboBox.Name = "recommenderComboBox";
    79       this.recommenderComboBox.Size = new System.Drawing.Size(264, 21);
     83      this.recommenderComboBox.Size = new System.Drawing.Size(206, 21);
    8084      this.recommenderComboBox.TabIndex = 11;
    8185      this.recommenderComboBox.SelectedIndexChanged += new System.EventHandler(this.RecommenderComboBoxOnSelectedIndexChanged);
     
    8488      //
    8589      this.recommendStartButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    86       this.recommendStartButton.Location = new System.Drawing.Point(360, 3);
     90      this.recommendStartButton.Location = new System.Drawing.Point(442, 1);
    8791      this.recommendStartButton.Name = "recommendStartButton";
    8892      this.recommendStartButton.Size = new System.Drawing.Size(26, 23);
     
    99103      this.tabControl.Controls.Add(this.characteristicsTabPage);
    100104      this.tabControl.Controls.Add(this.parametersTabPage);
    101       this.tabControl.Controls.Add(this.resultsTabPage);
     105      this.tabControl.Controls.Add(this.crossvalidationTabPage);
    102106      this.tabControl.Location = new System.Drawing.Point(0, 30);
    103107      this.tabControl.Name = "tabControl";
     
    117121      this.characteristicsTabPage.Text = "Characteristics";
    118122      this.characteristicsTabPage.UseVisualStyleBackColor = true;
    119       //
    120       // refreshCharacteristicsButton
    121       //
    122       this.refreshCharacteristicsButton.Location = new System.Drawing.Point(6, 6);
    123       this.refreshCharacteristicsButton.Name = "refreshCharacteristicsButton";
    124       this.refreshCharacteristicsButton.Size = new System.Drawing.Size(26, 23);
    125       this.refreshCharacteristicsButton.TabIndex = 0;
    126       this.refreshCharacteristicsButton.Text = "Refresh";
    127       this.refreshCharacteristicsButton.UseVisualStyleBackColor = true;
    128       this.refreshCharacteristicsButton.Click += new System.EventHandler(this.RefreshCharacteristicsButtonOnClick);
    129       //
    130       // parametersTabPage
    131       //
    132       this.parametersTabPage.Controls.Add(this.parameterCollectionView);
    133       this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
    134       this.parametersTabPage.Name = "parametersTabPage";
    135       this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    136       this.parametersTabPage.Size = new System.Drawing.Size(692, 324);
    137       this.parametersTabPage.TabIndex = 0;
    138       this.parametersTabPage.Text = "Parameters";
    139       this.parametersTabPage.UseVisualStyleBackColor = true;
    140       //
    141       // parameterCollectionView
    142       //
    143       this.parameterCollectionView.AllowEditingOfHiddenParameters = true;
    144       this.parameterCollectionView.Caption = "ParameterCollection View";
    145       this.parameterCollectionView.Content = null;
    146       this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
    147       this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
    148       this.parameterCollectionView.Name = "parameterCollectionView";
    149       this.parameterCollectionView.ReadOnly = false;
    150       this.parameterCollectionView.ShowDetails = true;
    151       this.parameterCollectionView.Size = new System.Drawing.Size(686, 318);
    152       this.parameterCollectionView.TabIndex = 0;
    153       //
    154       // resultsTabPage
    155       //
    156       this.resultsTabPage.Location = new System.Drawing.Point(4, 22);
    157       this.resultsTabPage.Name = "resultsTabPage";
    158       this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3);
    159       this.resultsTabPage.Size = new System.Drawing.Size(692, 324);
    160       this.resultsTabPage.TabIndex = 1;
    161       this.resultsTabPage.Text = "Results";
    162       this.resultsTabPage.UseVisualStyleBackColor = true;
    163123      //
    164124      // characteristicsViewHost
     
    178138      this.characteristicsViewHost.ViewType = null;
    179139      //
     140      // refreshCharacteristicsButton
     141      //
     142      this.refreshCharacteristicsButton.Location = new System.Drawing.Point(6, 6);
     143      this.refreshCharacteristicsButton.Name = "refreshCharacteristicsButton";
     144      this.refreshCharacteristicsButton.Size = new System.Drawing.Size(26, 23);
     145      this.refreshCharacteristicsButton.TabIndex = 0;
     146      this.refreshCharacteristicsButton.Text = "Refresh";
     147      this.refreshCharacteristicsButton.UseVisualStyleBackColor = true;
     148      this.refreshCharacteristicsButton.Click += new System.EventHandler(this.RefreshCharacteristicsButtonOnClick);
     149      //
     150      // parametersTabPage
     151      //
     152      this.parametersTabPage.Controls.Add(this.parameterCollectionView);
     153      this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
     154      this.parametersTabPage.Name = "parametersTabPage";
     155      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
     156      this.parametersTabPage.Size = new System.Drawing.Size(692, 324);
     157      this.parametersTabPage.TabIndex = 0;
     158      this.parametersTabPage.Text = "Parameters";
     159      this.parametersTabPage.UseVisualStyleBackColor = true;
     160      //
     161      // parameterCollectionView
     162      //
     163      this.parameterCollectionView.AllowEditingOfHiddenParameters = true;
     164      this.parameterCollectionView.Caption = "ParameterCollection View";
     165      this.parameterCollectionView.Content = null;
     166      this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
     167      this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
     168      this.parameterCollectionView.Name = "parameterCollectionView";
     169      this.parameterCollectionView.ReadOnly = false;
     170      this.parameterCollectionView.ShowDetails = true;
     171      this.parameterCollectionView.Size = new System.Drawing.Size(686, 318);
     172      this.parameterCollectionView.TabIndex = 0;
     173      //
     174      // crossvalidationTabPage
     175      //
     176      this.crossvalidationTabPage.Controls.Add(this.xValidateButton);
     177      this.crossvalidationTabPage.Location = new System.Drawing.Point(4, 22);
     178      this.crossvalidationTabPage.Name = "crossvalidationTabPage";
     179      this.crossvalidationTabPage.Padding = new System.Windows.Forms.Padding(3);
     180      this.crossvalidationTabPage.Size = new System.Drawing.Size(692, 324);
     181      this.crossvalidationTabPage.TabIndex = 1;
     182      this.crossvalidationTabPage.Text = "Crossvalidation";
     183      this.crossvalidationTabPage.UseVisualStyleBackColor = true;
     184      //
     185      // xValidateButton
     186      //
     187      this.xValidateButton.Location = new System.Drawing.Point(7, 7);
     188      this.xValidateButton.Name = "xValidateButton";
     189      this.xValidateButton.Size = new System.Drawing.Size(163, 23);
     190      this.xValidateButton.TabIndex = 0;
     191      this.xValidateButton.Text = "X-Validate Leave One Out";
     192      this.xValidateButton.UseVisualStyleBackColor = true;
     193      this.xValidateButton.Click += new System.EventHandler(this.xValidateButton_Click);
     194      //
     195      // minTargetView
     196      //
     197      this.minTargetView.Caption = "StringConvertibleValue View";
     198      this.minTargetView.Content = null;
     199      this.minTargetView.LabelVisible = false;
     200      this.minTargetView.Location = new System.Drawing.Point(350, 3);
     201      this.minTargetView.Name = "minTargetView";
     202      this.minTargetView.ReadOnly = false;
     203      this.minTargetView.Size = new System.Drawing.Size(86, 21);
     204      this.minTargetView.TabIndex = 18;
     205      //
     206      // minimumTargetLabel
     207      //
     208      this.minimumTargetLabel.AutoSize = true;
     209      this.minimumTargetLabel.Location = new System.Drawing.Point(311, 6);
     210      this.minimumTargetLabel.Name = "minimumTargetLabel";
     211      this.minimumTargetLabel.Size = new System.Drawing.Size(41, 13);
     212      this.minimumTargetLabel.TabIndex = 17;
     213      this.minimumTargetLabel.Text = "Target:";
     214      //
    180215      // PerformanceModelingView
    181216      //
    182217      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    183218      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     219      this.Controls.Add(this.minimumTargetLabel);
     220      this.Controls.Add(this.minTargetView);
    184221      this.Controls.Add(this.tabControl);
    185222      this.Controls.Add(this.recommenderLabel);
     
    190227      this.characteristicsTabPage.ResumeLayout(false);
    191228      this.parametersTabPage.ResumeLayout(false);
     229      this.crossvalidationTabPage.ResumeLayout(false);
    192230      this.ResumeLayout(false);
    193231      this.PerformLayout();
     
    202240    private System.Windows.Forms.TabControl tabControl;
    203241    private System.Windows.Forms.TabPage parametersTabPage;
    204     private System.Windows.Forms.TabPage resultsTabPage;
     242    private System.Windows.Forms.TabPage crossvalidationTabPage;
    205243    private Core.Views.ParameterCollectionView parameterCollectionView;
    206244    private System.Windows.Forms.TabPage characteristicsTabPage;
    207245    private System.Windows.Forms.Button refreshCharacteristicsButton;
    208246    private MainForm.WindowsForms.ViewHost characteristicsViewHost;
     247    private System.Windows.Forms.Button xValidateButton;
     248    private Data.Views.StringConvertibleValueView minTargetView;
     249    private System.Windows.Forms.Label minimumTargetLabel;
    209250  }
    210251}
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/PerformanceModelingView.cs

    r13787 r13791  
    2424using HeuristicLab.Data;
    2525using HeuristicLab.MainForm;
     26using HeuristicLab.Optimization;
    2627using HeuristicLab.OptimizationExpertSystem.Common;
    2728using HeuristicLab.PluginInfrastructure;
     
    5051    protected override void OnContentChanged() {
    5152      base.OnContentChanged();
     53      if (Content == null) {
     54        minTargetView.Content = null;
     55      } else {
     56        minTargetView.Content = Content.MinimumTarget;
     57      }
    5258      UpdateCharacteristics();
    5359    }
     
    5864      recommendStartButton.Enabled = Content != null && recommenderComboBox.SelectedIndex >= 0 && characteristics.CheckedItems.Any();
    5965      characteristicsViewHost.Enabled = Content != null;
     66      xValidateButton.Enabled = Content != null && recommenderComboBox.SelectedIndex >= 0 && characteristics.CheckedItems.Any();
    6067    }
    6168
     
    8289
    8390      var @checked = new HashSet<string>(characteristics.CheckedItems.Select(x => x.Value.Value));
     91      if (@checked.Count == 0 && Content.ProblemInstances.ResultNames.Any(x => x.StartsWith("Characteristic.")))
     92        @checked = new HashSet<string>(Content.ProblemInstances.ResultNames.Where(x => x.StartsWith("Characteristic.")));
     93
    8494      characteristics.Clear();
    8595      if (Content == null || Content.ProblemInstances.Count == 0) return;
     
    109119    private void RecommendStartButtonOnClick(object sender, EventArgs e) {
    110120      var rcmd = (IAlgorithmInstanceRecommender)recommenderComboBox.SelectedItem;
    111       Content.RecommendationModel = rcmd.TrainModel(Content, characteristics.CheckedItems.Select(x => x.Value.Value).ToArray());
     121      var trainingSet = Content.ProblemInstances.Where(x => !Content.IsCurrentInstance(x)).ToArray();
     122      Content.RecommendationModel = rcmd.TrainModel(trainingSet, Content, characteristics.CheckedItems.Select(x => x.Value.Value).ToArray());
    112123    }
    113124
     
    115126      UpdateCharacteristics();
    116127      SetEnabledStateOfControls();
     128    }
     129
     130    private void xValidateButton_Click(object sender, EventArgs e) {
     131      var recommender = (IAlgorithmInstanceRecommender)recommenderComboBox.SelectedItem;
     132      var features = characteristics.CheckedItems.Select(x => x.Value.Value).ToArray();
     133
     134      var trainingSet = Content.ProblemInstances.Where(x => !Content.IsCurrentInstance(x)).ToArray();
     135
     136      // leave one out crossvalidation
     137      foreach (var pi in trainingSet) {
     138        var model = recommender.TrainModel(trainingSet.Where(x => x != pi).ToArray(), Content, features);
     139        var ranking = model.GetRanking(pi).ToList();
     140        var realPerformance = Content.GetAlgorithmPerformance(pi);
     141        // absolute error predicting ert
     142        // confusion matrix predicting class
     143        // Kendall's tau
     144        // average NCDG ... relevance determined by clustering (unsuccessful algorithms being penalized with negative relevance)
     145        // mean reciprocal rank
     146        // optional: expected reciprocal rank
     147      }
     148    }
     149
     150    private static double AbsoluteError(Dictionary<IAlgorithm, double> performance, List<Tuple<IAlgorithm, double>> ranking) {
     151      var error = 0.0;
     152      foreach (var tuple in ranking) {
     153        double actual;
     154        if (!performance.TryGetValue(tuple.Item1, out actual)) continue;
     155        error += Math.Abs(actual - tuple.Item2);
     156      }
     157      return error;
     158    }
     159
     160    private static int[,] ConfusionMatrix(Dictionary<IAlgorithm, double> performance, List<Tuple<IAlgorithm, double>> ranking) {
     161      var confMatrix = new int[5,5];
     162      return confMatrix;
    117163    }
    118164    #endregion
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.Designer.cs

    r13787 r13791  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin4 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
    48       WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin4 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
    49       WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient10 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
    50       WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient22 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    51       WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin4 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
    52       WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
    53       WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient23 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    54       WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient11 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
    55       WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient24 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    56       WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
    57       WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient25 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    58       WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient26 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    59       WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient12 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
    60       WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient27 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    61       WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient28 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    62       this.minTargetView = new HeuristicLab.Data.Views.StringConvertibleValueView();
     47      WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
     48      WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
     49      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
     50      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     51      WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
     52      WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
     53      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     54      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
     55      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     56      WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
     57      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     58      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     59      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
     60      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     61      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    6362      this.maxEvaluationsView = new HeuristicLab.Data.Views.StringConvertibleValueView();
    6463      this.algorithmCloneButton = new System.Windows.Forms.Button();
    6564      this.seedingStrategyPanel = new System.Windows.Forms.Panel();
    6665      this.algorithmStartButton = new System.Windows.Forms.Button();
    67       this.minimumTargetLabel = new System.Windows.Forms.Label();
    6866      this.seedingStrategyLabel = new System.Windows.Forms.Label();
    6967      this.evaluationsLimitabel = new System.Windows.Forms.Label();
     
    9189      this.SuspendLayout();
    9290      //
    93       // minTargetView
    94       //
    95       this.minTargetView.Caption = "StringConvertibleValue View";
    96       this.minTargetView.Content = null;
    97       this.minTargetView.LabelVisible = false;
    98       this.minTargetView.Location = new System.Drawing.Point(431, 3);
    99       this.minTargetView.Name = "minTargetView";
    100       this.minTargetView.ReadOnly = false;
    101       this.minTargetView.Size = new System.Drawing.Size(255, 21);
    102       this.minTargetView.TabIndex = 16;
    103       //
    10491      // maxEvaluationsView
    10592      //
     
    142129      this.algorithmStartButton.Click += new System.EventHandler(this.AlgorithmStartButtonOnClick);
    143130      //
    144       // minimumTargetLabel
    145       //
    146       this.minimumTargetLabel.AutoSize = true;
    147       this.minimumTargetLabel.Location = new System.Drawing.Point(384, 6);
    148       this.minimumTargetLabel.Name = "minimumTargetLabel";
    149       this.minimumTargetLabel.Size = new System.Drawing.Size(41, 13);
    150       this.minimumTargetLabel.TabIndex = 13;
    151       this.minimumTargetLabel.Text = "Target:";
    152       //
    153131      // seedingStrategyLabel
    154132      //
     
    190168      // solverTabControl
    191169      //
     170      this.solverTabControl.AllowDrop = true;
    192171      this.solverTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    193172            | System.Windows.Forms.AnchorStyles.Left)
     
    238217      this.resultsDockPanel.Name = "resultsDockPanel";
    239218      this.resultsDockPanel.Size = new System.Drawing.Size(829, 421);
    240       dockPanelGradient10.EndColor = System.Drawing.SystemColors.ControlLight;
    241       dockPanelGradient10.StartColor = System.Drawing.SystemColors.ControlLight;
    242       autoHideStripSkin4.DockStripGradient = dockPanelGradient10;
    243       tabGradient22.EndColor = System.Drawing.SystemColors.Control;
    244       tabGradient22.StartColor = System.Drawing.SystemColors.Control;
    245       tabGradient22.TextColor = System.Drawing.SystemColors.ControlDarkDark;
    246       autoHideStripSkin4.TabGradient = tabGradient22;
    247       autoHideStripSkin4.TextFont = new System.Drawing.Font("Segoe UI", 9F);
    248       dockPanelSkin4.AutoHideStripSkin = autoHideStripSkin4;
    249       tabGradient23.EndColor = System.Drawing.SystemColors.ControlLightLight;
    250       tabGradient23.StartColor = System.Drawing.SystemColors.ControlLightLight;
    251       tabGradient23.TextColor = System.Drawing.SystemColors.ControlText;
    252       dockPaneStripGradient4.ActiveTabGradient = tabGradient23;
    253       dockPanelGradient11.EndColor = System.Drawing.SystemColors.Control;
    254       dockPanelGradient11.StartColor = System.Drawing.SystemColors.Control;
    255       dockPaneStripGradient4.DockStripGradient = dockPanelGradient11;
    256       tabGradient24.EndColor = System.Drawing.SystemColors.ControlLight;
    257       tabGradient24.StartColor = System.Drawing.SystemColors.ControlLight;
    258       tabGradient24.TextColor = System.Drawing.SystemColors.ControlText;
    259       dockPaneStripGradient4.InactiveTabGradient = tabGradient24;
    260       dockPaneStripSkin4.DocumentGradient = dockPaneStripGradient4;
    261       dockPaneStripSkin4.TextFont = new System.Drawing.Font("Segoe UI", 9F);
    262       tabGradient25.EndColor = System.Drawing.SystemColors.ActiveCaption;
    263       tabGradient25.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    264       tabGradient25.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
    265       tabGradient25.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
    266       dockPaneStripToolWindowGradient4.ActiveCaptionGradient = tabGradient25;
    267       tabGradient26.EndColor = System.Drawing.SystemColors.Control;
    268       tabGradient26.StartColor = System.Drawing.SystemColors.Control;
    269       tabGradient26.TextColor = System.Drawing.SystemColors.ControlText;
    270       dockPaneStripToolWindowGradient4.ActiveTabGradient = tabGradient26;
    271       dockPanelGradient12.EndColor = System.Drawing.SystemColors.ControlLight;
    272       dockPanelGradient12.StartColor = System.Drawing.SystemColors.ControlLight;
    273       dockPaneStripToolWindowGradient4.DockStripGradient = dockPanelGradient12;
    274       tabGradient27.EndColor = System.Drawing.SystemColors.InactiveCaption;
    275       tabGradient27.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    276       tabGradient27.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
    277       tabGradient27.TextColor = System.Drawing.SystemColors.InactiveCaptionText;
    278       dockPaneStripToolWindowGradient4.InactiveCaptionGradient = tabGradient27;
    279       tabGradient28.EndColor = System.Drawing.Color.Transparent;
    280       tabGradient28.StartColor = System.Drawing.Color.Transparent;
    281       tabGradient28.TextColor = System.Drawing.SystemColors.ControlDarkDark;
    282       dockPaneStripToolWindowGradient4.InactiveTabGradient = tabGradient28;
    283       dockPaneStripSkin4.ToolWindowGradient = dockPaneStripToolWindowGradient4;
    284       dockPanelSkin4.DockPaneStripSkin = dockPaneStripSkin4;
    285       this.resultsDockPanel.Skin = dockPanelSkin4;
     219      dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
     220      dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
     221      autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
     222      tabGradient1.EndColor = System.Drawing.SystemColors.Control;
     223      tabGradient1.StartColor = System.Drawing.SystemColors.Control;
     224      tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
     225      autoHideStripSkin1.TabGradient = tabGradient1;
     226      autoHideStripSkin1.TextFont = new System.Drawing.Font("Segoe UI", 9F);
     227      dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
     228      tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
     229      tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
     230      tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
     231      dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
     232      dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
     233      dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
     234      dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
     235      tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
     236      tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
     237      tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
     238      dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
     239      dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
     240      dockPaneStripSkin1.TextFont = new System.Drawing.Font("Segoe UI", 9F);
     241      tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
     242      tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
     243      tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
     244      tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
     245      dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
     246      tabGradient5.EndColor = System.Drawing.SystemColors.Control;
     247      tabGradient5.StartColor = System.Drawing.SystemColors.Control;
     248      tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
     249      dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
     250      dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
     251      dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
     252      dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
     253      tabGradient6.EndColor = System.Drawing.SystemColors.InactiveCaption;
     254      tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
     255      tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
     256      tabGradient6.TextColor = System.Drawing.SystemColors.InactiveCaptionText;
     257      dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
     258      tabGradient7.EndColor = System.Drawing.Color.Transparent;
     259      tabGradient7.StartColor = System.Drawing.Color.Transparent;
     260      tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
     261      dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
     262      dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
     263      dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
     264      this.resultsDockPanel.Skin = dockPanelSkin1;
    286265      this.resultsDockPanel.TabIndex = 0;
    287266      //
     
    292271      this.runsTabPage.Name = "runsTabPage";
    293272      this.runsTabPage.Padding = new System.Windows.Forms.Padding(3);
    294       this.runsTabPage.Size = new System.Drawing.Size(548, 418);
     273      this.runsTabPage.Size = new System.Drawing.Size(835, 453);
    295274      this.runsTabPage.TabIndex = 4;
    296275      this.runsTabPage.Text = "Runs";
     
    305284      this.runsView.Name = "runsView";
    306285      this.runsView.ReadOnly = false;
    307       this.runsView.Size = new System.Drawing.Size(542, 412);
     286      this.runsView.Size = new System.Drawing.Size(829, 447);
    308287      this.runsView.TabIndex = 0;
    309288      //
     
    314293      this.seededRunsTabPage.Name = "seededRunsTabPage";
    315294      this.seededRunsTabPage.Padding = new System.Windows.Forms.Padding(3);
    316       this.seededRunsTabPage.Size = new System.Drawing.Size(548, 418);
     295      this.seededRunsTabPage.Size = new System.Drawing.Size(835, 453);
    317296      this.seededRunsTabPage.TabIndex = 5;
    318297      this.seededRunsTabPage.Text = "Seeded Runs";
     
    327306      this.seededRunsView.Name = "seededRunsView";
    328307      this.seededRunsView.ReadOnly = false;
    329       this.seededRunsView.Size = new System.Drawing.Size(542, 412);
     308      this.seededRunsView.Size = new System.Drawing.Size(829, 447);
    330309      this.seededRunsView.TabIndex = 1;
    331310      //
     
    335314      this.solutionSeedingTabPage.Name = "solutionSeedingTabPage";
    336315      this.solutionSeedingTabPage.Padding = new System.Windows.Forms.Padding(3);
    337       this.solutionSeedingTabPage.Size = new System.Drawing.Size(548, 418);
     316      this.solutionSeedingTabPage.Size = new System.Drawing.Size(835, 453);
    338317      this.solutionSeedingTabPage.TabIndex = 1;
    339318      this.solutionSeedingTabPage.Text = "Seeding Pool";
     
    346325      this.parametersTabPage.Name = "parametersTabPage";
    347326      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    348       this.parametersTabPage.Size = new System.Drawing.Size(548, 418);
     327      this.parametersTabPage.Size = new System.Drawing.Size(835, 453);
    349328      this.parametersTabPage.TabIndex = 0;
    350329      this.parametersTabPage.Text = "Parameters";
     
    361340      this.solverParametersView.ReadOnly = true;
    362341      this.solverParametersView.ShowDetails = true;
    363       this.solverParametersView.Size = new System.Drawing.Size(542, 412);
     342      this.solverParametersView.Size = new System.Drawing.Size(829, 447);
    364343      this.solverParametersView.TabIndex = 0;
    365344      //
     
    370349      this.operatorGraphTabPage.Name = "operatorGraphTabPage";
    371350      this.operatorGraphTabPage.Padding = new System.Windows.Forms.Padding(3);
    372       this.operatorGraphTabPage.Size = new System.Drawing.Size(548, 418);
     351      this.operatorGraphTabPage.Size = new System.Drawing.Size(835, 453);
    373352      this.operatorGraphTabPage.TabIndex = 3;
    374353      this.operatorGraphTabPage.Text = "Operator Graph";
     
    384363      this.operatorGraphViewHost.Name = "operatorGraphViewHost";
    385364      this.operatorGraphViewHost.ReadOnly = true;
    386       this.operatorGraphViewHost.Size = new System.Drawing.Size(542, 412);
     365      this.operatorGraphViewHost.Size = new System.Drawing.Size(829, 447);
    387366      this.operatorGraphViewHost.TabIndex = 0;
    388367      this.operatorGraphViewHost.ViewsLabelVisible = true;
     
    397376      this.Controls.Add(this.instanceLabel);
    398377      this.Controls.Add(this.algorithmStartButton);
    399       this.Controls.Add(this.minTargetView);
    400378      this.Controls.Add(this.maxEvaluationsView);
    401379      this.Controls.Add(this.suggestedInstancesComboBox);
    402380      this.Controls.Add(this.seedingStrategyPanel);
    403       this.Controls.Add(this.minimumTargetLabel);
    404381      this.Controls.Add(this.seedingStrategyLabel);
    405382      this.Controls.Add(this.evaluationsLimitabel);
     
    427404    private System.Windows.Forms.Button algorithmCloneButton;
    428405    private Data.Views.StringConvertibleValueView maxEvaluationsView;
    429     private System.Windows.Forms.Label minimumTargetLabel;
    430     private Data.Views.StringConvertibleValueView minTargetView;
    431406    private System.Windows.Forms.Label instanceLabel;
    432407    private MainForm.WindowsForms.DragOverTabControl solverTabControl;
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.cs

    r13787 r13791  
    6161        if (Content == null) {
    6262          maxEvaluationsView.Content = null;
    63           minTargetView.Content = null;
    6463          solverParametersView.Content = null;
    6564          runsView.Content = null;
     
    6968        } else {
    7069          maxEvaluationsView.Content = Content.MaximumEvaluations;
    71           minTargetView.Content = Content.MinimumTarget;
    7270          runsView.Content = Content.InstanceRuns;
    7371          seededRunsView.Content = Content.SeededRuns;
     
    155153
    156154      public override string ToString() {
    157         return item.Item2.ToString("F0") + ": " + item.Item1.Name;
     155        return item.Item2.ToString("N0") + ": " + item.Item1.Name;
    158156      }
    159157    }
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.Designer.cs

    r13757 r13791  
    5454      this.mapSplitContainer = new System.Windows.Forms.SplitContainer();
    5555      this.showCharacteristicsCheckBox = new System.Windows.Forms.CheckBox();
    56       this.fromZeroCheckBox = new System.Windows.Forms.CheckBox();
    5756      this.invPropCheckBox = new System.Windows.Forms.CheckBox();
     57      this.colorLabel = new System.Windows.Forms.Label();
    5858      this.sizeLabel = new System.Windows.Forms.Label();
    5959      this.projectionLabel = new System.Windows.Forms.Label();
    6060      this.instanceMapChart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
     61      this.colorComboBox = new System.Windows.Forms.ComboBox();
    6162      this.sizeComboBox = new System.Windows.Forms.ComboBox();
    6263      this.projectionComboBox = new System.Windows.Forms.ComboBox();
     64      this.characteristicsPanel = new System.Windows.Forms.Panel();
     65      this.updateProjectionButton = new System.Windows.Forms.Button();
    6366      this.instancesTabPage = new System.Windows.Forms.TabPage();
    6467      this.problemInstancesView = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    65       this.colorComboBox = new System.Windows.Forms.ComboBox();
    66       this.colorLabel = new System.Windows.Forms.Label();
    6768      this.problemInstancesTabControl.SuspendLayout();
    6869      this.mapTabPage.SuspendLayout();
    6970      ((System.ComponentModel.ISupportInitialize)(this.mapSplitContainer)).BeginInit();
    7071      this.mapSplitContainer.Panel1.SuspendLayout();
     72      this.mapSplitContainer.Panel2.SuspendLayout();
    7173      this.mapSplitContainer.SuspendLayout();
    7274      ((System.ComponentModel.ISupportInitialize)(this.instanceMapChart)).BeginInit();
     
    109111      //
    110112      this.mapSplitContainer.Panel1.Controls.Add(this.showCharacteristicsCheckBox);
    111       this.mapSplitContainer.Panel1.Controls.Add(this.fromZeroCheckBox);
    112113      this.mapSplitContainer.Panel1.Controls.Add(this.invPropCheckBox);
    113114      this.mapSplitContainer.Panel1.Controls.Add(this.colorLabel);
     
    119120      this.mapSplitContainer.Panel1.Controls.Add(this.projectionComboBox);
    120121      this.mapSplitContainer.Panel1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 0);
     122      //
     123      // mapSplitContainer.Panel2
     124      //
     125      this.mapSplitContainer.Panel2.Controls.Add(this.characteristicsPanel);
     126      this.mapSplitContainer.Panel2.Controls.Add(this.updateProjectionButton);
    121127      this.mapSplitContainer.Panel2Collapsed = true;
    122128      this.mapSplitContainer.Size = new System.Drawing.Size(1094, 728);
    123       this.mapSplitContainer.SplitterDistance = 847;
     129      this.mapSplitContainer.SplitterDistance = 843;
    124130      this.mapSplitContainer.TabIndex = 12;
    125131      //
     
    135141      this.showCharacteristicsCheckBox.UseVisualStyleBackColor = true;
    136142      this.showCharacteristicsCheckBox.CheckedChanged += new System.EventHandler(this.showCharacteristicsCheckBox_CheckedChanged);
    137       //
    138       // fromZeroCheckBox
    139       //
    140       this.fromZeroCheckBox.AutoSize = true;
    141       this.fromZeroCheckBox.Checked = true;
    142       this.fromZeroCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
    143       this.fromZeroCheckBox.Location = new System.Drawing.Point(639, 8);
    144       this.fromZeroCheckBox.Name = "fromZeroCheckBox";
    145       this.fromZeroCheckBox.Size = new System.Drawing.Size(69, 17);
    146       this.fromZeroCheckBox.TabIndex = 17;
    147       this.fromZeroCheckBox.Text = "from zero";
    148       this.fromZeroCheckBox.UseVisualStyleBackColor = true;
    149       this.fromZeroCheckBox.CheckedChanged += new System.EventHandler(this.fromZeroCheckBox_CheckedChanged);
    150143      //
    151144      // invPropCheckBox
     
    161154      this.invPropCheckBox.UseVisualStyleBackColor = true;
    162155      this.invPropCheckBox.CheckedChanged += new System.EventHandler(this.InvPropCheckBoxOnCheckedChanged);
     156      //
     157      // colorLabel
     158      //
     159      this.colorLabel.AutoSize = true;
     160      this.colorLabel.Location = new System.Drawing.Point(652, 9);
     161      this.colorLabel.Name = "colorLabel";
     162      this.colorLabel.Size = new System.Drawing.Size(34, 13);
     163      this.colorLabel.TabIndex = 15;
     164      this.colorLabel.Text = "Color:";
    163165      //
    164166      // sizeLabel
     
    202204      series1.MarkerSize = 10;
    203205      series1.Name = "InstancesSeries";
     206      series1.SmartLabelStyle.CalloutLineAnchorCapStyle = System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle.None;
    204207      series2.ChartArea = "Default";
    205208      series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
     
    209212      series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Cross;
    210213      series2.Name = "CurrentInstanceSeries";
     214      series2.SmartLabelStyle.CalloutLineAnchorCapStyle = System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle.None;
    211215      this.instanceMapChart.Series.Add(series1);
    212216      this.instanceMapChart.Series.Add(series2);
    213217      this.instanceMapChart.Size = new System.Drawing.Size(974, 692);
    214218      this.instanceMapChart.TabIndex = 12;
     219      //
     220      // colorComboBox
     221      //
     222      this.colorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     223      this.colorComboBox.FormattingEnabled = true;
     224      this.colorComboBox.Location = new System.Drawing.Point(692, 6);
     225      this.colorComboBox.Name = "colorComboBox";
     226      this.colorComboBox.Size = new System.Drawing.Size(222, 21);
     227      this.colorComboBox.TabIndex = 13;
     228      this.colorComboBox.SelectedIndexChanged += new System.EventHandler(this.colorComboBox_SelectedIndexChanged);
    215229      //
    216230      // sizeComboBox
     
    234248      this.projectionComboBox.SelectedIndexChanged += new System.EventHandler(this.ProjectionComboBoxOnSelectedIndexChanged);
    235249      //
     250      // characteristicsPanel
     251      //
     252      this.characteristicsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     253            | System.Windows.Forms.AnchorStyles.Left)
     254            | System.Windows.Forms.AnchorStyles.Right)));
     255      this.characteristicsPanel.Location = new System.Drawing.Point(3, 33);
     256      this.characteristicsPanel.Name = "characteristicsPanel";
     257      this.characteristicsPanel.Size = new System.Drawing.Size(241, 692);
     258      this.characteristicsPanel.TabIndex = 20;
     259      //
     260      // updateProjectionButton
     261      //
     262      this.updateProjectionButton.Location = new System.Drawing.Point(3, 6);
     263      this.updateProjectionButton.Name = "updateProjectionButton";
     264      this.updateProjectionButton.Size = new System.Drawing.Size(26, 23);
     265      this.updateProjectionButton.TabIndex = 19;
     266      this.updateProjectionButton.Text = "Update";
     267      this.updateProjectionButton.UseVisualStyleBackColor = true;
     268      this.updateProjectionButton.Click += new System.EventHandler(this.updateProjectionButton_Click);
     269      //
    236270      // instancesTabPage
    237271      //
     
    240274      this.instancesTabPage.Name = "instancesTabPage";
    241275      this.instancesTabPage.Padding = new System.Windows.Forms.Padding(3);
    242       this.instancesTabPage.Size = new System.Drawing.Size(1106, 734);
     276      this.instancesTabPage.Size = new System.Drawing.Size(1100, 734);
    243277      this.instancesTabPage.TabIndex = 0;
    244278      this.instancesTabPage.Text = "Instances";
     
    254288      this.problemInstancesView.Name = "problemInstancesView";
    255289      this.problemInstancesView.ReadOnly = false;
    256       this.problemInstancesView.Size = new System.Drawing.Size(1100, 728);
     290      this.problemInstancesView.Size = new System.Drawing.Size(1094, 728);
    257291      this.problemInstancesView.TabIndex = 0;
    258292      this.problemInstancesView.ViewsLabelVisible = true;
    259293      this.problemInstancesView.ViewType = null;
    260       //
    261       // colorComboBox
    262       //
    263       this.colorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    264       this.colorComboBox.FormattingEnabled = true;
    265       this.colorComboBox.Location = new System.Drawing.Point(768, 6);
    266       this.colorComboBox.Name = "colorComboBox";
    267       this.colorComboBox.Size = new System.Drawing.Size(222, 21);
    268       this.colorComboBox.TabIndex = 13;
    269       this.colorComboBox.SelectedIndexChanged += new System.EventHandler(this.colorComboBox_SelectedIndexChanged);
    270       //
    271       // colorLabel
    272       //
    273       this.colorLabel.AutoSize = true;
    274       this.colorLabel.Location = new System.Drawing.Point(728, 9);
    275       this.colorLabel.Name = "colorLabel";
    276       this.colorLabel.Size = new System.Drawing.Size(34, 13);
    277       this.colorLabel.TabIndex = 15;
    278       this.colorLabel.Text = "Color:";
    279294      //
    280295      // UnderstandingProblemInstanceView
     
    289304      this.mapSplitContainer.Panel1.ResumeLayout(false);
    290305      this.mapSplitContainer.Panel1.PerformLayout();
     306      this.mapSplitContainer.Panel2.ResumeLayout(false);
    291307      ((System.ComponentModel.ISupportInitialize)(this.mapSplitContainer)).EndInit();
    292308      this.mapSplitContainer.ResumeLayout(false);
     
    311327    private System.Windows.Forms.ComboBox sizeComboBox;
    312328    private System.Windows.Forms.ComboBox projectionComboBox;
    313     private System.Windows.Forms.CheckBox fromZeroCheckBox;
    314329    private System.Windows.Forms.Label colorLabel;
    315330    private System.Windows.Forms.ComboBox colorComboBox;
     331    private System.Windows.Forms.Button updateProjectionButton;
     332    private System.Windows.Forms.Panel characteristicsPanel;
    316333  }
    317334}
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.cs

    r13787 r13791  
    4545      showCharacteristicsCheckBox.Text = string.Empty;
    4646      showCharacteristicsCheckBox.Image = VSImageLibrary.Properties;
     47      updateProjectionButton.Text = string.Empty;
     48      updateProjectionButton.Image = VSImageLibrary.Refresh;
    4749      characteristics = new CheckedItemList<StringValue>();
    4850      characteristics.CheckedItemsChanged += CharacteristicsOnCheckedItemsChanged;
    49       mapSplitContainer.Panel2.Controls.Add(new ViewHost() {
     51      characteristicsPanel.Controls.Add(new ViewHost() {
    5052        Dock = DockStyle.Fill,
    5153        Content = characteristics
     
    5557    protected override void OnContentChanged() {
    5658      base.OnContentChanged();
    57       characteristics.Clear();
    5859      if (Content == null) {
    5960        problemInstancesView.Content = null;
    60         instanceMapChart.Series["InstancesSeries"].Points.Clear();
    61         instanceMapChart.Series["CurrentInstanceSeries"].Points.Clear();
    6261      } else {
    6362        problemInstancesView.Content = Content.ProblemInstances;
    64         UpdateCharacteristics();
    65         UpdateProjectionComboBox();
    66         UpdateSizeComboBox();
    67         UpdateColorComboBox();
    68       }
     63      }
     64      UpdateCharacteristics();
     65      UpdateProjectionComboBox();
     66      UpdateSizeComboBox();
     67      UpdateColorComboBox();
    6968    }
    7069
    7170    protected override void SetEnabledStateOfControls() {
    7271      base.SetEnabledStateOfControls();
     72      updateProjectionButton.Enabled = Content != null && characteristics.CheckedItems.Any();
    7373    }
    7474
    7575    #region Update Controls
    7676    private void UpdateCharacteristics() {
    77       var @checked = new HashSet<string>(characteristics.CheckedItems.Select(x => x.Value.Value));
    78       characteristics.Clear();
    79       foreach (var c in Content.ProblemInstances.ResultNames) {
    80         characteristics.Add(new StringValue(c), @checked.Contains(c));
    81       }
     77      if (InvokeRequired) { Invoke((Action)UpdateCharacteristics); return; }
     78      try {
     79        SuppressEvents = true;
     80        var @checked = new HashSet<string>(characteristics.CheckedItems.Select(x => x.Value.Value));
     81        characteristics.Clear();
     82
     83        if (Content == null) return;
     84        if (@checked.Count == 0 && Content.ProblemInstances.ResultNames.Any(x => x.StartsWith("Characteristic.")))
     85          @checked = new HashSet<string>(Content.ProblemInstances.ResultNames.Where(x => x.StartsWith("Characteristic.")));
     86
     87        foreach (var c in Content.ProblemInstances.ResultNames) {
     88          characteristics.Add(new StringValue(c), @checked.Contains(c));
     89        }
     90      } finally { SuppressEvents = false; }
    8291    }
    8392
    8493    private void UpdateProjectionComboBox() {
     94      if (InvokeRequired) { Invoke((Action)UpdateProjectionComboBox); return; }
    8595      try {
    8696        SuppressEvents = true;
     
    97107
    98108    private void UpdateSizeComboBox() {
     109      if (InvokeRequired) { Invoke((Action)UpdateSizeComboBox); return; }
    99110      try {
    100111        SuppressEvents = true;
    101112        var selected = sizeComboBox.SelectedIndex >= 0 ? (string)sizeComboBox.SelectedItem : null;
    102113        sizeComboBox.Items.Clear();
     114       
     115        if (Content == null) return;
     116
    103117        sizeComboBox.Items.Add(string.Empty);
    104118        foreach (var str in Content.ProblemInstances.ResultNames.Where(x => !(x.StartsWith("Projection.") && (x.EndsWith(".X") || x.EndsWith(".Y"))))) {
     
    112126
    113127    private void UpdateColorComboBox() {
     128      if (InvokeRequired) { Invoke((Action)UpdateColorComboBox); return; }
    114129      try {
    115130        SuppressEvents = true;
    116131        var selected = colorComboBox.SelectedIndex >= 0 ? (string)colorComboBox.SelectedItem : null;
    117132        colorComboBox.Items.Clear();
     133
     134        if (Content == null) return;
     135
    118136        colorComboBox.Items.Add(string.Empty);
    119137        foreach (var str in Content.ProblemInstances.ResultNames.Where(x => x.StartsWith("Rank."))) {
     
    132150      var currentInstanceSeries = instanceMapChart.Series["CurrentInstanceSeries"];
    133151
    134       if (projectionComboBox.SelectedIndex < 0) {
     152      if (projectionComboBox.SelectedIndex < 0 || Content == null) {
    135153        instancesSeries.Points.Clear();
    136154        currentInstanceSeries.Points.Clear();
     
    142160      var color = colorComboBox.SelectedIndex >= 0 ? (string)colorComboBox.SelectedItem : string.Empty;
    143161
    144       DoProjectProblemInstances(instancesSeries, currentInstanceSeries, projection,
    145         size, color, invPropCheckBox.Checked, fromZeroCheckBox.Checked);
     162      DoProjectProblemInstances(instancesSeries, currentInstanceSeries, projection, size, color, invPropCheckBox.Checked);
    146163    }
    147164    #endregion
     
    156173      base.OnProblemInstancesChanged();
    157174      if (Content.ProblemInstances.UpdateOfRunsInProgress) return;
    158       try {
    159         SuppressEvents = true;
    160         UpdateCharacteristics();
    161       } finally { SuppressEvents = false; }
     175      UpdateCharacteristics();
    162176      UpdateProjectionComboBox();
    163177      UpdateSizeComboBox();
     
    184198    }
    185199
    186     private void fromZeroCheckBox_CheckedChanged(object sender, EventArgs e) {
    187       UpdateProjection();
    188     }
    189 
    190200    private void showCharacteristicsCheckBox_CheckedChanged(object sender, EventArgs e) {
    191201      mapSplitContainer.Panel2Collapsed = !showCharacteristicsCheckBox.Checked;
    192202    }
     203
     204    private void updateProjectionButton_Click(object sender, EventArgs e) {
     205      Content.UpdateInstanceProjection(characteristics.CheckedItems.Select(x => x.Value.Value).ToArray());
     206    }
    193207    #endregion
    194208
    195209    #region Other Event Handlers
    196210    private void CharacteristicsOnCheckedItemsChanged(object sender, EventArgs e) {
    197       if (SuppressEvents) return;
    198       if (characteristics.CheckedItems.Any())
    199         Content.UpdateInstanceProjection(characteristics.CheckedItems.Select(x => x.Value.Value).ToArray());
     211      SetEnabledStateOfControls();
    200212    }
    201213    #endregion
     
    203215    #region Helper Classes and Methods
    204216    private IEnumerable<string> GetProjections() {
     217      if (Content == null) return new string[0];
    205218      return Content.ProblemInstances.ResultNames
    206219        .Where(x => Regex.IsMatch(x, "^Projection[.].*[.][XY]$"))
     
    209222    }
    210223
    211     private void DoProjectProblemInstances(Series instancesSeries, Series currentInstanceSeries, string projection, string size, string color, bool invProp, bool fromZero) {
     224    private void DoProjectProblemInstances(Series instancesSeries, Series currentInstanceSeries, string projection, string size, string color, bool invProp) {
    212225      instancesSeries.Points.Clear();
    213226      currentInstanceSeries.Points.Clear();
     
    215228      double maxSize = 0, minSize = 0;
    216229      if (!string.IsNullOrEmpty(size)) {
    217         var sizes = Content.ProblemInstances.Where(x => x.Results.ContainsKey(size)).Select(x => x.Results[size]).OfType<DoubleValue>().Where(x => !double.IsNaN(x.Value)).ToList();
     230        var sizes = Content.ProblemInstances
     231                           .Where(x => x.Results.ContainsKey(size))
     232                           .Select(x => x.Results[size])
     233                           .Select(x => x is DoubleValue ? ((DoubleValue)x).Value : (x is IntValue ? ((IntValue)x).Value : double.NaN))
     234                           .Where(x => !double.IsNaN(x)).ToList();
    218235        if (sizes.Count > 0) {
    219           maxSize = sizes.Max(x => x.Value);
    220           if (maxSize < 0 && fromZero) {
     236          maxSize = sizes.Max();
     237          if (maxSize < 0) {
    221238            maxSize = 0;
    222             minSize = sizes.Min(x => x.Value);
    223           } else if (fromZero) {
    224             minSize = 0;
     239            minSize = sizes.Min();
    225240          } else {
    226             minSize = sizes.Min(x => x.Value);
     241            minSize = sizes.Min();
    227242          }
    228243        }
Note: See TracChangeset for help on using the changeset viewer.