Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/16 12:40:40 (8 years ago)
Author:
abeham
Message:

#2457: worked on recommendation algorithms

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

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Docking/AlgorithmControlForm.cs

    r13722 r13774  
    119119
    120120    #region Algorithm Events
    121     private void AlgorithmOnExecutionStateChanged(object sender, EventArgs eventArgs) {
     121    private void AlgorithmOnExecutionStateChanged(object sender, EventArgs e) {
     122      if (InvokeRequired) { Invoke((Action<object, EventArgs>)AlgorithmOnExecutionStateChanged, sender, e); return; }
    122123      if (ShowOnlyFinalResult && (Algorithm.ExecutionState == ExecutionState.Stopped
    123124        || Algorithm.ExecutionState == ExecutionState.Paused))
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Plugin.cs.frame

    r13722 r13774  
    2020#endregion
    2121
     22using HeuristicLab.Clients.Access;
     23using HeuristicLab.Common;
     24using HeuristicLab.Core;
     25using HeuristicLab.PluginInfrastructure;
    2226using System.Windows.Forms;
    23 using HeuristicLab.Clients.Access;
    24 using HeuristicLab.PluginInfrastructure;
    2527
    2628namespace HeuristicLab.OptimizationExpertSystem {
     
    5052      ClientInformation.InitializeAsync();
    5153      UserInformation.InitializeAsync();
    52 
     54      ContentManager.Initialize(new PersistenceContentManager());
    5355      mainForm.ShowContentInViewHost = true;
    5456      Application.Run(mainForm);
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterAllinOneView.cs

    r13751 r13774  
    7878    #region Event Registration
    7979    protected override void DeregisterContentEvents() {
    80       Content.SuggestedInstances.CollectionReset -= SuggestedInstancesOnChanged;
    81       Content.SuggestedInstances.ItemsAdded -= SuggestedInstancesOnChanged;
    82       Content.SuggestedInstances.ItemsMoved -= SuggestedInstancesOnChanged;
    83       Content.SuggestedInstances.ItemsRemoved -= SuggestedInstancesOnChanged;
    84       Content.SuggestedInstances.ItemsReplaced -= SuggestedInstancesOnChanged;
     80      Content.AlgorithmInstances.CollectionReset -= SuggestedInstancesOnChanged;
     81      Content.AlgorithmInstances.ItemsAdded -= SuggestedInstancesOnChanged;
     82      Content.AlgorithmInstances.ItemsMoved -= SuggestedInstancesOnChanged;
     83      Content.AlgorithmInstances.ItemsRemoved -= SuggestedInstancesOnChanged;
     84      Content.AlgorithmInstances.ItemsReplaced -= SuggestedInstancesOnChanged;
    8585      Content.SolutionSeedingPool.CollectionReset -= SeedingPoolOnChanged;
    8686      Content.SolutionSeedingPool.ItemsAdded -= SeedingPoolOnChanged;
     
    9494    protected override void RegisterContentEvents() {
    9595      base.RegisterContentEvents();
    96       Content.SuggestedInstances.CollectionReset += SuggestedInstancesOnChanged;
    97       Content.SuggestedInstances.ItemsAdded += SuggestedInstancesOnChanged;
    98       Content.SuggestedInstances.ItemsMoved += SuggestedInstancesOnChanged;
    99       Content.SuggestedInstances.ItemsRemoved += SuggestedInstancesOnChanged;
    100       Content.SuggestedInstances.ItemsReplaced += SuggestedInstancesOnChanged;
     96      Content.AlgorithmInstances.CollectionReset += SuggestedInstancesOnChanged;
     97      Content.AlgorithmInstances.ItemsAdded += SuggestedInstancesOnChanged;
     98      Content.AlgorithmInstances.ItemsMoved += SuggestedInstancesOnChanged;
     99      Content.AlgorithmInstances.ItemsRemoved += SuggestedInstancesOnChanged;
     100      Content.AlgorithmInstances.ItemsReplaced += SuggestedInstancesOnChanged;
    101101      Content.SolutionSeedingPool.CollectionReset += SeedingPoolOnChanged;
    102102      Content.SolutionSeedingPool.ItemsAdded += SeedingPoolOnChanged;
     
    248248    private void AlgorithmCloneButtonOnClick(object sender, EventArgs e) {
    249249      if (suggestedInstancesComboBox.SelectedIndex >= 0)
    250         MainFormManager.MainForm.ShowContent((IAlgorithm)Content.SuggestedInstances[suggestedInstancesComboBox.SelectedIndex].Clone());
     250        MainFormManager.MainForm.ShowContent((IAlgorithm)Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex].Clone());
    251251    }
    252252
     
    279279      if (InvokeRequired) { Invoke((Action<object, EventArgs>)SuggestedInstancesComboBoxOnSelectedIndexChanged, sender, e); return; }
    280280      if (suggestedInstancesComboBox.SelectedIndex >= 0) {
    281         var alg = Content.SuggestedInstances[suggestedInstancesComboBox.SelectedIndex];
     281        var alg = Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex];
    282282        solverParametersView.Content = alg.Parameters;
    283283        var engineAlg = alg as EngineAlgorithm;
     
    328328      if (Content == null) return;
    329329
    330       for (var i = 0; i < Content.SuggestedInstances.Count; i++) {
    331         suggestedInstancesComboBox.Items.Add(Content.SuggestedInstances[i]);
    332         if (prevSelection == null || Content.SuggestedInstances[i].Name == prevSelection.Name)
     330      for (var i = 0; i < Content.AlgorithmInstances.Count; i++) {
     331        suggestedInstancesComboBox.Items.Add(Content.AlgorithmInstances[i]);
     332        if (prevSelection == null || Content.AlgorithmInstances[i].Name == prevSelection.Name)
    333333          prevNewIndex = prevSelection == null ? 0 : i;
    334334      }
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.cs

    r13752 r13774  
    8888
    8989    private void RegisterContentSuggestedInstancesEvents() {
    90       Content.SuggestedInstances.CollectionReset += ContentOnSuggestedInstancesChanged;
    91       Content.SuggestedInstances.ItemsAdded += ContentOnSuggestedInstancesChanged;
    92       Content.SuggestedInstances.ItemsMoved += ContentOnSuggestedInstancesChanged;
    93       Content.SuggestedInstances.ItemsRemoved += ContentOnSuggestedInstancesChanged;
    94       Content.SuggestedInstances.ItemsReplaced += ContentOnSuggestedInstancesChanged;
     90      Content.AlgorithmInstances.CollectionReset += ContentOnSuggestedInstancesChanged;
     91      Content.AlgorithmInstances.ItemsAdded += ContentOnSuggestedInstancesChanged;
     92      Content.AlgorithmInstances.ItemsMoved += ContentOnSuggestedInstancesChanged;
     93      Content.AlgorithmInstances.ItemsRemoved += ContentOnSuggestedInstancesChanged;
     94      Content.AlgorithmInstances.ItemsReplaced += ContentOnSuggestedInstancesChanged;
    9595    }
    9696
     
    139139
    140140    private void DeregisterContentSuggestedInstancesEvents() {
    141       Content.SuggestedInstances.CollectionReset -= ContentOnSuggestedInstancesChanged;
    142       Content.SuggestedInstances.ItemsAdded -= ContentOnSuggestedInstancesChanged;
    143       Content.SuggestedInstances.ItemsMoved -= ContentOnSuggestedInstancesChanged;
    144       Content.SuggestedInstances.ItemsRemoved -= ContentOnSuggestedInstancesChanged;
    145       Content.SuggestedInstances.ItemsReplaced -= ContentOnSuggestedInstancesChanged;
     141      Content.AlgorithmInstances.CollectionReset -= ContentOnSuggestedInstancesChanged;
     142      Content.AlgorithmInstances.ItemsAdded -= ContentOnSuggestedInstancesChanged;
     143      Content.AlgorithmInstances.ItemsMoved -= ContentOnSuggestedInstancesChanged;
     144      Content.AlgorithmInstances.ItemsRemoved -= ContentOnSuggestedInstancesChanged;
     145      Content.AlgorithmInstances.ItemsReplaced -= ContentOnSuggestedInstancesChanged;
    146146    }
    147147    #endregion
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.Designer.cs

    r13759 r13774  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    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();
     47      WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
     48      WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin2 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
     49      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
     50      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient8 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     51      WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
     52      WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
     53      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient9 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     54      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient5 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
     55      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient10 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     56      WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
     57      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient11 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     58      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient12 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     59      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
     60      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient13 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
     61      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient14 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
    6262      this.minTargetView = new HeuristicLab.Data.Views.StringConvertibleValueView();
    6363      this.maxEvaluationsView = new HeuristicLab.Data.Views.StringConvertibleValueView();
     
    8181      this.seedingStrategyLabel = new System.Windows.Forms.Label();
    8282      this.evaluationsLimitabel = new System.Windows.Forms.Label();
    83       this.algorithmSuggestionLabel = new System.Windows.Forms.Label();
     83      this.recommenderLabel = new System.Windows.Forms.Label();
    8484      this.suggestedInstancesComboBox = new System.Windows.Forms.ComboBox();
     85      this.recommenderComboBox = new System.Windows.Forms.ComboBox();
     86      this.solverSplitContainer = new System.Windows.Forms.SplitContainer();
     87      this.recommenderViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
     88      this.instanceLabel = new System.Windows.Forms.Label();
     89      this.recommendRefreshButton = new System.Windows.Forms.Button();
    8590      this.solverTabControl.SuspendLayout();
    8691      this.resultsTabPage.SuspendLayout();
     
    8994      this.parametersTabPage.SuspendLayout();
    9095      this.operatorGraphTabPage.SuspendLayout();
     96      ((System.ComponentModel.ISupportInitialize)(this.solverSplitContainer)).BeginInit();
     97      this.solverSplitContainer.Panel1.SuspendLayout();
     98      this.solverSplitContainer.Panel2.SuspendLayout();
     99      this.solverSplitContainer.SuspendLayout();
    91100      this.SuspendLayout();
    92101      //
     
    115124      // algorithmCloneButton
    116125      //
    117       this.algorithmCloneButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    118       this.algorithmCloneButton.Location = new System.Drawing.Point(823, 56);
     126      this.algorithmCloneButton.Location = new System.Drawing.Point(123, 60);
    119127      this.algorithmCloneButton.Name = "algorithmCloneButton";
    120128      this.algorithmCloneButton.Size = new System.Drawing.Size(26, 23);
     
    136144      //
    137145      this.solverTabControl.AllowDrop = true;
    138       this.solverTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    139             | System.Windows.Forms.AnchorStyles.Left)
    140             | System.Windows.Forms.AnchorStyles.Right)));
    141146      this.solverTabControl.Controls.Add(this.resultsTabPage);
    142147      this.solverTabControl.Controls.Add(this.runsTabPage);
     
    145150      this.solverTabControl.Controls.Add(this.parametersTabPage);
    146151      this.solverTabControl.Controls.Add(this.operatorGraphTabPage);
    147       this.solverTabControl.Location = new System.Drawing.Point(0, 84);
     152      this.solverTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
     153      this.solverTabControl.Location = new System.Drawing.Point(3, 3);
    148154      this.solverTabControl.Name = "solverTabControl";
    149155      this.solverTabControl.SelectedIndex = 0;
    150       this.solverTabControl.Size = new System.Drawing.Size(849, 480);
     156      this.solverTabControl.Size = new System.Drawing.Size(556, 502);
    151157      this.solverTabControl.TabIndex = 11;
    152158      //
     
    158164      this.resultsTabPage.Name = "resultsTabPage";
    159165      this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3);
    160       this.resultsTabPage.Size = new System.Drawing.Size(841, 454);
     166      this.resultsTabPage.Size = new System.Drawing.Size(548, 476);
    161167      this.resultsTabPage.TabIndex = 2;
    162168      this.resultsTabPage.Text = "Results";
     
    166172      //
    167173      this.showOnlyFinalResultCheckBox.AutoSize = true;
     174      this.showOnlyFinalResultCheckBox.Checked = true;
     175      this.showOnlyFinalResultCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
    168176      this.showOnlyFinalResultCheckBox.Location = new System.Drawing.Point(6, 6);
    169177      this.showOnlyFinalResultCheckBox.Name = "showOnlyFinalResultCheckBox";
     
    181189      this.resultsDockPanel.Location = new System.Drawing.Point(3, 29);
    182190      this.resultsDockPanel.Name = "resultsDockPanel";
    183       this.resultsDockPanel.Size = new System.Drawing.Size(835, 422);
    184       dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
    185       dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
    186       autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
    187       tabGradient1.EndColor = System.Drawing.SystemColors.Control;
    188       tabGradient1.StartColor = System.Drawing.SystemColors.Control;
    189       tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
    190       autoHideStripSkin1.TabGradient = tabGradient1;
    191       autoHideStripSkin1.TextFont = new System.Drawing.Font("Segoe UI", 9F);
    192       dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
    193       tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
    194       tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
    195       tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
    196       dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
    197       dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
    198       dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
    199       dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
    200       tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
    201       tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
    202       tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
    203       dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
    204       dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
    205       dockPaneStripSkin1.TextFont = new System.Drawing.Font("Segoe UI", 9F);
    206       tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
    207       tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    208       tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
    209       tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
    210       dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
    211       tabGradient5.EndColor = System.Drawing.SystemColors.Control;
    212       tabGradient5.StartColor = System.Drawing.SystemColors.Control;
    213       tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
    214       dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
    215       dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
    216       dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
    217       dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
    218       tabGradient6.EndColor = System.Drawing.SystemColors.InactiveCaption;
    219       tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    220       tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
    221       tabGradient6.TextColor = System.Drawing.SystemColors.InactiveCaptionText;
    222       dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
    223       tabGradient7.EndColor = System.Drawing.Color.Transparent;
    224       tabGradient7.StartColor = System.Drawing.Color.Transparent;
    225       tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
    226       dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
    227       dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
    228       dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
    229       this.resultsDockPanel.Skin = dockPanelSkin1;
     191      this.resultsDockPanel.Size = new System.Drawing.Size(542, 444);
     192      dockPanelGradient4.EndColor = System.Drawing.SystemColors.ControlLight;
     193      dockPanelGradient4.StartColor = System.Drawing.SystemColors.ControlLight;
     194      autoHideStripSkin2.DockStripGradient = dockPanelGradient4;
     195      tabGradient8.EndColor = System.Drawing.SystemColors.Control;
     196      tabGradient8.StartColor = System.Drawing.SystemColors.Control;
     197      tabGradient8.TextColor = System.Drawing.SystemColors.ControlDarkDark;
     198      autoHideStripSkin2.TabGradient = tabGradient8;
     199      autoHideStripSkin2.TextFont = new System.Drawing.Font("Segoe UI", 9F);
     200      dockPanelSkin2.AutoHideStripSkin = autoHideStripSkin2;
     201      tabGradient9.EndColor = System.Drawing.SystemColors.ControlLightLight;
     202      tabGradient9.StartColor = System.Drawing.SystemColors.ControlLightLight;
     203      tabGradient9.TextColor = System.Drawing.SystemColors.ControlText;
     204      dockPaneStripGradient2.ActiveTabGradient = tabGradient9;
     205      dockPanelGradient5.EndColor = System.Drawing.SystemColors.Control;
     206      dockPanelGradient5.StartColor = System.Drawing.SystemColors.Control;
     207      dockPaneStripGradient2.DockStripGradient = dockPanelGradient5;
     208      tabGradient10.EndColor = System.Drawing.SystemColors.ControlLight;
     209      tabGradient10.StartColor = System.Drawing.SystemColors.ControlLight;
     210      tabGradient10.TextColor = System.Drawing.SystemColors.ControlText;
     211      dockPaneStripGradient2.InactiveTabGradient = tabGradient10;
     212      dockPaneStripSkin2.DocumentGradient = dockPaneStripGradient2;
     213      dockPaneStripSkin2.TextFont = new System.Drawing.Font("Segoe UI", 9F);
     214      tabGradient11.EndColor = System.Drawing.SystemColors.ActiveCaption;
     215      tabGradient11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
     216      tabGradient11.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
     217      tabGradient11.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
     218      dockPaneStripToolWindowGradient2.ActiveCaptionGradient = tabGradient11;
     219      tabGradient12.EndColor = System.Drawing.SystemColors.Control;
     220      tabGradient12.StartColor = System.Drawing.SystemColors.Control;
     221      tabGradient12.TextColor = System.Drawing.SystemColors.ControlText;
     222      dockPaneStripToolWindowGradient2.ActiveTabGradient = tabGradient12;
     223      dockPanelGradient6.EndColor = System.Drawing.SystemColors.ControlLight;
     224      dockPanelGradient6.StartColor = System.Drawing.SystemColors.ControlLight;
     225      dockPaneStripToolWindowGradient2.DockStripGradient = dockPanelGradient6;
     226      tabGradient13.EndColor = System.Drawing.SystemColors.InactiveCaption;
     227      tabGradient13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
     228      tabGradient13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
     229      tabGradient13.TextColor = System.Drawing.SystemColors.InactiveCaptionText;
     230      dockPaneStripToolWindowGradient2.InactiveCaptionGradient = tabGradient13;
     231      tabGradient14.EndColor = System.Drawing.Color.Transparent;
     232      tabGradient14.StartColor = System.Drawing.Color.Transparent;
     233      tabGradient14.TextColor = System.Drawing.SystemColors.ControlDarkDark;
     234      dockPaneStripToolWindowGradient2.InactiveTabGradient = tabGradient14;
     235      dockPaneStripSkin2.ToolWindowGradient = dockPaneStripToolWindowGradient2;
     236      dockPanelSkin2.DockPaneStripSkin = dockPaneStripSkin2;
     237      this.resultsDockPanel.Skin = dockPanelSkin2;
    230238      this.resultsDockPanel.TabIndex = 0;
    231239      //
     
    236244      this.runsTabPage.Name = "runsTabPage";
    237245      this.runsTabPage.Padding = new System.Windows.Forms.Padding(3);
    238       this.runsTabPage.Size = new System.Drawing.Size(841, 454);
     246      this.runsTabPage.Size = new System.Drawing.Size(548, 476);
    239247      this.runsTabPage.TabIndex = 4;
    240248      this.runsTabPage.Text = "Runs";
     
    249257      this.runsView.Name = "runsView";
    250258      this.runsView.ReadOnly = false;
    251       this.runsView.Size = new System.Drawing.Size(835, 448);
     259      this.runsView.Size = new System.Drawing.Size(542, 470);
    252260      this.runsView.TabIndex = 0;
    253261      //
     
    258266      this.seededRunsTabPage.Name = "seededRunsTabPage";
    259267      this.seededRunsTabPage.Padding = new System.Windows.Forms.Padding(3);
    260       this.seededRunsTabPage.Size = new System.Drawing.Size(841, 454);
     268      this.seededRunsTabPage.Size = new System.Drawing.Size(548, 476);
    261269      this.seededRunsTabPage.TabIndex = 5;
    262270      this.seededRunsTabPage.Text = "Seeded Runs";
     
    271279      this.seededRunsView.Name = "seededRunsView";
    272280      this.seededRunsView.ReadOnly = false;
    273       this.seededRunsView.Size = new System.Drawing.Size(835, 448);
     281      this.seededRunsView.Size = new System.Drawing.Size(542, 470);
    274282      this.seededRunsView.TabIndex = 1;
    275283      //
     
    279287      this.solutionSeedingTabPage.Name = "solutionSeedingTabPage";
    280288      this.solutionSeedingTabPage.Padding = new System.Windows.Forms.Padding(3);
    281       this.solutionSeedingTabPage.Size = new System.Drawing.Size(841, 454);
     289      this.solutionSeedingTabPage.Size = new System.Drawing.Size(548, 476);
    282290      this.solutionSeedingTabPage.TabIndex = 1;
    283291      this.solutionSeedingTabPage.Text = "Seeding Pool";
     
    290298      this.parametersTabPage.Name = "parametersTabPage";
    291299      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    292       this.parametersTabPage.Size = new System.Drawing.Size(841, 454);
     300      this.parametersTabPage.Size = new System.Drawing.Size(548, 476);
    293301      this.parametersTabPage.TabIndex = 0;
    294302      this.parametersTabPage.Text = "Parameters";
     
    305313      this.solverParametersView.ReadOnly = true;
    306314      this.solverParametersView.ShowDetails = true;
    307       this.solverParametersView.Size = new System.Drawing.Size(835, 448);
     315      this.solverParametersView.Size = new System.Drawing.Size(542, 470);
    308316      this.solverParametersView.TabIndex = 0;
    309317      //
     
    314322      this.operatorGraphTabPage.Name = "operatorGraphTabPage";
    315323      this.operatorGraphTabPage.Padding = new System.Windows.Forms.Padding(3);
    316       this.operatorGraphTabPage.Size = new System.Drawing.Size(841, 454);
     324      this.operatorGraphTabPage.Size = new System.Drawing.Size(548, 476);
    317325      this.operatorGraphTabPage.TabIndex = 3;
    318326      this.operatorGraphTabPage.Text = "Operator Graph";
     
    328336      this.operatorGraphViewHost.Name = "operatorGraphViewHost";
    329337      this.operatorGraphViewHost.ReadOnly = true;
    330       this.operatorGraphViewHost.Size = new System.Drawing.Size(835, 448);
     338      this.operatorGraphViewHost.Size = new System.Drawing.Size(542, 470);
    331339      this.operatorGraphViewHost.TabIndex = 0;
    332340      this.operatorGraphViewHost.ViewsLabelVisible = true;
     
    335343      // algorithmStartButton
    336344      //
    337       this.algorithmStartButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    338       this.algorithmStartButton.Location = new System.Drawing.Point(791, 55);
     345      this.algorithmStartButton.Location = new System.Drawing.Point(91, 60);
    339346      this.algorithmStartButton.Name = "algorithmStartButton";
    340347      this.algorithmStartButton.Size = new System.Drawing.Size(26, 23);
     
    371378      this.evaluationsLimitabel.Text = "Budget (FE):";
    372379      //
    373       // algorithmSuggestionLabel
    374       //
    375       this.algorithmSuggestionLabel.AutoSize = true;
    376       this.algorithmSuggestionLabel.Location = new System.Drawing.Point(3, 59);
    377       this.algorithmSuggestionLabel.Name = "algorithmSuggestionLabel";
    378       this.algorithmSuggestionLabel.Size = new System.Drawing.Size(99, 13);
    379       this.algorithmSuggestionLabel.TabIndex = 9;
    380       this.algorithmSuggestionLabel.Text = "Suggested Solvers:";
     380      // recommenderLabel
     381      //
     382      this.recommenderLabel.AutoSize = true;
     383      this.recommenderLabel.Location = new System.Drawing.Point(6, 9);
     384      this.recommenderLabel.Name = "recommenderLabel";
     385      this.recommenderLabel.Size = new System.Drawing.Size(79, 13);
     386      this.recommenderLabel.TabIndex = 9;
     387      this.recommenderLabel.Text = "Recommender:";
    381388      //
    382389      // suggestedInstancesComboBox
     
    386393      this.suggestedInstancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    387394      this.suggestedInstancesComboBox.FormattingEnabled = true;
    388       this.suggestedInstancesComboBox.Location = new System.Drawing.Point(108, 56);
     395      this.suggestedInstancesComboBox.Location = new System.Drawing.Point(91, 33);
    389396      this.suggestedInstancesComboBox.Name = "suggestedInstancesComboBox";
    390       this.suggestedInstancesComboBox.Size = new System.Drawing.Size(677, 21);
     397      this.suggestedInstancesComboBox.Size = new System.Drawing.Size(186, 21);
    391398      this.suggestedInstancesComboBox.TabIndex = 7;
    392399      this.suggestedInstancesComboBox.SelectedIndexChanged += new System.EventHandler(this.SuggestedInstancesComboBoxOnSelectedIndexChanged);
    393400      //
     401      // recommenderComboBox
     402      //
     403      this.recommenderComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     404            | System.Windows.Forms.AnchorStyles.Right)));
     405      this.recommenderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     406      this.recommenderComboBox.FormattingEnabled = true;
     407      this.recommenderComboBox.Location = new System.Drawing.Point(91, 6);
     408      this.recommenderComboBox.Name = "recommenderComboBox";
     409      this.recommenderComboBox.Size = new System.Drawing.Size(154, 21);
     410      this.recommenderComboBox.TabIndex = 7;
     411      this.recommenderComboBox.SelectedIndexChanged += new System.EventHandler(this.RecommenderComboBoxOnSelectedIndexChanged);
     412      //
     413      // solverSplitContainer
     414      //
     415      this.solverSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     416            | System.Windows.Forms.AnchorStyles.Left)
     417            | System.Windows.Forms.AnchorStyles.Right)));
     418      this.solverSplitContainer.Location = new System.Drawing.Point(0, 56);
     419      this.solverSplitContainer.Name = "solverSplitContainer";
     420      //
     421      // solverSplitContainer.Panel1
     422      //
     423      this.solverSplitContainer.Panel1.Controls.Add(this.recommenderViewHost);
     424      this.solverSplitContainer.Panel1.Controls.Add(this.instanceLabel);
     425      this.solverSplitContainer.Panel1.Controls.Add(this.recommenderLabel);
     426      this.solverSplitContainer.Panel1.Controls.Add(this.recommenderComboBox);
     427      this.solverSplitContainer.Panel1.Controls.Add(this.algorithmCloneButton);
     428      this.solverSplitContainer.Panel1.Controls.Add(this.suggestedInstancesComboBox);
     429      this.solverSplitContainer.Panel1.Controls.Add(this.recommendRefreshButton);
     430      this.solverSplitContainer.Panel1.Controls.Add(this.algorithmStartButton);
     431      this.solverSplitContainer.Panel1.Padding = new System.Windows.Forms.Padding(3);
     432      //
     433      // solverSplitContainer.Panel2
     434      //
     435      this.solverSplitContainer.Panel2.Controls.Add(this.solverTabControl);
     436      this.solverSplitContainer.Panel2.Padding = new System.Windows.Forms.Padding(3);
     437      this.solverSplitContainer.Size = new System.Drawing.Size(849, 508);
     438      this.solverSplitContainer.SplitterDistance = 283;
     439      this.solverSplitContainer.TabIndex = 17;
     440      //
     441      // recommenderViewHost
     442      //
     443      this.recommenderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     444            | System.Windows.Forms.AnchorStyles.Left)
     445            | System.Windows.Forms.AnchorStyles.Right)));
     446      this.recommenderViewHost.Caption = "View";
     447      this.recommenderViewHost.Content = null;
     448      this.recommenderViewHost.Enabled = false;
     449      this.recommenderViewHost.Location = new System.Drawing.Point(6, 89);
     450      this.recommenderViewHost.Name = "recommenderViewHost";
     451      this.recommenderViewHost.ReadOnly = false;
     452      this.recommenderViewHost.Size = new System.Drawing.Size(271, 412);
     453      this.recommenderViewHost.TabIndex = 16;
     454      this.recommenderViewHost.ViewsLabelVisible = true;
     455      this.recommenderViewHost.ViewType = null;
     456      //
     457      // instanceLabel
     458      //
     459      this.instanceLabel.AutoSize = true;
     460      this.instanceLabel.Location = new System.Drawing.Point(6, 36);
     461      this.instanceLabel.Name = "instanceLabel";
     462      this.instanceLabel.Size = new System.Drawing.Size(51, 13);
     463      this.instanceLabel.TabIndex = 9;
     464      this.instanceLabel.Text = "Instance:";
     465      //
     466      // recommendRefreshButton
     467      //
     468      this.recommendRefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     469      this.recommendRefreshButton.Location = new System.Drawing.Point(251, 6);
     470      this.recommendRefreshButton.Name = "recommendRefreshButton";
     471      this.recommendRefreshButton.Size = new System.Drawing.Size(26, 23);
     472      this.recommendRefreshButton.TabIndex = 10;
     473      this.recommendRefreshButton.Text = "Start";
     474      this.recommendRefreshButton.UseVisualStyleBackColor = true;
     475      this.recommendRefreshButton.Click += new System.EventHandler(this.button1_Click);
     476      //
    394477      // SolverView
    395478      //
    396479      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    397480      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     481      this.Controls.Add(this.solverSplitContainer);
    398482      this.Controls.Add(this.minTargetView);
    399483      this.Controls.Add(this.maxEvaluationsView);
    400       this.Controls.Add(this.algorithmCloneButton);
    401484      this.Controls.Add(this.seedingStrategyPanel);
    402       this.Controls.Add(this.solverTabControl);
    403       this.Controls.Add(this.algorithmStartButton);
    404485      this.Controls.Add(this.minimumTargetLabel);
    405486      this.Controls.Add(this.seedingStrategyLabel);
    406487      this.Controls.Add(this.evaluationsLimitabel);
    407       this.Controls.Add(this.algorithmSuggestionLabel);
    408       this.Controls.Add(this.suggestedInstancesComboBox);
    409488      this.Name = "SolverView";
    410489      this.Size = new System.Drawing.Size(849, 564);
     
    416495      this.parametersTabPage.ResumeLayout(false);
    417496      this.operatorGraphTabPage.ResumeLayout(false);
     497      this.solverSplitContainer.Panel1.ResumeLayout(false);
     498      this.solverSplitContainer.Panel1.PerformLayout();
     499      this.solverSplitContainer.Panel2.ResumeLayout(false);
     500      ((System.ComponentModel.ISupportInitialize)(this.solverSplitContainer)).EndInit();
     501      this.solverSplitContainer.ResumeLayout(false);
    418502      this.ResumeLayout(false);
    419503      this.PerformLayout();
     
    434518    private System.Windows.Forms.Label seedingStrategyLabel;
    435519    private System.Windows.Forms.Label evaluationsLimitabel;
    436     private System.Windows.Forms.Label algorithmSuggestionLabel;
     520    private System.Windows.Forms.Label recommenderLabel;
    437521    private System.Windows.Forms.ComboBox suggestedInstancesComboBox;
    438522    private System.Windows.Forms.Button algorithmCloneButton;
     
    446530    private System.Windows.Forms.Label minimumTargetLabel;
    447531    private Data.Views.StringConvertibleValueView minTargetView;
     532    private System.Windows.Forms.ComboBox recommenderComboBox;
     533    private System.Windows.Forms.SplitContainer solverSplitContainer;
     534    private MainForm.WindowsForms.ViewHost recommenderViewHost;
     535    private System.Windows.Forms.Label instanceLabel;
     536    private System.Windows.Forms.Button recommendRefreshButton;
    448537  }
    449538}
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.cs

    r13759 r13774  
    4444      algorithmCloneButton.Text = string.Empty;
    4545      algorithmCloneButton.Image = VSImageLibrary.Clone;
     46      recommendRefreshButton.Text = string.Empty;
     47      recommendRefreshButton.Image = VSImageLibrary.Refresh;
    4648      seedingStrategyView = new EnumValueView<SeedingStrategyTypes>() {
    4749        Dock = DockStyle.Fill
     
    6668          seedingStrategyView.Content = null;
    6769          seedingSolutionsView.Content = null;
     70          recommenderViewHost.Content = null;
    6871        } else {
    6972          maxEvaluationsView.Content = Content.MaximumEvaluations;
     
    7376          seedingStrategyView.Content = Content.SeedingStrategy;
    7477          seedingSolutionsView.Content = Content.SolutionSeedingPool;
     78          recommenderViewHost.Content = Content.AlgorithmInstanceRecommender;
    7579        }
    7680      } finally { SuppressEvents = false; }
    7781      UpdateSuggestedInstancesCombobox();
     82      UpdateRecommenderCombobox();
    7883    }
    7984
     
    103108      if (Content == null) return;
    104109
    105       for (var i = 0; i < Content.SuggestedInstances.Count; i++) {
    106         suggestedInstancesComboBox.Items.Add(Content.SuggestedInstances[i]);
    107         if (prevSelection == null || Content.SuggestedInstances[i].Name == prevSelection.Name)
     110      for (var i = 0; i < Content.AlgorithmInstances.Count; i++) {
     111        suggestedInstancesComboBox.Items.Add(Content.AlgorithmInstances[i]);
     112        if (prevSelection == null || Content.AlgorithmInstances[i].Name == prevSelection.Name)
    108113          prevNewIndex = prevSelection == null ? 0 : i;
    109114      }
    110       if (prevNewIndex >= 0) {
    111         suggestedInstancesComboBox.SelectedIndex = prevNewIndex;
     115      if (prevNewIndex >= 0) suggestedInstancesComboBox.SelectedIndex = prevNewIndex;
     116    }
     117
     118    private void UpdateRecommenderCombobox() {
     119      var prevSelection = Content.AlgorithmInstanceRecommender;
     120      var prevNewIndex = -1;
     121      recommenderComboBox.Items.Clear();
     122      if (Content == null) return;
     123
     124      /*var i = 0;
     125      foreach (var type in ApplicationManager.Manager.GetTypes(typeof (IAlgorithmInstanceRecommender))) {
     126        var r = (IAlgorithmInstanceRecommender)Activator.CreateInstance(type, BindingFlags.CreateInstance, Content);
     127        recommenderComboBox.Items.Add(r);
     128        if (prevSelection == null || type == prevSelection.GetType())
     129          prevNewIndex = prevSelection == null ? 0 : i;
     130        i++;
    112131      }
     132      if (prevNewIndex >= 0) recommenderComboBox.SelectedIndex = prevNewIndex;*/
     133      recommenderComboBox.Items.Add(new OverallBestRecommender(Content));
     134      if (prevSelection is OverallBestRecommender) recommenderComboBox.SelectedIndex = recommenderComboBox.Items.Count - 1;
     135      recommenderComboBox.Items.Add(new KNearestNeighborRecommender(Content));
     136      if (prevSelection is KNearestNeighborRecommender) recommenderComboBox.SelectedIndex = recommenderComboBox.Items.Count - 1;
     137      recommenderComboBox.Items.Add(new DistanceWeightedRecommender(Content));
     138      if (prevSelection is DistanceWeightedRecommender) recommenderComboBox.SelectedIndex = recommenderComboBox.Items.Count - 1;
    113139    }
    114140
     
    120146    private void AlgorithmCloneButtonOnClick(object sender, EventArgs e) {
    121147      if (suggestedInstancesComboBox.SelectedIndex >= 0)
    122         MainForm.ShowContent((IAlgorithm)Content.SuggestedInstances[suggestedInstancesComboBox.SelectedIndex].Clone());
     148        MainForm.ShowContent((IAlgorithm)Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex].Clone());
    123149    }
    124150
     
    126152      if (InvokeRequired) { Invoke((Action<object, EventArgs>)SuggestedInstancesComboBoxOnSelectedIndexChanged, sender, e); return; }
    127153      if (suggestedInstancesComboBox.SelectedIndex >= 0) {
    128         var alg = Content.SuggestedInstances[suggestedInstancesComboBox.SelectedIndex];
     154        var alg = Content.AlgorithmInstances[suggestedInstancesComboBox.SelectedIndex];
    129155        solverParametersView.Content = alg.Parameters;
    130156        var engineAlg = alg as EngineAlgorithm;
     
    137163      SetEnabledStateOfControls();
    138164    }
     165
     166    private void RecommenderComboBoxOnSelectedIndexChanged(object sender, EventArgs e) {
     167      if (InvokeRequired) { Invoke((Action<object, EventArgs>)RecommenderComboBoxOnSelectedIndexChanged, sender, e); return; }
     168      if (recommenderComboBox.SelectedIndex < 0) return;
     169      Content.AlgorithmInstanceRecommender = (IAlgorithmInstanceRecommender)recommenderComboBox.SelectedItem;
     170      recommenderViewHost.Content = Content.AlgorithmInstanceRecommender;
     171      Content.UpdateSuggestions();
     172    }
     173
     174    private void button1_Click(object sender, EventArgs e) {
     175      Content.UpdateSuggestions();
     176    }
    139177  }
    140178}
Note: See TracChangeset for help on using the changeset viewer.