- Timestamp:
- 04/24/16 10:03:52 (8 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3
- Files:
-
- 3 added
- 6 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/HeuristicLab.OptimizationExpertSystem-3.3.csproj
r13748 r13787 191 191 <DependentUpon>AlgorithmControlForm.cs</DependentUpon> 192 192 </Compile> 193 <Compile Include="Menu\200_Solving\210_PerformanceModelingMenuItem.cs" /> 193 194 <Compile Include="Toolbar\DownloadFromOKBToolbarItem.cs" /> 194 195 <Compile Include="Toolbar\ToolbarItemBase.cs" /> … … 209 210 <Compile Include="Menu\0_Config\30_DownloadFromOkbMenuItem.cs" /> 210 211 <Compile Include="Menu\0_Config\10_SetCredentialsMenuItem.cs" /> 211 <Compile Include="Menu\200_Solving\2 10_SolverMenuItem.cs" />212 <Compile Include="Menu\200_Solving\220_SolverMenuItem.cs" /> 212 213 <Compile Include="Menu\300_Learning\310_KnowledgeBaseMenuItem.cs" /> 213 214 <Compile Include="Menu\900_Tools\900_CSharpScriptMenuItem.cs" /> … … 227 228 </Compile> 228 229 <Compile Include="Plugin.cs" /> 230 <Compile Include="Views\PerformanceModelingView.cs"> 231 <SubType>UserControl</SubType> 232 </Compile> 233 <Compile Include="Views\PerformanceModelingView.Designer.cs"> 234 <DependentUpon>PerformanceModelingView.cs</DependentUpon> 235 </Compile> 229 236 <Compile Include="Views\SolverView.cs"> 230 237 <SubType>UserControl</SubType> … … 297 304 <EmbeddedResource Include="OptimizationKnowledgeCenter.resx"> 298 305 <DependentUpon>OptimizationKnowledgeCenter.cs</DependentUpon> 306 </EmbeddedResource> 307 <EmbeddedResource Include="Views\PerformanceModelingView.resx"> 308 <DependentUpon>PerformanceModelingView.cs</DependentUpon> 299 309 </EmbeddedResource> 300 310 <EmbeddedResource Include="Views\SolverView.resx"> -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/200_Solving/210_PerformanceModelingMenuItem.cs
r13772 r13787 27 27 28 28 namespace HeuristicLab.OptimizationExpertSystem.Menu { 29 internal class SolverMenuItem : MenuItemBase {29 internal class PerformanceModelingMenuItem : MenuItemBase { 30 30 public override Image Image { get { return VSImageLibrary.Event; } } 31 31 32 32 public override string Name { 33 get { return " Solver"; }33 get { return "Performance Modeling"; } 34 34 } 35 35 … … 42 42 } 43 43 44 public override string ToolTipText { get { return " Solve the problem instance."; } }44 public override string ToolTipText { get { return "Modeling algorithm performance to suggest well-suited instances."; } } 45 45 46 46 public override void Execute() { 47 var viewType = typeof( SolverView);47 var viewType = typeof(PerformanceModelingView); 48 48 var view = MainForm.Views.FirstOrDefault(x => viewType == ((x is ViewHost) ? ((ViewHost)x).ActiveView : x).GetType()); 49 49 if (view != null) view.Show(); -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/200_Solving/220_SolverMenuItem.cs
r13786 r13787 39 39 40 40 public override int Position { 41 get { return 2 10; }41 get { return 220; } 42 42 } 43 43 -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.cs
r13774 r13787 48 48 Content.DownloadStarted += ContentOnDownloadStarted; 49 49 Content.AlgorithmInstanceStarted += ContentOnAlgorithmInstanceStarted; 50 Content.RecommendationModelChanged += ContentOnRecommendationModelChanged; 50 51 RegisterContentProblemEvents(); 51 52 RegisterContentProblemInstancesEvents(); 52 RegisterContentProblemCharacteristicsEvents();53 53 RegisterContentSolutionSeedingPoolEvents(); 54 54 RegisterContentSuggestedInstancesEvents(); … … 71 71 } 72 72 73 private void RegisterContentProblemCharacteristicsEvents() {74 Content.ProblemCharacteristics.ItemsAdded += ContentOnProblemCharacteristicsChanged;75 Content.ProblemCharacteristics.ItemsReplaced += ContentOnProblemCharacteristicsChanged;76 Content.ProblemCharacteristics.ItemsRemoved += ContentOnProblemCharacteristicsChanged;77 Content.ProblemCharacteristics.CheckedItemsChanged += ContentOnProblemCharacteristicsChanged;78 Content.ProblemCharacteristics.CollectionReset += ContentOnProblemCharacteristicsChanged;79 }80 81 73 private void RegisterContentSolutionSeedingPoolEvents() { 82 74 Content.SolutionSeedingPool.CheckedItemsChanged += ContentOnSolutionSeedingPoolChanged; … … 88 80 89 81 private void RegisterContentSuggestedInstancesEvents() { 90 Content.AlgorithmInstances.CollectionReset += ContentOn SuggestedInstancesChanged;91 Content.AlgorithmInstances.ItemsAdded += ContentOn SuggestedInstancesChanged;92 Content.AlgorithmInstances.ItemsMoved += ContentOn SuggestedInstancesChanged;93 Content.AlgorithmInstances.ItemsRemoved += ContentOn SuggestedInstancesChanged;94 Content.AlgorithmInstances.ItemsReplaced += ContentOn SuggestedInstancesChanged;82 Content.AlgorithmInstances.CollectionReset += ContentOnAlgorithmInstancesChanged; 83 Content.AlgorithmInstances.ItemsAdded += ContentOnAlgorithmInstancesChanged; 84 Content.AlgorithmInstances.ItemsMoved += ContentOnAlgorithmInstancesChanged; 85 Content.AlgorithmInstances.ItemsRemoved += ContentOnAlgorithmInstancesChanged; 86 Content.AlgorithmInstances.ItemsReplaced += ContentOnAlgorithmInstancesChanged; 95 87 } 96 88 … … 99 91 Content.DownloadStarted -= ContentOnDownloadStarted; 100 92 Content.AlgorithmInstanceStarted -= ContentOnAlgorithmInstanceStarted; 93 Content.RecommendationModelChanged -= ContentOnRecommendationModelChanged; 101 94 DeregisterContentProblemEvents(); 102 95 DeregisterContentProblemInstancesEvents(); 103 DeregisterContentProblemCharacteristicsEvents();104 96 DeregisterContentSolutionSeedingPoolEvents(); 105 97 DeregisterContentSuggestedInstancesEvents(); … … 122 114 } 123 115 124 private void DeregisterContentProblemCharacteristicsEvents() {125 Content.ProblemCharacteristics.ItemsAdded -= ContentOnProblemCharacteristicsChanged;126 Content.ProblemCharacteristics.ItemsReplaced -= ContentOnProblemCharacteristicsChanged;127 Content.ProblemCharacteristics.ItemsRemoved -= ContentOnProblemCharacteristicsChanged;128 Content.ProblemCharacteristics.CheckedItemsChanged -= ContentOnProblemCharacteristicsChanged;129 Content.ProblemCharacteristics.CollectionReset -= ContentOnProblemCharacteristicsChanged;130 }131 132 116 private void DeregisterContentSolutionSeedingPoolEvents() { 133 117 Content.SolutionSeedingPool.CheckedItemsChanged -= ContentOnSolutionSeedingPoolChanged; … … 139 123 140 124 private void DeregisterContentSuggestedInstancesEvents() { 141 Content.AlgorithmInstances.CollectionReset -= ContentOn SuggestedInstancesChanged;142 Content.AlgorithmInstances.ItemsAdded -= ContentOn SuggestedInstancesChanged;143 Content.AlgorithmInstances.ItemsMoved -= ContentOn SuggestedInstancesChanged;144 Content.AlgorithmInstances.ItemsRemoved -= ContentOn SuggestedInstancesChanged;145 Content.AlgorithmInstances.ItemsReplaced -= ContentOn SuggestedInstancesChanged;125 Content.AlgorithmInstances.CollectionReset -= ContentOnAlgorithmInstancesChanged; 126 Content.AlgorithmInstances.ItemsAdded -= ContentOnAlgorithmInstancesChanged; 127 Content.AlgorithmInstances.ItemsMoved -= ContentOnAlgorithmInstancesChanged; 128 Content.AlgorithmInstances.ItemsRemoved -= ContentOnAlgorithmInstancesChanged; 129 Content.AlgorithmInstances.ItemsReplaced -= ContentOnAlgorithmInstancesChanged; 146 130 } 147 131 #endregion … … 150 134 protected virtual void OnDownloadEnded() { } 151 135 protected virtual void OnAlgorithmInstanceStarted(IAlgorithm algorithm) { } 136 protected virtual void OnRecommendationModelChanged() { } 152 137 protected virtual void OnPropertyChanged(string propertyName) { } 153 138 protected virtual void OnProblemChanged() { } 154 139 protected virtual void OnProblemSolutionsChanged() { } 155 140 protected virtual void OnProblemInstancesChanged() { } 156 protected virtual void OnProblemCharacteristicsChanged() { }157 141 protected virtual void OnSolutionSeedingPoolChanged() { } 158 protected virtual void On SuggestedInstancesChanged() { }142 protected virtual void OnAlgorithmInstancesChanged() { } 159 143 protected virtual void OnKnowledgeBaseChanged() { } 160 144 … … 170 154 if (InvokeRequired) { Invoke((Action<object, EventArgs<IAlgorithm>>)ContentOnAlgorithmInstanceStarted, sender, e); return; } 171 155 OnAlgorithmInstanceStarted(e.Value); 156 } 157 158 private void ContentOnRecommendationModelChanged(object sender, EventArgs e) { 159 if (InvokeRequired) { Invoke((Action<object, EventArgs<IAlgorithm>>)ContentOnRecommendationModelChanged, sender, e); return; } 160 OnRecommendationModelChanged(); 172 161 } 173 162 … … 194 183 } 195 184 196 private void ContentOnProblemCharacteristicsChanged(object sender, EventArgs e) {197 if (InvokeRequired) Invoke((Action)OnProblemCharacteristicsChanged);198 else OnProblemCharacteristicsChanged();199 }200 201 185 private void ContentOnSolutionSeedingPoolChanged(object sender, EventArgs e) { 202 186 if (InvokeRequired) Invoke((Action)OnSolutionSeedingPoolChanged); … … 204 188 } 205 189 206 private void ContentOn SuggestedInstancesChanged(object sender, EventArgs e) {207 if (InvokeRequired) Invoke((Action)On SuggestedInstancesChanged);208 else On SuggestedInstancesChanged();190 private void ContentOnAlgorithmInstancesChanged(object sender, EventArgs e) { 191 if (InvokeRequired) Invoke((Action)OnAlgorithmInstancesChanged); 192 else OnAlgorithmInstancesChanged(); 209 193 } 210 194 #endregion -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.Designer.cs
r13774 r13787 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin 2= new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();48 WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin 2= new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();49 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient 4= new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();50 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 8= new WeifenLuo.WinFormsUI.Docking.TabGradient();51 WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin 2= new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();52 WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient 2= new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();53 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 9= new WeifenLuo.WinFormsUI.Docking.TabGradient();54 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient 5= new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();55 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 10= new WeifenLuo.WinFormsUI.Docking.TabGradient();56 WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient 2= new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();57 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 11= new WeifenLuo.WinFormsUI.Docking.TabGradient();58 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 12= new WeifenLuo.WinFormsUI.Docking.TabGradient();59 WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient 6= new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();60 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 13= new WeifenLuo.WinFormsUI.Docking.TabGradient();61 WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient 14= new WeifenLuo.WinFormsUI.Docking.TabGradient();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 62 this.minTargetView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 63 63 this.maxEvaluationsView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 64 64 this.algorithmCloneButton = new System.Windows.Forms.Button(); 65 65 this.seedingStrategyPanel = new System.Windows.Forms.Panel(); 66 this.algorithmStartButton = new System.Windows.Forms.Button(); 67 this.minimumTargetLabel = new System.Windows.Forms.Label(); 68 this.seedingStrategyLabel = new System.Windows.Forms.Label(); 69 this.evaluationsLimitabel = new System.Windows.Forms.Label(); 70 this.suggestedInstancesComboBox = new System.Windows.Forms.ComboBox(); 71 this.instanceLabel = new System.Windows.Forms.Label(); 66 72 this.solverTabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl(); 67 73 this.resultsTabPage = new System.Windows.Forms.TabPage(); … … 77 83 this.operatorGraphTabPage = new System.Windows.Forms.TabPage(); 78 84 this.operatorGraphViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 79 this.algorithmStartButton = new System.Windows.Forms.Button();80 this.minimumTargetLabel = new System.Windows.Forms.Label();81 this.seedingStrategyLabel = new System.Windows.Forms.Label();82 this.evaluationsLimitabel = new System.Windows.Forms.Label();83 this.recommenderLabel = new System.Windows.Forms.Label();84 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();90 85 this.solverTabControl.SuspendLayout(); 91 86 this.resultsTabPage.SuspendLayout(); … … 94 89 this.parametersTabPage.SuspendLayout(); 95 90 this.operatorGraphTabPage.SuspendLayout(); 96 ((System.ComponentModel.ISupportInitialize)(this.solverSplitContainer)).BeginInit();97 this.solverSplitContainer.Panel1.SuspendLayout();98 this.solverSplitContainer.Panel2.SuspendLayout();99 this.solverSplitContainer.SuspendLayout();100 91 this.SuspendLayout(); 101 92 // … … 124 115 // algorithmCloneButton 125 116 // 126 this.algorithmCloneButton.Location = new System.Drawing.Point( 123, 60);117 this.algorithmCloneButton.Location = new System.Drawing.Point(518, 56); 127 118 this.algorithmCloneButton.Name = "algorithmCloneButton"; 128 119 this.algorithmCloneButton.Size = new System.Drawing.Size(26, 23); 129 120 this.algorithmCloneButton.TabIndex = 15; 130 this.algorithmCloneButton.Text = " Clone";121 this.algorithmCloneButton.Text = "c"; 131 122 this.algorithmCloneButton.UseVisualStyleBackColor = true; 132 123 this.algorithmCloneButton.Click += new System.EventHandler(this.AlgorithmCloneButtonOnClick); … … 141 132 this.seedingStrategyPanel.TabIndex = 12; 142 133 // 134 // algorithmStartButton 135 // 136 this.algorithmStartButton.Location = new System.Drawing.Point(486, 56); 137 this.algorithmStartButton.Name = "algorithmStartButton"; 138 this.algorithmStartButton.Size = new System.Drawing.Size(26, 23); 139 this.algorithmStartButton.TabIndex = 10; 140 this.algorithmStartButton.Text = "Start"; 141 this.algorithmStartButton.UseVisualStyleBackColor = true; 142 this.algorithmStartButton.Click += new System.EventHandler(this.AlgorithmStartButtonOnClick); 143 // 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 // 153 // seedingStrategyLabel 154 // 155 this.seedingStrategyLabel.AutoSize = true; 156 this.seedingStrategyLabel.Location = new System.Drawing.Point(3, 33); 157 this.seedingStrategyLabel.Name = "seedingStrategyLabel"; 158 this.seedingStrategyLabel.Size = new System.Drawing.Size(91, 13); 159 this.seedingStrategyLabel.TabIndex = 8; 160 this.seedingStrategyLabel.Text = "Seeding Strategy:"; 161 // 162 // evaluationsLimitabel 163 // 164 this.evaluationsLimitabel.AutoSize = true; 165 this.evaluationsLimitabel.Location = new System.Drawing.Point(3, 6); 166 this.evaluationsLimitabel.Name = "evaluationsLimitabel"; 167 this.evaluationsLimitabel.Size = new System.Drawing.Size(66, 13); 168 this.evaluationsLimitabel.TabIndex = 13; 169 this.evaluationsLimitabel.Text = "Budget (FE):"; 170 // 171 // suggestedInstancesComboBox 172 // 173 this.suggestedInstancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 174 this.suggestedInstancesComboBox.FormattingEnabled = true; 175 this.suggestedInstancesComboBox.Location = new System.Drawing.Point(108, 56); 176 this.suggestedInstancesComboBox.Name = "suggestedInstancesComboBox"; 177 this.suggestedInstancesComboBox.Size = new System.Drawing.Size(372, 21); 178 this.suggestedInstancesComboBox.TabIndex = 7; 179 this.suggestedInstancesComboBox.SelectedIndexChanged += new System.EventHandler(this.SuggestedInstancesComboBoxOnSelectedIndexChanged); 180 // 181 // instanceLabel 182 // 183 this.instanceLabel.AutoSize = true; 184 this.instanceLabel.Location = new System.Drawing.Point(3, 59); 185 this.instanceLabel.Name = "instanceLabel"; 186 this.instanceLabel.Size = new System.Drawing.Size(51, 13); 187 this.instanceLabel.TabIndex = 9; 188 this.instanceLabel.Text = "Instance:"; 189 // 143 190 // solverTabControl 144 191 // 145 this.solverTabControl.AllowDrop = true; 192 this.solverTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 193 | System.Windows.Forms.AnchorStyles.Left) 194 | System.Windows.Forms.AnchorStyles.Right))); 146 195 this.solverTabControl.Controls.Add(this.resultsTabPage); 147 196 this.solverTabControl.Controls.Add(this.runsTabPage); … … 150 199 this.solverTabControl.Controls.Add(this.parametersTabPage); 151 200 this.solverTabControl.Controls.Add(this.operatorGraphTabPage); 152 this.solverTabControl.Dock = System.Windows.Forms.DockStyle.Fill; 153 this.solverTabControl.Location = new System.Drawing.Point(3, 3); 201 this.solverTabControl.Location = new System.Drawing.Point(6, 85); 154 202 this.solverTabControl.Name = "solverTabControl"; 155 203 this.solverTabControl.SelectedIndex = 0; 156 this.solverTabControl.Size = new System.Drawing.Size( 556, 502);157 this.solverTabControl.TabIndex = 1 1;204 this.solverTabControl.Size = new System.Drawing.Size(843, 479); 205 this.solverTabControl.TabIndex = 17; 158 206 // 159 207 // resultsTabPage … … 164 212 this.resultsTabPage.Name = "resultsTabPage"; 165 213 this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3); 166 this.resultsTabPage.Size = new System.Drawing.Size( 548, 476);214 this.resultsTabPage.Size = new System.Drawing.Size(835, 453); 167 215 this.resultsTabPage.TabIndex = 2; 168 216 this.resultsTabPage.Text = "Results"; … … 189 237 this.resultsDockPanel.Location = new System.Drawing.Point(3, 29); 190 238 this.resultsDockPanel.Name = "resultsDockPanel"; 191 this.resultsDockPanel.Size = new System.Drawing.Size( 542, 444);192 dockPanelGradient 4.EndColor = System.Drawing.SystemColors.ControlLight;193 dockPanelGradient 4.StartColor = System.Drawing.SystemColors.ControlLight;194 autoHideStripSkin 2.DockStripGradient = dockPanelGradient4;195 tabGradient 8.EndColor = System.Drawing.SystemColors.Control;196 tabGradient 8.StartColor = System.Drawing.SystemColors.Control;197 tabGradient 8.TextColor = System.Drawing.SystemColors.ControlDarkDark;198 autoHideStripSkin 2.TabGradient = tabGradient8;199 autoHideStripSkin 2.TextFont = new System.Drawing.Font("Segoe UI", 9F);200 dockPanelSkin 2.AutoHideStripSkin = autoHideStripSkin2;201 tabGradient 9.EndColor = System.Drawing.SystemColors.ControlLightLight;202 tabGradient 9.StartColor = System.Drawing.SystemColors.ControlLightLight;203 tabGradient 9.TextColor = System.Drawing.SystemColors.ControlText;204 dockPaneStripGradient 2.ActiveTabGradient = tabGradient9;205 dockPanelGradient 5.EndColor = System.Drawing.SystemColors.Control;206 dockPanelGradient 5.StartColor = System.Drawing.SystemColors.Control;207 dockPaneStripGradient 2.DockStripGradient = dockPanelGradient5;208 tabGradient 10.EndColor = System.Drawing.SystemColors.ControlLight;209 tabGradient 10.StartColor = System.Drawing.SystemColors.ControlLight;210 tabGradient 10.TextColor = System.Drawing.SystemColors.ControlText;211 dockPaneStripGradient 2.InactiveTabGradient = tabGradient10;212 dockPaneStripSkin 2.DocumentGradient = dockPaneStripGradient2;213 dockPaneStripSkin 2.TextFont = new System.Drawing.Font("Segoe UI", 9F);214 tabGradient 11.EndColor = System.Drawing.SystemColors.ActiveCaption;215 tabGradient 11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;216 tabGradient 11.StartColor = System.Drawing.SystemColors.GradientActiveCaption;217 tabGradient 11.TextColor = System.Drawing.SystemColors.ActiveCaptionText;218 dockPaneStripToolWindowGradient 2.ActiveCaptionGradient = tabGradient11;219 tabGradient 12.EndColor = System.Drawing.SystemColors.Control;220 tabGradient 12.StartColor = System.Drawing.SystemColors.Control;221 tabGradient 12.TextColor = System.Drawing.SystemColors.ControlText;222 dockPaneStripToolWindowGradient 2.ActiveTabGradient = tabGradient12;223 dockPanelGradient 6.EndColor = System.Drawing.SystemColors.ControlLight;224 dockPanelGradient 6.StartColor = System.Drawing.SystemColors.ControlLight;225 dockPaneStripToolWindowGradient 2.DockStripGradient = dockPanelGradient6;226 tabGradient 13.EndColor = System.Drawing.SystemColors.InactiveCaption;227 tabGradient 13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;228 tabGradient 13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;229 tabGradient 13.TextColor = System.Drawing.SystemColors.InactiveCaptionText;230 dockPaneStripToolWindowGradient 2.InactiveCaptionGradient = tabGradient13;231 tabGradient 14.EndColor = System.Drawing.Color.Transparent;232 tabGradient 14.StartColor = System.Drawing.Color.Transparent;233 tabGradient 14.TextColor = System.Drawing.SystemColors.ControlDarkDark;234 dockPaneStripToolWindowGradient 2.InactiveTabGradient = tabGradient14;235 dockPaneStripSkin 2.ToolWindowGradient = dockPaneStripToolWindowGradient2;236 dockPanelSkin 2.DockPaneStripSkin = dockPaneStripSkin2;237 this.resultsDockPanel.Skin = dockPanelSkin 2;239 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; 238 286 this.resultsDockPanel.TabIndex = 0; 239 287 // … … 244 292 this.runsTabPage.Name = "runsTabPage"; 245 293 this.runsTabPage.Padding = new System.Windows.Forms.Padding(3); 246 this.runsTabPage.Size = new System.Drawing.Size(548, 4 76);294 this.runsTabPage.Size = new System.Drawing.Size(548, 418); 247 295 this.runsTabPage.TabIndex = 4; 248 296 this.runsTabPage.Text = "Runs"; … … 257 305 this.runsView.Name = "runsView"; 258 306 this.runsView.ReadOnly = false; 259 this.runsView.Size = new System.Drawing.Size(542, 4 70);307 this.runsView.Size = new System.Drawing.Size(542, 412); 260 308 this.runsView.TabIndex = 0; 261 309 // … … 266 314 this.seededRunsTabPage.Name = "seededRunsTabPage"; 267 315 this.seededRunsTabPage.Padding = new System.Windows.Forms.Padding(3); 268 this.seededRunsTabPage.Size = new System.Drawing.Size(548, 4 76);316 this.seededRunsTabPage.Size = new System.Drawing.Size(548, 418); 269 317 this.seededRunsTabPage.TabIndex = 5; 270 318 this.seededRunsTabPage.Text = "Seeded Runs"; … … 279 327 this.seededRunsView.Name = "seededRunsView"; 280 328 this.seededRunsView.ReadOnly = false; 281 this.seededRunsView.Size = new System.Drawing.Size(542, 4 70);329 this.seededRunsView.Size = new System.Drawing.Size(542, 412); 282 330 this.seededRunsView.TabIndex = 1; 283 331 // … … 287 335 this.solutionSeedingTabPage.Name = "solutionSeedingTabPage"; 288 336 this.solutionSeedingTabPage.Padding = new System.Windows.Forms.Padding(3); 289 this.solutionSeedingTabPage.Size = new System.Drawing.Size(548, 4 76);337 this.solutionSeedingTabPage.Size = new System.Drawing.Size(548, 418); 290 338 this.solutionSeedingTabPage.TabIndex = 1; 291 339 this.solutionSeedingTabPage.Text = "Seeding Pool"; … … 298 346 this.parametersTabPage.Name = "parametersTabPage"; 299 347 this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3); 300 this.parametersTabPage.Size = new System.Drawing.Size(548, 4 76);348 this.parametersTabPage.Size = new System.Drawing.Size(548, 418); 301 349 this.parametersTabPage.TabIndex = 0; 302 350 this.parametersTabPage.Text = "Parameters"; … … 313 361 this.solverParametersView.ReadOnly = true; 314 362 this.solverParametersView.ShowDetails = true; 315 this.solverParametersView.Size = new System.Drawing.Size(542, 4 70);363 this.solverParametersView.Size = new System.Drawing.Size(542, 412); 316 364 this.solverParametersView.TabIndex = 0; 317 365 // … … 322 370 this.operatorGraphTabPage.Name = "operatorGraphTabPage"; 323 371 this.operatorGraphTabPage.Padding = new System.Windows.Forms.Padding(3); 324 this.operatorGraphTabPage.Size = new System.Drawing.Size(548, 4 76);372 this.operatorGraphTabPage.Size = new System.Drawing.Size(548, 418); 325 373 this.operatorGraphTabPage.TabIndex = 3; 326 374 this.operatorGraphTabPage.Text = "Operator Graph"; … … 336 384 this.operatorGraphViewHost.Name = "operatorGraphViewHost"; 337 385 this.operatorGraphViewHost.ReadOnly = true; 338 this.operatorGraphViewHost.Size = new System.Drawing.Size(542, 4 70);386 this.operatorGraphViewHost.Size = new System.Drawing.Size(542, 412); 339 387 this.operatorGraphViewHost.TabIndex = 0; 340 388 this.operatorGraphViewHost.ViewsLabelVisible = true; 341 389 this.operatorGraphViewHost.ViewType = null; 342 390 // 343 // algorithmStartButton344 //345 this.algorithmStartButton.Location = new System.Drawing.Point(91, 60);346 this.algorithmStartButton.Name = "algorithmStartButton";347 this.algorithmStartButton.Size = new System.Drawing.Size(26, 23);348 this.algorithmStartButton.TabIndex = 10;349 this.algorithmStartButton.Text = "Start";350 this.algorithmStartButton.UseVisualStyleBackColor = true;351 this.algorithmStartButton.Click += new System.EventHandler(this.AlgorithmStartButtonOnClick);352 //353 // minimumTargetLabel354 //355 this.minimumTargetLabel.AutoSize = true;356 this.minimumTargetLabel.Location = new System.Drawing.Point(384, 6);357 this.minimumTargetLabel.Name = "minimumTargetLabel";358 this.minimumTargetLabel.Size = new System.Drawing.Size(41, 13);359 this.minimumTargetLabel.TabIndex = 13;360 this.minimumTargetLabel.Text = "Target:";361 //362 // seedingStrategyLabel363 //364 this.seedingStrategyLabel.AutoSize = true;365 this.seedingStrategyLabel.Location = new System.Drawing.Point(3, 33);366 this.seedingStrategyLabel.Name = "seedingStrategyLabel";367 this.seedingStrategyLabel.Size = new System.Drawing.Size(91, 13);368 this.seedingStrategyLabel.TabIndex = 8;369 this.seedingStrategyLabel.Text = "Seeding Strategy:";370 //371 // evaluationsLimitabel372 //373 this.evaluationsLimitabel.AutoSize = true;374 this.evaluationsLimitabel.Location = new System.Drawing.Point(3, 6);375 this.evaluationsLimitabel.Name = "evaluationsLimitabel";376 this.evaluationsLimitabel.Size = new System.Drawing.Size(66, 13);377 this.evaluationsLimitabel.TabIndex = 13;378 this.evaluationsLimitabel.Text = "Budget (FE):";379 //380 // recommenderLabel381 //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:";388 //389 // suggestedInstancesComboBox390 //391 this.suggestedInstancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)392 | System.Windows.Forms.AnchorStyles.Right)));393 this.suggestedInstancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;394 this.suggestedInstancesComboBox.FormattingEnabled = true;395 this.suggestedInstancesComboBox.Location = new System.Drawing.Point(91, 33);396 this.suggestedInstancesComboBox.Name = "suggestedInstancesComboBox";397 this.suggestedInstancesComboBox.Size = new System.Drawing.Size(186, 21);398 this.suggestedInstancesComboBox.TabIndex = 7;399 this.suggestedInstancesComboBox.SelectedIndexChanged += new System.EventHandler(this.SuggestedInstancesComboBoxOnSelectedIndexChanged);400 //401 // recommenderComboBox402 //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 // solverSplitContainer414 //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.Panel1422 //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.Panel2434 //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 // recommenderViewHost442 //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 // instanceLabel458 //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 // recommendRefreshButton467 //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 //477 391 // SolverView 478 392 // 479 393 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 480 394 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 481 this.Controls.Add(this.solverSplitContainer); 395 this.Controls.Add(this.solverTabControl); 396 this.Controls.Add(this.algorithmCloneButton); 397 this.Controls.Add(this.instanceLabel); 398 this.Controls.Add(this.algorithmStartButton); 482 399 this.Controls.Add(this.minTargetView); 483 400 this.Controls.Add(this.maxEvaluationsView); 401 this.Controls.Add(this.suggestedInstancesComboBox); 484 402 this.Controls.Add(this.seedingStrategyPanel); 485 403 this.Controls.Add(this.minimumTargetLabel); … … 495 413 this.parametersTabPage.ResumeLayout(false); 496 414 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);502 415 this.ResumeLayout(false); 503 416 this.PerformLayout(); … … 508 421 509 422 private System.Windows.Forms.Panel seedingStrategyPanel; 423 private System.Windows.Forms.Button algorithmStartButton; 424 private System.Windows.Forms.Label seedingStrategyLabel; 425 private System.Windows.Forms.Label evaluationsLimitabel; 426 private System.Windows.Forms.ComboBox suggestedInstancesComboBox; 427 private System.Windows.Forms.Button algorithmCloneButton; 428 private Data.Views.StringConvertibleValueView maxEvaluationsView; 429 private System.Windows.Forms.Label minimumTargetLabel; 430 private Data.Views.StringConvertibleValueView minTargetView; 431 private System.Windows.Forms.Label instanceLabel; 510 432 private MainForm.WindowsForms.DragOverTabControl solverTabControl; 511 433 private System.Windows.Forms.TabPage resultsTabPage; 434 private System.Windows.Forms.CheckBox showOnlyFinalResultCheckBox; 435 private WeifenLuo.WinFormsUI.Docking.DockPanel resultsDockPanel; 436 private System.Windows.Forms.TabPage runsTabPage; 437 private Optimization.Views.RunCollectionView runsView; 438 private System.Windows.Forms.TabPage seededRunsTabPage; 439 private Optimization.Views.RunCollectionView seededRunsView; 512 440 private System.Windows.Forms.TabPage solutionSeedingTabPage; 513 441 private System.Windows.Forms.TabPage parametersTabPage; … … 515 443 private System.Windows.Forms.TabPage operatorGraphTabPage; 516 444 private MainForm.WindowsForms.ViewHost operatorGraphViewHost; 517 private System.Windows.Forms.Button algorithmStartButton;518 private System.Windows.Forms.Label seedingStrategyLabel;519 private System.Windows.Forms.Label evaluationsLimitabel;520 private System.Windows.Forms.Label recommenderLabel;521 private System.Windows.Forms.ComboBox suggestedInstancesComboBox;522 private System.Windows.Forms.Button algorithmCloneButton;523 private System.Windows.Forms.TabPage runsTabPage;524 private Optimization.Views.RunCollectionView runsView;525 private Data.Views.StringConvertibleValueView maxEvaluationsView;526 private WeifenLuo.WinFormsUI.Docking.DockPanel resultsDockPanel;527 private System.Windows.Forms.CheckBox showOnlyFinalResultCheckBox;528 private System.Windows.Forms.TabPage seededRunsTabPage;529 private Optimization.Views.RunCollectionView seededRunsView;530 private System.Windows.Forms.Label minimumTargetLabel;531 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;537 445 } 538 446 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/SolverView.cs
r13774 r13787 28 28 using HeuristicLab.OptimizationExpertSystem.Common; 29 29 using System; 30 using System.Linq; 30 31 using System.Windows.Forms; 31 32 … … 44 45 algorithmCloneButton.Text = string.Empty; 45 46 algorithmCloneButton.Image = VSImageLibrary.Clone; 46 recommendRefreshButton.Text = string.Empty;47 recommendRefreshButton.Image = VSImageLibrary.Refresh;48 47 seedingStrategyView = new EnumValueView<SeedingStrategyTypes>() { 49 48 Dock = DockStyle.Fill … … 68 67 seedingStrategyView.Content = null; 69 68 seedingSolutionsView.Content = null; 70 recommenderViewHost.Content = null;71 69 } else { 72 70 maxEvaluationsView.Content = Content.MaximumEvaluations; … … 76 74 seedingStrategyView.Content = Content.SeedingStrategy; 77 75 seedingSolutionsView.Content = Content.SolutionSeedingPool; 78 recommenderViewHost.Content = Content.AlgorithmInstanceRecommender;79 76 } 80 77 } finally { SuppressEvents = false; } 81 78 UpdateSuggestedInstancesCombobox(); 82 UpdateRecommenderCombobox();83 79 } 84 80 … … 91 87 } 92 88 89 #region Update Controls 90 private void UpdateSuggestedInstancesCombobox() { 91 var prevSelection = (AlgorithmInstanceItem)suggestedInstancesComboBox.SelectedItem; 92 var prevNewIndex = -1; 93 suggestedInstancesComboBox.Items.Clear(); 94 if (Content == null) return; 95 96 var ranking = Content.GetAlgorithmInstanceRanking().ToList(); 97 98 for (var i = 0; i < ranking.Count; i++) { 99 suggestedInstancesComboBox.Items.Add(new AlgorithmInstanceItem(ranking[i])); 100 if (prevSelection == null || ranking[i].Item1.Name == prevSelection.Item.Item1.Name) 101 prevNewIndex = prevSelection == null ? 0 : i; 102 } 103 suggestedInstancesComboBox.SelectedIndex = prevNewIndex; 104 } 105 #endregion 106 107 #region Content Event Handlers 93 108 protected override void OnAlgorithmInstanceStarted(IAlgorithm algorithm) { 94 109 base.OnAlgorithmInstanceStarted(algorithm); … … 97 112 } 98 113 99 protected override void On SuggestedInstancesChanged() {100 base.On SuggestedInstancesChanged();114 protected override void OnRecommendationModelChanged() { 115 base.OnRecommendationModelChanged(); 101 116 UpdateSuggestedInstancesCombobox(); 102 117 } 118 #endregion 103 119 104 private void UpdateSuggestedInstancesCombobox() { 105 var prevSelection = (IAlgorithm)suggestedInstancesComboBox.SelectedItem; 106 var prevNewIndex = -1; 107 suggestedInstancesComboBox.Items.Clear(); 108 if (Content == null) return; 109 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) 113 prevNewIndex = prevSelection == null ? 0 : i; 114 } 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++; 131 } 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; 139 } 140 120 #region Control Event Handlers 141 121 private void AlgorithmStartButtonOnClick(object sender, EventArgs e) { 142 122 if (suggestedInstancesComboBox.SelectedIndex >= 0) 143 Content.StartAlgorithmAsync( suggestedInstancesComboBox.SelectedIndex);123 Content.StartAlgorithmAsync(Content.AlgorithmInstances.Select((a, i) => new { Alg = a, Index = i}).Single(x => x.Alg.Name == ((AlgorithmInstanceItem)suggestedInstancesComboBox.SelectedItem).Item.Item1.Name).Index); 144 124 } 145 125 146 126 private void AlgorithmCloneButtonOnClick(object sender, EventArgs e) { 147 127 if (suggestedInstancesComboBox.SelectedIndex >= 0) 148 MainForm.ShowContent((IAlgorithm)Content.AlgorithmInstances[ suggestedInstancesComboBox.SelectedIndex].Clone());128 MainForm.ShowContent((IAlgorithm)Content.AlgorithmInstances[Content.AlgorithmInstances.Select((a, i) => new { Alg = a, Index = i }).Single(x => x.Alg.Name == ((AlgorithmInstanceItem)suggestedInstancesComboBox.SelectedItem).Item.Item1.Name).Index].Clone()); 149 129 } 150 130 … … 152 132 if (InvokeRequired) { Invoke((Action<object, EventArgs>)SuggestedInstancesComboBoxOnSelectedIndexChanged, sender, e); return; } 153 133 if (suggestedInstancesComboBox.SelectedIndex >= 0) { 154 var alg = Content.AlgorithmInstances[ suggestedInstancesComboBox.SelectedIndex];134 var alg = Content.AlgorithmInstances[Content.AlgorithmInstances.Select((a, i) => new { Alg = a, Index = i }).Single(x => x.Alg.Name == ((AlgorithmInstanceItem)suggestedInstancesComboBox.SelectedItem).Item.Item1.Name).Index]; 155 135 solverParametersView.Content = alg.Parameters; 156 136 var engineAlg = alg as EngineAlgorithm; … … 163 143 SetEnabledStateOfControls(); 164 144 } 145 #endregion 165 146 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(); 147 #region Helper Classes and Methods 148 private class AlgorithmInstanceItem { 149 private readonly Tuple<IAlgorithm, double> item; 150 public Tuple<IAlgorithm, double> Item { get { return item; } } 151 152 public AlgorithmInstanceItem(Tuple<IAlgorithm, double> item) { 153 this.item = item; 154 } 155 156 public override string ToString() { 157 return item.Item2.ToString("F0") + ": " + item.Item1.Name; 158 } 172 159 } 173 174 private void button1_Click(object sender, EventArgs e) { 175 Content.UpdateSuggestions(); 176 } 160 #endregion 177 161 } 178 162 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.cs
r13757 r13787 22 22 using HeuristicLab.Common.Resources; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Core.Views;25 24 using HeuristicLab.Data; 26 25 using HeuristicLab.MainForm; 26 using HeuristicLab.MainForm.WindowsForms; 27 27 using HeuristicLab.OptimizationExpertSystem.Common; 28 28 using System; … … 39 39 public sealed partial class UnderstandingProblemInstanceView : KnowledgeCenterViewBase { 40 40 private bool SuppressEvents { get; set; } 41 private readonly CheckedItemList View<StringValue> characteristicsView;41 private readonly CheckedItemList<StringValue> characteristics; 42 42 43 43 public UnderstandingProblemInstanceView() { … … 45 45 showCharacteristicsCheckBox.Text = string.Empty; 46 46 showCharacteristicsCheckBox.Image = VSImageLibrary.Properties; 47 characteristicsView = new CheckedItemListView<StringValue>() { 48 Dock = DockStyle.Fill 49 }; 50 mapSplitContainer.Panel2.Controls.Add(characteristicsView); 47 characteristics = new CheckedItemList<StringValue>(); 48 characteristics.CheckedItemsChanged += CharacteristicsOnCheckedItemsChanged; 49 mapSplitContainer.Panel2.Controls.Add(new ViewHost() { 50 Dock = DockStyle.Fill, 51 Content = characteristics 52 }); 51 53 } 52 54 53 55 protected override void OnContentChanged() { 54 56 base.OnContentChanged(); 57 characteristics.Clear(); 55 58 if (Content == null) { 56 59 problemInstancesView.Content = null; 57 characteristicsView.Content = null;58 60 instanceMapChart.Series["InstancesSeries"].Points.Clear(); 59 61 instanceMapChart.Series["CurrentInstanceSeries"].Points.Clear(); 60 62 } else { 61 63 problemInstancesView.Content = Content.ProblemInstances; 62 characteristicsView.Content = Content.ProblemCharacteristics;64 UpdateCharacteristics(); 63 65 UpdateProjectionComboBox(); 64 66 UpdateSizeComboBox(); … … 67 69 } 68 70 69 #region Content Event Handlers 70 protected override void OnProblemChanged() { 71 base.OnProblemChanged(); 72 SetEnabledStateOfControls(); 73 } 74 75 protected override void OnProblemInstancesChanged() { 76 base.OnProblemInstancesChanged(); 77 if (Content.ProblemInstances.UpdateOfRunsInProgress) return; 78 UpdateProjectionComboBox(); 79 UpdateSizeComboBox(); 80 UpdateColorComboBox(); 81 UpdateProjection(); 82 } 83 #endregion 71 protected override void SetEnabledStateOfControls() { 72 base.SetEnabledStateOfControls(); 73 } 74 75 #region Update Controls 76 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 } 82 } 84 83 85 84 private void UpdateProjectionComboBox() { … … 126 125 } finally { SuppressEvents = false; } 127 126 } 128 129 private IEnumerable<string> GetProjections() {130 return Content.ProblemInstances131 .SelectMany(x => x.Results.Where(y => Regex.IsMatch(y.Key, "^Projection[.].*[.][XY]$")))132 .Select(x => Regex.Match(x.Key, "Projection[.](?<g>.*)[.][XY]").Groups["g"].Value)133 .Distinct();134 }135 127 136 128 private void UpdateProjection() { … … 153 145 size, color, invPropCheckBox.Checked, fromZeroCheckBox.Checked); 154 146 } 147 #endregion 148 149 #region Content Event Handlers 150 protected override void OnProblemChanged() { 151 base.OnProblemChanged(); 152 SetEnabledStateOfControls(); 153 } 154 155 protected override void OnProblemInstancesChanged() { 156 base.OnProblemInstancesChanged(); 157 if (Content.ProblemInstances.UpdateOfRunsInProgress) return; 158 try { 159 SuppressEvents = true; 160 UpdateCharacteristics(); 161 } finally { SuppressEvents = false; } 162 UpdateProjectionComboBox(); 163 UpdateSizeComboBox(); 164 UpdateColorComboBox(); 165 UpdateProjection(); 166 } 167 #endregion 168 169 #region Control Event Handlers 170 private void ProjectionComboBoxOnSelectedIndexChanged(object sender, EventArgs e) { 171 UpdateProjection(); 172 } 173 174 private void SizeComboBoxOnSelectedIndexChanged(object sender, EventArgs e) { 175 UpdateProjection(); 176 } 177 178 private void colorComboBox_SelectedIndexChanged(object sender, EventArgs e) { 179 UpdateProjection(); 180 } 181 182 private void InvPropCheckBoxOnCheckedChanged(object sender, EventArgs e) { 183 UpdateProjection(); 184 } 185 186 private void fromZeroCheckBox_CheckedChanged(object sender, EventArgs e) { 187 UpdateProjection(); 188 } 189 190 private void showCharacteristicsCheckBox_CheckedChanged(object sender, EventArgs e) { 191 mapSplitContainer.Panel2Collapsed = !showCharacteristicsCheckBox.Checked; 192 } 193 #endregion 194 195 #region Other Event Handlers 196 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()); 200 } 201 #endregion 202 203 #region Helper Classes and Methods 204 private IEnumerable<string> GetProjections() { 205 return Content.ProblemInstances.ResultNames 206 .Where(x => Regex.IsMatch(x, "^Projection[.].*[.][XY]$")) 207 .Select(x => Regex.Match(x, "Projection[.](?<g>.*)[.][XY]").Groups["g"].Value) 208 .Distinct(); 209 } 155 210 156 211 private void DoProjectProblemInstances(Series instancesSeries, Series currentInstanceSeries, string projection, string size, string color, bool invProp, bool fromZero) { … … 160 215 double maxSize = 0, minSize = 0; 161 216 if (!string.IsNullOrEmpty(size)) { 162 var sizes = Content.ProblemInstances.Where(x => x.Results.ContainsKey(size)).Select(x => x.Results[size]).OfType<D ata.DoubleValue>().Where(x => !double.IsNaN(x.Value)).ToList();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(); 163 218 if (sizes.Count > 0) { 164 219 maxSize = sizes.Max(x => x.Value); … … 177 232 var yKey = "Projection." + projection + ".Y"; 178 233 if (!run.Results.ContainsKey(xKey) || !run.Results.ContainsKey(yKey) 179 || !(run.Results[xKey] is D ata.DoubleValue) || !(run.Results[yKey] is Data.DoubleValue)) continue;180 var x = ((D ata.DoubleValue)run.Results[xKey]).Value;181 var y = ((D ata.DoubleValue)run.Results[yKey]).Value;234 || !(run.Results[xKey] is DoubleValue) || !(run.Results[yKey] is DoubleValue)) continue; 235 var x = ((DoubleValue)run.Results[xKey]).Value; 236 var y = ((DoubleValue)run.Results[yKey]).Value; 182 237 var dataPoint = new DataPoint(x, y) { 183 238 Label = run.Name, … … 185 240 IItem item; 186 241 if (maxSize > minSize && run.Results.TryGetValue(size, out item)) { 187 var dItem = item as D ata.DoubleValue;242 var dItem = item as DoubleValue; 188 243 if (dItem == null && item is IntValue) dItem = new DoubleValue(((IntValue)item).Value); 189 244 if (dItem != null) { … … 216 271 } 217 272 } 218 219 #region Control Event Handlers220 private void ProjectionComboBoxOnSelectedIndexChanged(object sender, EventArgs e) {221 UpdateProjection();222 }223 224 private void SizeComboBoxOnSelectedIndexChanged(object sender, EventArgs e) {225 UpdateProjection();226 }227 228 private void colorComboBox_SelectedIndexChanged(object sender, EventArgs e) {229 UpdateProjection();230 }231 232 private void InvPropCheckBoxOnCheckedChanged(object sender, EventArgs e) {233 UpdateProjection();234 }235 236 private void fromZeroCheckBox_CheckedChanged(object sender, EventArgs e) {237 UpdateProjection();238 }239 240 private void showCharacteristicsCheckBox_CheckedChanged(object sender, EventArgs e) {241 mapSplitContainer.Panel2Collapsed = !showCharacteristicsCheckBox.Checked;242 }243 273 #endregion 244 274 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingSolutionsView.cs
r13750 r13787 54 54 UpdateSolutionVisualization(); 55 55 } 56 57 protected override void OnProblemChanged() { 58 base.OnProblemInstancesChanged(); 59 UpdateSimilarityCalculators(); 60 UpdateNamesComboboxes(); 61 UpdateSolutionVisualization(); 62 } 63 64 protected override void OnProblemSolutionsChanged() { 65 base.OnProblemSolutionsChanged(); 66 UpdateNamesComboboxes(); 67 UpdateSolutionVisualization(); 68 } 69 70 protected override void OnSolutionSeedingPoolChanged() { 71 base.OnSolutionSeedingPoolChanged(); 72 UpdateSolutionNetworkAnalysis(similarityComboBox.SelectedItem as ISolutionSimilarityCalculator, (string)solutionNetworkProjectionComboBox.SelectedItem, linesCheckBox.Checked, contrastTrackBar.Value, minimumTrackBar.Value); 73 } 74 56 57 #region Update Controls 75 58 private void UpdateSimilarityCalculators() { 76 59 var selected = (ISolutionSimilarityCalculator)(similarityComboBox.SelectedIndex >= 0 ? similarityComboBox.SelectedItem : null); … … 280 263 } 281 264 } 282 265 #endregion 266 267 #region Content Event Handlers 268 protected override void OnProblemChanged() { 269 base.OnProblemInstancesChanged(); 270 UpdateSimilarityCalculators(); 271 UpdateNamesComboboxes(); 272 UpdateSolutionVisualization(); 273 } 274 275 protected override void OnProblemSolutionsChanged() { 276 base.OnProblemSolutionsChanged(); 277 UpdateNamesComboboxes(); 278 UpdateSolutionVisualization(); 279 } 280 281 protected override void OnSolutionSeedingPoolChanged() { 282 base.OnSolutionSeedingPoolChanged(); 283 UpdateSolutionNetworkAnalysis(similarityComboBox.SelectedItem as ISolutionSimilarityCalculator, (string)solutionNetworkProjectionComboBox.SelectedItem, linesCheckBox.Checked, contrastTrackBar.Value, minimumTrackBar.Value); 284 } 285 #endregion 286 287 #region Control Event Handlers 283 288 private void SimilarityComboBoxOnSelectedIndexChanged(object sender, EventArgs e) { 284 289 if (InvokeRequired) { Invoke((Action<object, EventArgs>)SimilarityComboBoxOnSelectedIndexChanged, sender, e); return; } … … 370 375 } 371 376 } 372 373 #region Helpers 377 #endregion 378 379 #region Helper Classes and Methods 374 380 private List<IScope> GetSolutionScopes() { 375 381 return Content.Problem.Solutions.Select(x => x.Solution).OfType<IScope>().ToList();
Note: See TracChangeset
for help on using the changeset viewer.