Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/23/16 22:51:27 (8 years ago)
Author:
abeham
Message:

#2457:

  • Renamed remaining files from ExpertSystem to KnowledgeCenter
  • Added ability to scatter plot to display a regression line
  • Allowed to execute multiple instances at once and displaying either only final result or tracking result
  • Split runs in seeded runs and instance runs
Location:
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views
Files:
18 moved

Legend:

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

    r13721 r13722  
    2525namespace HeuristicLab.OptimizationExpertSystem {
    2626  [View("Knowledge Base View")]
    27   [Content(typeof(ExpertSystem), IsDefaultView = false)]
    28   public partial class KnowledgeBaseView : ExpertSystemViewBase {
     27  [Content(typeof(KnowledgeCenter), IsDefaultView = false)]
     28  public partial class KnowledgeBaseView : KnowledgeCenterViewBase {
    2929    public KnowledgeBaseView() {
    3030      InitializeComponent();
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterAllinOneView.Designer.cs

    r13721 r13722  
    2121
    2222namespace HeuristicLab.OptimizationExpertSystem {
    23   partial class ExpertSystemView {
     23  partial class KnowledgeCenterAllinOneView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterAllinOneView.cs

    r13721 r13722  
    3030using HeuristicLab.Data.Views;
    3131using HeuristicLab.MainForm;
     32using HeuristicLab.MainForm.WindowsForms;
    3233using HeuristicLab.Optimization;
    3334using HeuristicLab.Optimization.Views;
     
    4344namespace HeuristicLab.OptimizationExpertSystem {
    4445  [View("Knowledge Center (all-in-one view)")]
    45   [Content(typeof(ExpertSystem), IsDefaultView = true)]
    46   public partial class ExpertSystemView : ItemView {
     46  [Content(typeof(KnowledgeCenter), IsDefaultView = true)]
     47  public partial class KnowledgeCenterAllinOneView : AsynchronousContentView {
    4748    private EnumValueView<SeedingStrategyTypes> seedingStrategyView;
    4849    private CheckedItemListView<IScope> seedingSolutionsView;
     
    5051    private bool okbDownloadInProgress;
    5152
    52     public new ExpertSystem Content {
    53       get { return (ExpertSystem)base.Content; }
     53    public new KnowledgeCenter Content {
     54      get { return (KnowledgeCenter)base.Content; }
    5455      set { base.Content = value; }
    5556    }
    5657
    57     public ExpertSystemView() {
     58    public KnowledgeCenterAllinOneView() {
    5859      InitializeComponent();
    5960      // brings progress panel to front (it is not visible by default, but obstructs other elements in designer)
     
    7778    #region Event Registration
    7879    protected override void DeregisterContentEvents() {
    79       Content.PropertyChanged -= ContentOnPropertyChanged;
    8080      Content.SuggestedInstances.CollectionReset -= SuggestedInstancesOnChanged;
    8181      Content.SuggestedInstances.ItemsAdded -= SuggestedInstancesOnChanged;
     
    9494    protected override void RegisterContentEvents() {
    9595      base.RegisterContentEvents();
    96       Content.PropertyChanged += ContentOnPropertyChanged;
    9796      Content.SuggestedInstances.CollectionReset += SuggestedInstancesOnChanged;
    9897      Content.SuggestedInstances.ItemsAdded += SuggestedInstancesOnChanged;
     
    145144          maxEvaluationsTextBox.Text = Content.MaximumEvaluations.ToString();
    146145          problemViewHost.Content = Content.Problem;
    147           runsView.Content = Content.Runs;
     146          runsView.Content = Content.InstanceRuns;
    148147          kbViewHost.ViewType = typeof(RunCollectionRLDView);
    149148          kbViewHost.Content = Content.KnowledgeBase;
    150149          problemInstancesView.Content = Content.ProblemInstances;
    151           solverResultsView.Content = Content.CurrentResult;
     150          solverResultsView.Content = null;
    152151          seedingStrategyView.Content = Content.SeedingStrategy;
    153152          seedingSolutionsView.Content = Content.SolutionSeedingPool;
     
    181180    }
    182181
    183     private void ContentOnPropertyChanged(object sender, PropertyChangedEventArgs e) {
    184       if (InvokeRequired) {
    185         Invoke((Action<object, PropertyChangedEventArgs>)ContentOnPropertyChanged, sender, e);
    186         return;
    187       }
    188       SuppressEvents = true;
    189       try {
    190         switch (e.PropertyName) {
    191           case "KnowledgeBase": kbViewHost.Content = Content.KnowledgeBase; break;
    192           case "MaximumEvaluations": maxEvaluationsTextBox.Text = Content.MaximumEvaluations.ToString(); break;
    193           case "Problem":
    194             DeregisterProblemEvents(problemViewHost.Content as OKBProblem);
    195             problemViewHost.Content = Content.Problem;
    196             RegisterProblemEvents(Content.Problem);
    197             UpdateNamesComboboxes();
    198             break;
    199           case "ProblemInstances": problemInstancesView.Content = Content.ProblemInstances; break;
    200           case "CurrentResult": solverResultsView.Content = Content.CurrentResult; break;
    201         }
    202       } finally { SuppressEvents = false; }
    203       SetEnabledStateOfControls();
    204     }
    205 
    206182    private void SuggestedInstancesOnChanged(object sender, EventArgs e) {
    207183      UpdateSuggestedInstancesCombobox();
     
    230206        //errorProvider.SetError(maxEvaluationsTextBox, "Please enter a valid integer number.");
    231207      } else {
    232         Content.MaximumEvaluations = value;
     208        Content.MaximumEvaluations.Value = value;
    233209        e.Cancel = false;
    234210        //errorProvider.SetError(maxEvaluationsTextBox, null);
     
    264240    }
    265241
    266     private void AlgorithmStartButtonOnClick(object sender, EventArgs e) {
    267       if (suggestedInstancesComboBox.SelectedIndex >= 0)
    268         Content.StartAlgorithmAsync(suggestedInstancesComboBox.SelectedIndex);
     242    private async void AlgorithmStartButtonOnClick(object sender, EventArgs e) {
     243      if (suggestedInstancesComboBox.SelectedIndex >= 0) {
     244        solverResultsView.Content = await Content.StartAlgorithmAsync(suggestedInstancesComboBox.SelectedIndex);
     245      }
    269246    }
    270247
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.Designer.cs

    r13721 r13722  
    2121
    2222namespace HeuristicLab.OptimizationExpertSystem {
    23   partial class ExpertSystemViewBase {
     23  partial class KnowledgeCenterViewBase {
    2424    /// <summary>
    2525    /// Required designer variable.
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.cs

    r13721 r13722  
    2121
    2222using HeuristicLab.Common;
    23 using HeuristicLab.Core.Views;
    2423using HeuristicLab.MainForm;
     24using HeuristicLab.MainForm.WindowsForms;
     25using HeuristicLab.Optimization;
    2526using HeuristicLab.OptimizationExpertSystem.Common;
    2627using System;
    27 using System.ComponentModel;
    2828
    2929namespace HeuristicLab.OptimizationExpertSystem {
    3030  [View("Expert-System View")]
    31   public partial class ExpertSystemViewBase : ItemView {
    32     public OptimizationExpertSystem MainForm {
    33       get { return (OptimizationExpertSystem)HeuristicLab.MainForm.MainFormManager.MainForm; }
     31  public partial class KnowledgeCenterViewBase : AsynchronousContentView {
     32    public OptimizationKnowledgeCenter MainForm {
     33      get { return (OptimizationKnowledgeCenter)HeuristicLab.MainForm.MainFormManager.MainForm; }
    3434    }
    3535
    36     public new ExpertSystem Content {
    37       get { return (ExpertSystem)base.Content; }
     36    public new KnowledgeCenter Content {
     37      get { return (KnowledgeCenter)base.Content; }
    3838      set { base.Content = value; }
    3939    }
    4040
    41     protected ExpertSystemViewBase() {
     41    protected KnowledgeCenterViewBase() {
    4242      InitializeComponent();
    4343    }
     
    4646    protected override void RegisterContentEvents() {
    4747      base.RegisterContentEvents();
    48       Content.PropertyChanged += ContentOnPropertyChanged;
    4948      Content.DownloadStarted += ContentOnDownloadStarted;
     49      Content.AlgorithmInstanceStarted += ContentOnAlgorithmInstanceStarted;
    5050      RegisterContentProblemEvents();
    5151      RegisterContentProblemInstancesEvents();
     
    8888    protected override void DeregisterContentEvents() {
    8989      base.DeregisterContentEvents();
    90       Content.PropertyChanged -= ContentOnPropertyChanged;
    9190      Content.DownloadStarted -= ContentOnDownloadStarted;
     91      Content.AlgorithmInstanceStarted -= ContentOnAlgorithmInstanceStarted;
    9292      DeregisterContentProblemEvents();
    9393      DeregisterContentProblemInstancesEvents();
     
    129129    #endregion
    130130
    131     private void ContentOnPropertyChanged(object sender, PropertyChangedEventArgs e) {
    132       if (InvokeRequired) Invoke((Action<string>)OnPropertyChanged, e.PropertyName);
    133       else {
    134         switch (e.PropertyName) {
    135           case "Problem": RegisterContentProblemEvents(); break;
    136           case "ProblemInstances": RegisterContentProblemInstancesEvents(); break;
    137           case "SolutionSeedingPool": RegisterContentSolutionSeedingPoolEvents(); break;
    138           case "SuggestedInstances": RegisterContentSuggestedInstancesEvents(); break;
    139         }
    140         OnPropertyChanged(e.PropertyName);
    141       }
    142     }
    143 
    144131    protected virtual void OnDownloadStarted(IProgress progress) { }
    145132    protected virtual void OnDownloadEnded() { }
     133    protected virtual void OnAlgorithmInstanceStarted(IAlgorithm algorithm) { }
    146134    protected virtual void OnPropertyChanged(string propertyName) { }
    147135    protected virtual void OnProblemChanged() { }
     
    150138    protected virtual void OnSolutionSeedingPoolChanged() { }
    151139    protected virtual void OnSuggestedInstancesChanged() { }
     140    protected virtual void OnKnowledgeBaseChanged() { }
    152141
    153142    #region Content Event Handlers
     
    157146      e.Value.ProgressStateChanged += ProgressOnStateChanged;
    158147      OnDownloadStarted(e.Value);
     148    }
     149
     150    private void ContentOnAlgorithmInstanceStarted(object sender, EventArgs<IAlgorithm> e) {
     151      if (InvokeRequired) { Invoke((Action<object, EventArgs<IAlgorithm>>)ContentOnAlgorithmInstanceStarted, sender, e); return; }
     152      OnAlgorithmInstanceStarted(e.Value);
    159153    }
    160154
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.Designer.cs

    r13721 r13722  
    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();
    4762      this.seedingStrategyPanel = new System.Windows.Forms.Panel();
    4863      this.solverTabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
    4964      this.resultsTabPage = new System.Windows.Forms.TabPage();
    50       this.solverResultsView = new HeuristicLab.Optimization.Views.ResultCollectionView();
     65      this.showOnlyFinalResultCheckBox = new System.Windows.Forms.CheckBox();
     66      this.resultsDockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
     67      this.runsTabPage = new System.Windows.Forms.TabPage();
     68      this.runsView = new HeuristicLab.Optimization.Views.RunCollectionView();
    5169      this.solutionSeedingTabPage = new System.Windows.Forms.TabPage();
    5270      this.parametersTabPage = new System.Windows.Forms.TabPage();
     
    5876      this.evaluationsLimitabel = new System.Windows.Forms.Label();
    5977      this.algorithmSuggestionLabel = new System.Windows.Forms.Label();
    60       this.maxEvaluationsTextBox = new System.Windows.Forms.TextBox();
    6178      this.suggestedInstancesComboBox = new System.Windows.Forms.ComboBox();
    6279      this.algorithmCloneButton = new System.Windows.Forms.Button();
    63       this.runsTabPage = new System.Windows.Forms.TabPage();
    64       this.runsView = new HeuristicLab.Optimization.Views.RunCollectionView();
     80      this.maxEvaluationsView = new HeuristicLab.Data.Views.StringConvertibleValueView();
     81      this.seededRunsTabPage = new System.Windows.Forms.TabPage();
     82      this.seededRunsView = new HeuristicLab.Optimization.Views.RunCollectionView();
    6583      this.solverTabControl.SuspendLayout();
    6684      this.resultsTabPage.SuspendLayout();
     85      this.runsTabPage.SuspendLayout();
    6786      this.parametersTabPage.SuspendLayout();
    6887      this.operatorGraphTabPage.SuspendLayout();
    69       this.runsTabPage.SuspendLayout();
     88      this.seededRunsTabPage.SuspendLayout();
    7089      this.SuspendLayout();
    7190      //
     
    87106      this.solverTabControl.Controls.Add(this.resultsTabPage);
    88107      this.solverTabControl.Controls.Add(this.runsTabPage);
     108      this.solverTabControl.Controls.Add(this.seededRunsTabPage);
    89109      this.solverTabControl.Controls.Add(this.solutionSeedingTabPage);
    90110      this.solverTabControl.Controls.Add(this.parametersTabPage);
     
    98118      // resultsTabPage
    99119      //
    100       this.resultsTabPage.Controls.Add(this.solverResultsView);
     120      this.resultsTabPage.Controls.Add(this.showOnlyFinalResultCheckBox);
     121      this.resultsTabPage.Controls.Add(this.resultsDockPanel);
    101122      this.resultsTabPage.Location = new System.Drawing.Point(4, 22);
    102123      this.resultsTabPage.Name = "resultsTabPage";
     
    107128      this.resultsTabPage.UseVisualStyleBackColor = true;
    108129      //
    109       // solverResultsView
    110       //
    111       this.solverResultsView.Caption = "ResultCollection View";
    112       this.solverResultsView.Content = null;
    113       this.solverResultsView.Dock = System.Windows.Forms.DockStyle.Fill;
    114       this.solverResultsView.Location = new System.Drawing.Point(3, 3);
    115       this.solverResultsView.Name = "solverResultsView";
    116       this.solverResultsView.ReadOnly = true;
    117       this.solverResultsView.ShowDetails = true;
    118       this.solverResultsView.Size = new System.Drawing.Size(835, 448);
    119       this.solverResultsView.TabIndex = 1;
     130      // showOnlyFinalResultCheckBox
     131      //
     132      this.showOnlyFinalResultCheckBox.AutoSize = true;
     133      this.showOnlyFinalResultCheckBox.Location = new System.Drawing.Point(6, 6);
     134      this.showOnlyFinalResultCheckBox.Name = "showOnlyFinalResultCheckBox";
     135      this.showOnlyFinalResultCheckBox.Size = new System.Drawing.Size(158, 17);
     136      this.showOnlyFinalResultCheckBox.TabIndex = 1;
     137      this.showOnlyFinalResultCheckBox.Text = "show only final result (faster)";
     138      this.showOnlyFinalResultCheckBox.UseVisualStyleBackColor = true;
     139      //
     140      // resultsDockPanel
     141      //
     142      this.resultsDockPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     143            | System.Windows.Forms.AnchorStyles.Left)
     144            | System.Windows.Forms.AnchorStyles.Right)));
     145      this.resultsDockPanel.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingWindow;
     146      this.resultsDockPanel.Location = new System.Drawing.Point(3, 29);
     147      this.resultsDockPanel.Name = "resultsDockPanel";
     148      this.resultsDockPanel.Size = new System.Drawing.Size(835, 422);
     149      dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
     150      dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
     151      autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
     152      tabGradient1.EndColor = System.Drawing.SystemColors.Control;
     153      tabGradient1.StartColor = System.Drawing.SystemColors.Control;
     154      tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
     155      autoHideStripSkin1.TabGradient = tabGradient1;
     156      autoHideStripSkin1.TextFont = new System.Drawing.Font("Segoe UI", 9F);
     157      dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
     158      tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
     159      tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
     160      tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
     161      dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
     162      dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
     163      dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
     164      dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
     165      tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
     166      tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
     167      tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
     168      dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
     169      dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
     170      dockPaneStripSkin1.TextFont = new System.Drawing.Font("Segoe UI", 9F);
     171      tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
     172      tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
     173      tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
     174      tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
     175      dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
     176      tabGradient5.EndColor = System.Drawing.SystemColors.Control;
     177      tabGradient5.StartColor = System.Drawing.SystemColors.Control;
     178      tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
     179      dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
     180      dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
     181      dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
     182      dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
     183      tabGradient6.EndColor = System.Drawing.SystemColors.InactiveCaption;
     184      tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
     185      tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
     186      tabGradient6.TextColor = System.Drawing.SystemColors.InactiveCaptionText;
     187      dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
     188      tabGradient7.EndColor = System.Drawing.Color.Transparent;
     189      tabGradient7.StartColor = System.Drawing.Color.Transparent;
     190      tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
     191      dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
     192      dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
     193      dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
     194      this.resultsDockPanel.Skin = dockPanelSkin1;
     195      this.resultsDockPanel.TabIndex = 0;
     196      //
     197      // runsTabPage
     198      //
     199      this.runsTabPage.Controls.Add(this.runsView);
     200      this.runsTabPage.Location = new System.Drawing.Point(4, 22);
     201      this.runsTabPage.Name = "runsTabPage";
     202      this.runsTabPage.Padding = new System.Windows.Forms.Padding(3);
     203      this.runsTabPage.Size = new System.Drawing.Size(841, 454);
     204      this.runsTabPage.TabIndex = 4;
     205      this.runsTabPage.Text = "Runs";
     206      this.runsTabPage.UseVisualStyleBackColor = true;
     207      //
     208      // runsView
     209      //
     210      this.runsView.Caption = "RunCollection View";
     211      this.runsView.Content = null;
     212      this.runsView.Dock = System.Windows.Forms.DockStyle.Fill;
     213      this.runsView.Location = new System.Drawing.Point(3, 3);
     214      this.runsView.Name = "runsView";
     215      this.runsView.ReadOnly = false;
     216      this.runsView.Size = new System.Drawing.Size(835, 448);
     217      this.runsView.TabIndex = 0;
    120218      //
    121219      // solutionSeedingTabPage
     
    216314      this.algorithmSuggestionLabel.Text = "Suggested Solvers:";
    217315      //
    218       // maxEvaluationsTextBox
    219       //
    220       this.maxEvaluationsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    221             | System.Windows.Forms.AnchorStyles.Right)));
    222       this.maxEvaluationsTextBox.Location = new System.Drawing.Point(108, 3);
    223       this.maxEvaluationsTextBox.Name = "maxEvaluationsTextBox";
    224       this.maxEvaluationsTextBox.Size = new System.Drawing.Size(741, 20);
    225       this.maxEvaluationsTextBox.TabIndex = 14;
    226       this.maxEvaluationsTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.MaxEvaluationsTextBoxOnValidating);
    227       //
    228316      // suggestedInstancesComboBox
    229317      //
     
    249337      this.algorithmCloneButton.Click += new System.EventHandler(this.AlgorithmCloneButtonOnClick);
    250338      //
    251       // runsTabPage
    252       //
    253       this.runsTabPage.Controls.Add(this.runsView);
    254       this.runsTabPage.Location = new System.Drawing.Point(4, 22);
    255       this.runsTabPage.Name = "runsTabPage";
    256       this.runsTabPage.Padding = new System.Windows.Forms.Padding(3);
    257       this.runsTabPage.Size = new System.Drawing.Size(841, 454);
    258       this.runsTabPage.TabIndex = 4;
    259       this.runsTabPage.Text = "Runs";
    260       this.runsTabPage.UseVisualStyleBackColor = true;
    261       //
    262       // runsView
    263       //
    264       this.runsView.Caption = "RunCollection View";
    265       this.runsView.Content = null;
    266       this.runsView.Dock = System.Windows.Forms.DockStyle.Fill;
    267       this.runsView.Location = new System.Drawing.Point(3, 3);
    268       this.runsView.Name = "runsView";
    269       this.runsView.ReadOnly = false;
    270       this.runsView.Size = new System.Drawing.Size(835, 448);
    271       this.runsView.TabIndex = 0;
     339      // maxEvaluationsView
     340      //
     341      this.maxEvaluationsView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     342            | System.Windows.Forms.AnchorStyles.Right)));
     343      this.maxEvaluationsView.Caption = "StringConvertibleValue View";
     344      this.maxEvaluationsView.Content = null;
     345      this.maxEvaluationsView.LabelVisible = false;
     346      this.maxEvaluationsView.Location = new System.Drawing.Point(91, 3);
     347      this.maxEvaluationsView.Name = "maxEvaluationsView";
     348      this.maxEvaluationsView.ReadOnly = false;
     349      this.maxEvaluationsView.Size = new System.Drawing.Size(758, 21);
     350      this.maxEvaluationsView.TabIndex = 16;
     351      //
     352      // seededRunsTabPage
     353      //
     354      this.seededRunsTabPage.Controls.Add(this.seededRunsView);
     355      this.seededRunsTabPage.Location = new System.Drawing.Point(4, 22);
     356      this.seededRunsTabPage.Name = "seededRunsTabPage";
     357      this.seededRunsTabPage.Padding = new System.Windows.Forms.Padding(3);
     358      this.seededRunsTabPage.Size = new System.Drawing.Size(841, 454);
     359      this.seededRunsTabPage.TabIndex = 5;
     360      this.seededRunsTabPage.Text = "Seeded Runs";
     361      this.seededRunsTabPage.UseVisualStyleBackColor = true;
     362      //
     363      // seededRunsView
     364      //
     365      this.seededRunsView.Caption = "RunCollection View";
     366      this.seededRunsView.Content = null;
     367      this.seededRunsView.Dock = System.Windows.Forms.DockStyle.Fill;
     368      this.seededRunsView.Location = new System.Drawing.Point(3, 3);
     369      this.seededRunsView.Name = "seededRunsView";
     370      this.seededRunsView.ReadOnly = false;
     371      this.seededRunsView.Size = new System.Drawing.Size(835, 448);
     372      this.seededRunsView.TabIndex = 1;
    272373      //
    273374      // SolverView
     
    275376      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    276377      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     378      this.Controls.Add(this.maxEvaluationsView);
    277379      this.Controls.Add(this.algorithmCloneButton);
    278380      this.Controls.Add(this.seedingStrategyPanel);
     
    282384      this.Controls.Add(this.evaluationsLimitabel);
    283385      this.Controls.Add(this.algorithmSuggestionLabel);
    284       this.Controls.Add(this.maxEvaluationsTextBox);
    285386      this.Controls.Add(this.suggestedInstancesComboBox);
    286387      this.Name = "SolverView";
     
    288389      this.solverTabControl.ResumeLayout(false);
    289390      this.resultsTabPage.ResumeLayout(false);
     391      this.resultsTabPage.PerformLayout();
     392      this.runsTabPage.ResumeLayout(false);
    290393      this.parametersTabPage.ResumeLayout(false);
    291394      this.operatorGraphTabPage.ResumeLayout(false);
    292       this.runsTabPage.ResumeLayout(false);
     395      this.seededRunsTabPage.ResumeLayout(false);
    293396      this.ResumeLayout(false);
    294397      this.PerformLayout();
     
    301404    private MainForm.WindowsForms.DragOverTabControl solverTabControl;
    302405    private System.Windows.Forms.TabPage resultsTabPage;
    303     private Optimization.Views.ResultCollectionView solverResultsView;
    304406    private System.Windows.Forms.TabPage solutionSeedingTabPage;
    305407    private System.Windows.Forms.TabPage parametersTabPage;
     
    311413    private System.Windows.Forms.Label evaluationsLimitabel;
    312414    private System.Windows.Forms.Label algorithmSuggestionLabel;
    313     private System.Windows.Forms.TextBox maxEvaluationsTextBox;
    314415    private System.Windows.Forms.ComboBox suggestedInstancesComboBox;
    315416    private System.Windows.Forms.Button algorithmCloneButton;
    316417    private System.Windows.Forms.TabPage runsTabPage;
    317418    private Optimization.Views.RunCollectionView runsView;
     419    private Data.Views.StringConvertibleValueView maxEvaluationsView;
     420    private WeifenLuo.WinFormsUI.Docking.DockPanel resultsDockPanel;
     421    private System.Windows.Forms.CheckBox showOnlyFinalResultCheckBox;
     422    private System.Windows.Forms.TabPage seededRunsTabPage;
     423    private Optimization.Views.RunCollectionView seededRunsView;
    318424  }
    319425}
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.cs

    r13721 r13722  
    2828using HeuristicLab.OptimizationExpertSystem.Common;
    2929using System;
    30 using System.ComponentModel;
    3130using System.Windows.Forms;
    3231
    3332namespace HeuristicLab.OptimizationExpertSystem {
    3433  [View("Solver View")]
    35   [Content(typeof(ExpertSystem), IsDefaultView = false)]
    36   public partial class SolverView : ExpertSystemViewBase {
     34  [Content(typeof(KnowledgeCenter), IsDefaultView = false)]
     35  public partial class SolverView : KnowledgeCenterViewBase {
    3736    private EnumValueView<SeedingStrategyTypes> seedingStrategyView;
    3837    private CheckedItemListView<IScope> seedingSolutionsView;
     
    6059      try {
    6160        if (Content == null) {
    62           maxEvaluationsTextBox.Text = string.Empty;
     61          maxEvaluationsView.Content = null;
    6362          solverParametersView.Content = null;
    64           solverResultsView.Content = null;
    6563          runsView.Content = null;
     64          seededRunsView.Content = null;
    6665          seedingStrategyView.Content = null;
    6766          seedingSolutionsView.Content = null;
    6867        } else {
    69           maxEvaluationsTextBox.Text = Content.MaximumEvaluations.ToString();
    70           runsView.Content = Content.Runs;
    71           solverResultsView.Content = Content.CurrentResult;
     68          maxEvaluationsView.Content = Content.MaximumEvaluations;
     69          runsView.Content = Content.InstanceRuns;
     70          seededRunsView.Content = Content.SeededRuns;
    7271          seedingStrategyView.Content = Content.SeedingStrategy;
    7372          seedingSolutionsView.Content = Content.SolutionSeedingPool;
     
    7978    protected override void SetEnabledStateOfControls() {
    8079      base.SetEnabledStateOfControls();
    81       maxEvaluationsTextBox.Enabled = Content != null && !ReadOnly && !Locked;
    8280      suggestedInstancesComboBox.Enabled = Content != null && !ReadOnly && !Locked;
    8381      algorithmStartButton.Enabled = Content != null && !ReadOnly && !Locked && suggestedInstancesComboBox.SelectedIndex >= 0;
     
    8684    }
    8785
    88     protected override void OnPropertyChanged(string propertyName) {
    89       base.OnPropertyChanged(propertyName);
    90       SuppressEvents = true;
    91       try {
    92         switch (propertyName) {
    93           case "MaximumEvaluations": maxEvaluationsTextBox.Text = Content.MaximumEvaluations.ToString(); break;
    94           case "CurrentResult": solverResultsView.Content = Content.CurrentResult; break;
    95         }
    96       } finally { SuppressEvents = false; }
    97       SetEnabledStateOfControls();
     86    protected override void OnAlgorithmInstanceStarted(IAlgorithm algorithm) {
     87      base.OnAlgorithmInstanceStarted(algorithm);
     88      var form = new AlgorithmControlForm(algorithm, showOnlyFinalResultCheckBox.Checked);
     89      form.Show(resultsDockPanel);
    9890    }
    9991
     
    116108      if (prevNewIndex >= 0) {
    117109        suggestedInstancesComboBox.SelectedIndex = prevNewIndex;
    118       }
    119     }
    120 
    121     private void MaxEvaluationsTextBoxOnValidating(object sender, CancelEventArgs e) {
    122       if (SuppressEvents) return;
    123       if (InvokeRequired) {
    124         Invoke((Action<object, CancelEventArgs>)MaxEvaluationsTextBoxOnValidating, sender, e);
    125         return;
    126       }
    127       int value;
    128       if (!int.TryParse(maxEvaluationsTextBox.Text, out value)) {
    129         e.Cancel = !maxEvaluationsTextBox.ReadOnly && maxEvaluationsTextBox.Enabled;
    130         //errorProvider.SetError(maxEvaluationsTextBox, "Please enter a valid integer number.");
    131       } else {
    132         Content.MaximumEvaluations = value;
    133         e.Cancel = false;
    134         //errorProvider.SetError(maxEvaluationsTextBox, null);
    135110      }
    136111    }
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.cs

    r13721 r13722  
    3030namespace HeuristicLab.OptimizationExpertSystem {
    3131  [View("Understanding Problem Instance")]
    32   [Content(typeof(ExpertSystem), IsDefaultView = false)]
    33   public partial class UnderstandingProblemInstanceView : ExpertSystemViewBase {
     32  [Content(typeof(KnowledgeCenter), IsDefaultView = false)]
     33  public partial class UnderstandingProblemInstanceView : KnowledgeCenterViewBase {
    3434    public UnderstandingProblemInstanceView() {
    3535      InitializeComponent();
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingSolutionsView.Designer.cs

    r13721 r13722  
    6666      this.solutionsNetworkTabPage = new System.Windows.Forms.TabPage();
    6767      this.solutionsNetworkChart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
     68      this.pearsonsRSquaredLabel = new System.Windows.Forms.Label();
     69      this.fdcPearsonLabel = new System.Windows.Forms.Label();
     70      this.spearmansRankLabel = new System.Windows.Forms.Label();
     71      this.fdcSpearmanLabel = new System.Windows.Forms.Label();
    6872      this.solutionsTabControl.SuspendLayout();
    6973      this.solutionsQualityTabPage.SuspendLayout();
     
    209213      // solutionsFdcTabPage
    210214      //
     215      this.solutionsFdcTabPage.Controls.Add(this.fdcSpearmanLabel);
     216      this.solutionsFdcTabPage.Controls.Add(this.fdcPearsonLabel);
     217      this.solutionsFdcTabPage.Controls.Add(this.spearmansRankLabel);
     218      this.solutionsFdcTabPage.Controls.Add(this.pearsonsRSquaredLabel);
    211219      this.solutionsFdcTabPage.Controls.Add(this.fdcBetweenBestCheckBox);
    212220      this.solutionsFdcTabPage.Controls.Add(this.solutionsFdcViewHost);
     
    301309      this.solutionsNetworkChart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SolutionsNetworkChartOnMouseDoubleClick);
    302310      //
    303       // UnderstandingSolutions
     311      // pearsonsRSquaredLabel
     312      //
     313      this.pearsonsRSquaredLabel.AutoSize = true;
     314      this.pearsonsRSquaredLabel.Location = new System.Drawing.Point(436, 7);
     315      this.pearsonsRSquaredLabel.Name = "pearsonsRSquaredLabel";
     316      this.pearsonsRSquaredLabel.Size = new System.Drawing.Size(65, 13);
     317      this.pearsonsRSquaredLabel.TabIndex = 3;
     318      this.pearsonsRSquaredLabel.Text = "Pearson\'s r²:";
     319      //
     320      // fdcPearsonLabel
     321      //
     322      this.fdcPearsonLabel.AutoSize = true;
     323      this.fdcPearsonLabel.Location = new System.Drawing.Point(512, 7);
     324      this.fdcPearsonLabel.Name = "fdcPearsonLabel";
     325      this.fdcPearsonLabel.Size = new System.Drawing.Size(10, 13);
     326      this.fdcPearsonLabel.TabIndex = 4;
     327      this.fdcPearsonLabel.Text = "-";
     328      //
     329      // spearmansRankLabel
     330      //
     331      this.spearmansRankLabel.AutoSize = true;
     332      this.spearmansRankLabel.Location = new System.Drawing.Point(281, 7);
     333      this.spearmansRankLabel.Name = "spearmansRankLabel";
     334      this.spearmansRankLabel.Size = new System.Drawing.Size(74, 13);
     335      this.spearmansRankLabel.TabIndex = 3;
     336      this.spearmansRankLabel.Text = "Spearman\'s ρ:";
     337      //
     338      // fdcSpearmanLabel
     339      //
     340      this.fdcSpearmanLabel.AutoSize = true;
     341      this.fdcSpearmanLabel.Location = new System.Drawing.Point(357, 7);
     342      this.fdcSpearmanLabel.Name = "fdcSpearmanLabel";
     343      this.fdcSpearmanLabel.Size = new System.Drawing.Size(10, 13);
     344      this.fdcSpearmanLabel.TabIndex = 4;
     345      this.fdcSpearmanLabel.Text = "-";
     346      //
     347      // UnderstandingSolutionsView
    304348      //
    305349      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    310354      this.Controls.Add(this.similarityComboBox);
    311355      this.Controls.Add(this.solutionsTabControl);
    312       this.Name = "UnderstandingSolutions";
     356      this.Name = "UnderstandingSolutionsView";
    313357      this.Size = new System.Drawing.Size(732, 505);
    314358      this.solutionsTabControl.ResumeLayout(false);
     
    343387    private System.Windows.Forms.TabPage solutionsNetworkTabPage;
    344388    private Visualization.ChartControlsExtensions.EnhancedChart solutionsNetworkChart;
     389    private System.Windows.Forms.Label fdcPearsonLabel;
     390    private System.Windows.Forms.Label pearsonsRSquaredLabel;
     391    private System.Windows.Forms.Label fdcSpearmanLabel;
     392    private System.Windows.Forms.Label spearmansRankLabel;
    345393  }
    346394}
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingSolutionsView.cs

    r13721 r13722  
    3636namespace HeuristicLab.OptimizationExpertSystem {
    3737  [View("Understanding Solutions")]
    38   [Content(typeof(ExpertSystem), IsDefaultView = false)]
    39   public partial class UnderstandingSolutionsView : ExpertSystemViewBase {
     38  [Content(typeof(KnowledgeCenter), IsDefaultView = false)]
     39  public partial class UnderstandingSolutionsView : KnowledgeCenterViewBase {
    4040    protected virtual bool SuppressEvents { get; set; }
    4141
     
    143143      try {
    144144        solutionsFdcViewHost.Content = null;
     145        fdcSpearmanLabel.Text = "-";
     146        fdcPearsonLabel.Text = "-";
    145147        var solutionScopes = GetSolutionScopes();
    146148        var points = new List<Point2D<double>>();
     
    166168          }
    167169        }
     170        var xs = points.Select(p => p.X).ToArray();
     171        var ys = points.Select(p => p.Y).ToArray();
     172        var scorr = alglib.spearmancorr2(xs, ys);
     173        var pcorr = alglib.pearsoncorr2(xs, ys);
     174        pcorr = pcorr * pcorr;
     175        fdcSpearmanLabel.Text = scorr.ToString("F2");
     176        fdcPearsonLabel.Text = pcorr.ToString("F2");
     177
    168178        var splot = new ScatterPlot("Fitness-Distance", "");
    169179        splot.VisualProperties.XAxisTitle = "Absolute Fitness Difference";
     180        splot.VisualProperties.XAxisMinimumAuto = false;
    170181        splot.VisualProperties.XAxisMinimumFixedValue = 0.0;
    171         splot.VisualProperties.XAxisMinimumAuto = false;
    172182        splot.VisualProperties.YAxisTitle = "Solution Distance";
     183        splot.VisualProperties.YAxisMinimumAuto = false;
    173184        splot.VisualProperties.YAxisMinimumFixedValue = 0.0;
    174         splot.VisualProperties.YAxisMinimumAuto = false;
     185        splot.VisualProperties.YAxisMaximumAuto = false;
    175186        splot.VisualProperties.YAxisMaximumFixedValue = 1.0;
    176         splot.VisualProperties.YAxisMaximumAuto = false;
    177187        var row = new ScatterPlotDataRow("Fdc", "", points);
    178         row.VisualProperties.PointSize = 7;
     188        row.VisualProperties.PointSize = 10;
     189        row.VisualProperties.ShowRegressionLine = true;
    179190        splot.Rows.Add(row);
    180191        solutionsFdcViewHost.Content = splot;
Note: See TracChangeset for help on using the changeset viewer.