- Timestamp:
- 03/08/16 17:51:43 (9 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/ExpertSystemView.Designer.cs
r13667 r13668 38 38 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 39 39 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 40 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 41 System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 40 42 System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); 43 System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); 41 44 this.evaluationsLimitabel = new System.Windows.Forms.Label(); 42 45 this.maxEvaluationsTextBox = new System.Windows.Forms.TextBox(); … … 45 48 this.problemViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 46 49 this.algorithmTabPage = new System.Windows.Forms.TabPage(); 50 this.algorithmCloneButton = new System.Windows.Forms.Button(); 47 51 this.algorithmStartButton = new System.Windows.Forms.Button(); 48 52 this.algorithmViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); … … 65 69 this.solutionsDiversityTabPage = new System.Windows.Forms.TabPage(); 66 70 this.solutionsDiversityViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 71 this.solutionsFdcTabPage = new System.Windows.Forms.TabPage(); 72 this.solutionsFdcViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 67 73 this.solutionsLengthScaleTabPage = new System.Windows.Forms.TabPage(); 68 74 this.solutionsLengthScaleViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 69 75 this.solutionsNetworkTabPage = new System.Windows.Forms.TabPage(); 70 this.solutionsNetwork ViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();76 this.solutionsNetworkChart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 71 77 this.okbTabPage = new System.Windows.Forms.TabPage(); 72 78 this.kbViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); … … 83 89 this.okbDownloadButton = new System.Windows.Forms.Button(); 84 90 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 85 this.solutionsFdcTabPage = new System.Windows.Forms.TabPage();86 this.solutionsFdcViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();87 91 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 88 92 this.tabControl.SuspendLayout(); … … 95 99 this.solutionsQualityTabPage.SuspendLayout(); 96 100 this.solutionsDiversityTabPage.SuspendLayout(); 101 this.solutionsFdcTabPage.SuspendLayout(); 97 102 this.solutionsLengthScaleTabPage.SuspendLayout(); 98 103 this.solutionsNetworkTabPage.SuspendLayout(); 104 ((System.ComponentModel.ISupportInitialize)(this.solutionsNetworkChart)).BeginInit(); 99 105 this.okbTabPage.SuspendLayout(); 100 106 this.problemInstancesTabPage.SuspendLayout(); … … 103 109 this.mapTabPage.SuspendLayout(); 104 110 ((System.ComponentModel.ISupportInitialize)(this.instanceMapChart)).BeginInit(); 105 this.solutionsFdcTabPage.SuspendLayout();106 111 this.SuspendLayout(); 107 112 // … … 182 187 // algorithmTabPage 183 188 // 189 this.algorithmTabPage.Controls.Add(this.algorithmCloneButton); 184 190 this.algorithmTabPage.Controls.Add(this.algorithmStartButton); 185 191 this.algorithmTabPage.Controls.Add(this.algorithmViewHost); … … 194 200 this.algorithmTabPage.UseVisualStyleBackColor = true; 195 201 // 202 // algorithmCloneButton 203 // 204 this.algorithmCloneButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 205 this.algorithmCloneButton.Location = new System.Drawing.Point(649, 5); 206 this.algorithmCloneButton.Name = "algorithmCloneButton"; 207 this.algorithmCloneButton.Size = new System.Drawing.Size(26, 23); 208 this.algorithmCloneButton.TabIndex = 3; 209 this.algorithmCloneButton.Text = "Clone"; 210 this.algorithmCloneButton.UseVisualStyleBackColor = true; 211 this.algorithmCloneButton.Click += new System.EventHandler(this.AlgorithmCloneButtonOnClick); 212 // 196 213 // algorithmStartButton 197 214 // 198 215 this.algorithmStartButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 199 this.algorithmStartButton.Location = new System.Drawing.Point(6 49, 5);216 this.algorithmStartButton.Location = new System.Drawing.Point(617, 5); 200 217 this.algorithmStartButton.Name = "algorithmStartButton"; 201 218 this.algorithmStartButton.Size = new System.Drawing.Size(26, 23); … … 238 255 this.suggestedInstancesComboBox.Location = new System.Drawing.Point(178, 6); 239 256 this.suggestedInstancesComboBox.Name = "suggestedInstancesComboBox"; 240 this.suggestedInstancesComboBox.Size = new System.Drawing.Size(4 65, 21);257 this.suggestedInstancesComboBox.Size = new System.Drawing.Size(433, 21); 241 258 this.suggestedInstancesComboBox.TabIndex = 0; 242 259 this.suggestedInstancesComboBox.SelectedIndexChanged += new System.EventHandler(this.SuggestedInstancesComboBoxOnSelectedIndexChanged); … … 431 448 this.solutionsDiversityViewHost.ViewType = null; 432 449 // 450 // solutionsFdcTabPage 451 // 452 this.solutionsFdcTabPage.Controls.Add(this.solutionsFdcViewHost); 453 this.solutionsFdcTabPage.Location = new System.Drawing.Point(4, 22); 454 this.solutionsFdcTabPage.Name = "solutionsFdcTabPage"; 455 this.solutionsFdcTabPage.Padding = new System.Windows.Forms.Padding(3); 456 this.solutionsFdcTabPage.Size = new System.Drawing.Size(667, 366); 457 this.solutionsFdcTabPage.TabIndex = 5; 458 this.solutionsFdcTabPage.Text = "Fitness-Distance Analysis"; 459 this.solutionsFdcTabPage.UseVisualStyleBackColor = true; 460 // 461 // solutionsFdcViewHost 462 // 463 this.solutionsFdcViewHost.Caption = "View"; 464 this.solutionsFdcViewHost.Content = null; 465 this.solutionsFdcViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 466 this.solutionsFdcViewHost.Enabled = false; 467 this.solutionsFdcViewHost.Location = new System.Drawing.Point(3, 3); 468 this.solutionsFdcViewHost.Name = "solutionsFdcViewHost"; 469 this.solutionsFdcViewHost.ReadOnly = false; 470 this.solutionsFdcViewHost.Size = new System.Drawing.Size(661, 360); 471 this.solutionsFdcViewHost.TabIndex = 0; 472 this.solutionsFdcViewHost.ViewsLabelVisible = true; 473 this.solutionsFdcViewHost.ViewType = null; 474 // 433 475 // solutionsLengthScaleTabPage 434 476 // … … 458 500 // solutionsNetworkTabPage 459 501 // 460 this.solutionsNetworkTabPage.Controls.Add(this.solutionsNetwork ViewHost);502 this.solutionsNetworkTabPage.Controls.Add(this.solutionsNetworkChart); 461 503 this.solutionsNetworkTabPage.Location = new System.Drawing.Point(4, 22); 462 504 this.solutionsNetworkTabPage.Name = "solutionsNetworkTabPage"; … … 467 509 this.solutionsNetworkTabPage.UseVisualStyleBackColor = true; 468 510 // 469 // solutionsNetworkViewHost 470 // 471 this.solutionsNetworkViewHost.Caption = "View"; 472 this.solutionsNetworkViewHost.Content = null; 473 this.solutionsNetworkViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 474 this.solutionsNetworkViewHost.Enabled = false; 475 this.solutionsNetworkViewHost.Location = new System.Drawing.Point(3, 3); 476 this.solutionsNetworkViewHost.Name = "solutionsNetworkViewHost"; 477 this.solutionsNetworkViewHost.ReadOnly = false; 478 this.solutionsNetworkViewHost.Size = new System.Drawing.Size(661, 360); 479 this.solutionsNetworkViewHost.TabIndex = 0; 480 this.solutionsNetworkViewHost.ViewsLabelVisible = true; 481 this.solutionsNetworkViewHost.ViewType = null; 511 // solutionsNetworkChart 512 // 513 chartArea1.AxisX.LabelStyle.Enabled = false; 514 chartArea1.AxisX.LineWidth = 0; 515 chartArea1.AxisX.MajorGrid.Enabled = false; 516 chartArea1.AxisX.MajorTickMark.Enabled = false; 517 chartArea1.AxisY.LabelStyle.Enabled = false; 518 chartArea1.AxisY.LineWidth = 0; 519 chartArea1.AxisY.MajorGrid.Enabled = false; 520 chartArea1.AxisY.MajorTickMark.Enabled = false; 521 chartArea1.Name = "SolutionsNetworkChartArea"; 522 this.solutionsNetworkChart.ChartAreas.Add(chartArea1); 523 this.solutionsNetworkChart.Dock = System.Windows.Forms.DockStyle.Fill; 524 legend1.Enabled = false; 525 legend1.Name = "Legend1"; 526 this.solutionsNetworkChart.Legends.Add(legend1); 527 this.solutionsNetworkChart.Location = new System.Drawing.Point(3, 3); 528 this.solutionsNetworkChart.Name = "solutionsNetworkChart"; 529 series1.ChartArea = "SolutionsNetworkChartArea"; 530 series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bubble; 531 series1.IsValueShownAsLabel = true; 532 series1.Label = "#LABEL"; 533 series1.Legend = "Legend1"; 534 series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; 535 series1.Name = "SolutionSeries"; 536 series1.YValuesPerPoint = 2; 537 this.solutionsNetworkChart.Series.Add(series1); 538 this.solutionsNetworkChart.Size = new System.Drawing.Size(661, 360); 539 this.solutionsNetworkChart.TabIndex = 0; 540 this.solutionsNetworkChart.Text = "enhancedChart1"; 482 541 // 483 542 // okbTabPage … … 590 649 // instanceMapChart 591 650 // 592 chartArea 1.AxisX.MajorGrid.LineColor = System.Drawing.Color.LightGray;593 chartArea 1.AxisX.MajorGrid.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Dash;594 chartArea 1.AxisY.MajorGrid.LineColor = System.Drawing.Color.LightGray;595 chartArea 1.AxisY.MajorGrid.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Dash;596 chartArea 1.Name = "Default";597 this.instanceMapChart.ChartAreas.Add(chartArea 1);651 chartArea2.AxisX.MajorGrid.LineColor = System.Drawing.Color.LightGray; 652 chartArea2.AxisX.MajorGrid.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Dash; 653 chartArea2.AxisY.MajorGrid.LineColor = System.Drawing.Color.LightGray; 654 chartArea2.AxisY.MajorGrid.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Dash; 655 chartArea2.Name = "Default"; 656 this.instanceMapChart.ChartAreas.Add(chartArea2); 598 657 this.instanceMapChart.Dock = System.Windows.Forms.DockStyle.Fill; 599 legend 1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;600 legend 1.Enabled = false;601 legend 1.Name = "Legend";602 this.instanceMapChart.Legends.Add(legend 1);658 legend2.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; 659 legend2.Enabled = false; 660 legend2.Name = "Legend"; 661 this.instanceMapChart.Legends.Add(legend2); 603 662 this.instanceMapChart.Location = new System.Drawing.Point(3, 3); 604 663 this.instanceMapChart.Name = "instanceMapChart"; 605 series1.ChartArea = "Default";606 series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;607 series1.Legend = "Legend";608 series1.MarkerSize = 10;609 series1.Name = "InstancesSeries";610 664 series2.ChartArea = "Default"; 611 665 series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; 612 666 series2.Legend = "Legend"; 613 series2.MarkerColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); 614 series2.MarkerSize = 15; 615 series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Cross; 616 series2.Name = "CurrentInstanceSeries"; 617 this.instanceMapChart.Series.Add(series1); 667 series2.MarkerSize = 10; 668 series2.Name = "InstancesSeries"; 669 series3.ChartArea = "Default"; 670 series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; 671 series3.Legend = "Legend"; 672 series3.MarkerColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); 673 series3.MarkerSize = 15; 674 series3.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Cross; 675 series3.Name = "CurrentInstanceSeries"; 618 676 this.instanceMapChart.Series.Add(series2); 677 this.instanceMapChart.Series.Add(series3); 619 678 this.instanceMapChart.Size = new System.Drawing.Size(661, 358); 620 679 this.instanceMapChart.TabIndex = 0; … … 659 718 this.openFileDialog.Filter = "HeuristicLab Files|*.hl|All Files|*.*"; 660 719 this.openFileDialog.Title = "Open Optimizer"; 661 //662 // solutionsFdcTabPage663 //664 this.solutionsFdcTabPage.Controls.Add(this.solutionsFdcViewHost);665 this.solutionsFdcTabPage.Location = new System.Drawing.Point(4, 22);666 this.solutionsFdcTabPage.Name = "solutionsFdcTabPage";667 this.solutionsFdcTabPage.Padding = new System.Windows.Forms.Padding(3);668 this.solutionsFdcTabPage.Size = new System.Drawing.Size(667, 366);669 this.solutionsFdcTabPage.TabIndex = 5;670 this.solutionsFdcTabPage.Text = "Fitness-Distance Analysis";671 this.solutionsFdcTabPage.UseVisualStyleBackColor = true;672 //673 // solutionsFdcViewHost674 //675 this.solutionsFdcViewHost.Caption = "View";676 this.solutionsFdcViewHost.Content = null;677 this.solutionsFdcViewHost.Dock = System.Windows.Forms.DockStyle.Fill;678 this.solutionsFdcViewHost.Enabled = false;679 this.solutionsFdcViewHost.Location = new System.Drawing.Point(3, 3);680 this.solutionsFdcViewHost.Name = "solutionsFdcViewHost";681 this.solutionsFdcViewHost.ReadOnly = false;682 this.solutionsFdcViewHost.Size = new System.Drawing.Size(661, 360);683 this.solutionsFdcViewHost.TabIndex = 0;684 this.solutionsFdcViewHost.ViewsLabelVisible = true;685 this.solutionsFdcViewHost.ViewType = null;686 720 // 687 721 // ExpertSystemView … … 715 749 this.solutionsQualityTabPage.ResumeLayout(false); 716 750 this.solutionsDiversityTabPage.ResumeLayout(false); 751 this.solutionsFdcTabPage.ResumeLayout(false); 717 752 this.solutionsLengthScaleTabPage.ResumeLayout(false); 718 753 this.solutionsNetworkTabPage.ResumeLayout(false); 754 ((System.ComponentModel.ISupportInitialize)(this.solutionsNetworkChart)).EndInit(); 719 755 this.okbTabPage.ResumeLayout(false); 720 756 this.problemInstancesTabPage.ResumeLayout(false); … … 724 760 this.mapTabPage.ResumeLayout(false); 725 761 ((System.ComponentModel.ISupportInitialize)(this.instanceMapChart)).EndInit(); 726 this.solutionsFdcTabPage.ResumeLayout(false);727 762 this.ResumeLayout(false); 728 763 this.PerformLayout(); … … 775 810 private System.Windows.Forms.TabPage solutionsNetworkTabPage; 776 811 private MainForm.WindowsForms.ViewHost solutionsLengthScaleViewHost; 777 private MainForm.WindowsForms.ViewHost solutionsNetworkViewHost;778 812 private System.Windows.Forms.TabPage solutionsFdcTabPage; 779 813 private MainForm.WindowsForms.ViewHost solutionsFdcViewHost; 814 private Visualization.ChartControlsExtensions.EnhancedChart solutionsNetworkChart; 815 private System.Windows.Forms.Button algorithmCloneButton; 780 816 } 781 817 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/ExpertSystemView.cs
r13667 r13668 57 57 algorithmStartButton.Text = string.Empty; 58 58 algorithmStartButton.Image = VSImageLibrary.Play; 59 algorithmCloneButton.Text = string.Empty; 60 algorithmCloneButton.Image = VSImageLibrary.Clone; 59 61 refreshMapButton.Text = string.Empty; 60 62 refreshMapButton.Image = VSImageLibrary.Refresh; … … 134 136 suggestedInstancesComboBox.Enabled = Content != null && !ReadOnly && !Locked && !okbDownloadInProgress; 135 137 algorithmStartButton.Enabled = Content != null && !ReadOnly && !Locked && suggestedInstancesComboBox.SelectedIndex >= 0; 138 algorithmCloneButton.Enabled = Content != null && !ReadOnly && !Locked && suggestedInstancesComboBox.SelectedIndex >= 0; 136 139 algorithmViewHost.Enabled = Content != null && !ReadOnly && !Locked; 137 140 runsView.Enabled = Content != null; … … 238 241 UpdateSolutionFdcAnalysis(calculator); 239 242 UpdateSolutionLengthScaleAnalysis(calculator); 243 UpdateSolutionNetworkAnalysis(calculator); 240 244 } else solutionsDiversityViewHost.Content = null; 241 245 } … … 304 308 if (suggestedInstancesComboBox.SelectedIndex >= 0) 305 309 Content.StartAlgorithmAsync(suggestedInstancesComboBox.SelectedIndex); 310 } 311 312 private void AlgorithmCloneButtonOnClick(object sender, EventArgs e) { 313 if (suggestedInstancesComboBox.SelectedIndex >= 0) 314 MainFormManager.MainForm.ShowContent((IAlgorithm)Content.SuggestedInstances[suggestedInstancesComboBox.SelectedIndex].Clone()); 306 315 } 307 316 … … 406 415 } 407 416 417 private void UpdateSolutionNetworkAnalysis(ISolutionSimilarityCalculator calculator) { 418 try { 419 var series = solutionsNetworkChart.Series["SolutionSeries"]; 420 series.Points.Clear(); 421 var dissimilarities = new DoubleMatrix(Content.SolutionPool.Count, Content.SolutionPool.Count); 422 for (int i = 0; i < Content.SolutionPool.Count; i++) { 423 for (int j = 0; j < Content.SolutionPool.Count; j++) { 424 if (i == j) continue; 425 dissimilarities[i, j] = 1.0 - calculator.CalculateSolutionSimilarity(Content.SolutionPool[i], Content.SolutionPool[j]); 426 } 427 } 428 var coords = MultidimensionalScaling.KruskalShepard(dissimilarities); 429 for (var i = 0; i < coords.Rows; i++) { 430 var quality = ((DoubleValue)Content.SolutionPool[i].Variables[calculator.QualityVariableName].Value).Value; 431 series.Points.Add(new DataPoint() { 432 Name = i.ToString(), 433 XValue = coords[i, 0], 434 YValues = new[] { coords[i, 1], quality }, 435 Label = i + ": " + quality 436 }); 437 } 438 } catch { } 439 } 440 408 441 private void SuggestedInstancesComboBoxOnSelectedIndexChanged(object sender, EventArgs e) { 409 442 SetEnabledStateOfControls(); … … 421 454 UpdateSolutionFdcAnalysis(calculator); 422 455 UpdateSolutionLengthScaleAnalysis(calculator); 456 UpdateSolutionNetworkAnalysis(calculator); 423 457 } 424 458 … … 429 463 UpdateSolutionFdcAnalysis(calculator); 430 464 UpdateSolutionLengthScaleAnalysis(calculator); 465 UpdateSolutionNetworkAnalysis(calculator); 431 466 } 432 467 … … 440 475 UpdateSolutionFdcAnalysis(calculator); 441 476 UpdateSolutionLengthScaleAnalysis(calculator); 477 UpdateSolutionNetworkAnalysis(calculator); 442 478 } 443 479 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/HeuristicLab.OptimizationExpertSystem-3.3.csproj.user
r13667 r13668 4 4 <StartAction>Program</StartAction> 5 5 <StartProgram>C:\Users\P40311\Work\HL3\trunk\sources\bin\HeuristicLab 3.3.exe</StartProgram> 6 <StartArguments>/start:"Optimiz ation Expert System" /hideStarter</StartArguments>6 <StartArguments>/start:"Optimizer" /hideStarter</StartArguments> 7 7 </PropertyGroup> 8 8 </Project>
Note: See TracChangeset
for help on using the changeset viewer.