Changeset 17526
- Timestamp:
- 05/08/20 06:34:12 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 2 added
- 3 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering.Views/3.3/HeuristicLab.Problems.Orienteering.Views-3.3.csproj
r17525 r17526 108 108 </ItemGroup> 109 109 <ItemGroup> 110 <Compile Include="OrienteeringProblemDataView.cs"> 111 <SubType>UserControl</SubType> 112 </Compile> 113 <Compile Include="OrienteeringProblemDataView.Designer.cs"> 114 <DependentUpon>OrienteeringProblemDataView.cs</DependentUpon> 115 </Compile> 110 116 <Compile Include="OrienteeringProblemView.cs"> 111 117 <SubType>UserControl</SubType> … … 205 211 <Private>False</Private> 206 212 </ProjectReference> 207 </ItemGroup>208 <ItemGroup>209 <EmbeddedResource Include="OrienteeringProblemView.resx">210 <DependentUpon>OrienteeringProblemView.cs</DependentUpon>211 </EmbeddedResource>212 <EmbeddedResource Include="OrienteeringSolutionView.resx">213 <DependentUpon>OrienteeringSolutionView.cs</DependentUpon>214 </EmbeddedResource>215 213 </ItemGroup> 216 214 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.Designer.cs
r17525 r17526 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this. ScoreLabel = new System.Windows.Forms.Label();47 this.scoreLabel = new System.Windows.Forms.Label(); 48 48 this.qualityLabel = new System.Windows.Forms.Label(); 49 49 this.qualityValueView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 50 50 this.scoreValueView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 51 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();52 51 this.tabControl.SuspendLayout(); 53 52 this.visualizationTabPage.SuspendLayout(); 54 this.valueTabPage.SuspendLayout(); 55 this.tourGroupBox.SuspendLayout(); 56 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 57 this.splitContainer.Panel1.SuspendLayout(); 58 this.splitContainer.Panel2.SuspendLayout(); 59 this.splitContainer.SuspendLayout(); 60 this.qualityGroupBox.SuspendLayout(); 53 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 54 this.routeTabPage.SuspendLayout(); 61 55 this.SuspendLayout(); 56 // 57 // tabControl 58 // 59 this.tabControl.Location = new System.Drawing.Point(3, 88); 60 this.tabControl.Size = new System.Drawing.Size(417, 314); 61 // 62 // visualizationTabPage 63 // 64 this.visualizationTabPage.Size = new System.Drawing.Size(409, 288); 62 65 // 63 66 // pictureBox 64 67 // 65 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 66 this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill; 67 this.pictureBox.Location = new System.Drawing.Point(3, 3); 68 this.pictureBox.Size = new System.Drawing.Size(403, 228); 68 this.pictureBox.Size = new System.Drawing.Size(403, 282); 69 69 // 70 // tabControl70 // routeTabPage 71 71 // 72 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 73 | System.Windows.Forms.AnchorStyles.Right))); 74 this.tabControl.Location = new System.Drawing.Point(3, 72); 75 this.tabControl.Size = new System.Drawing.Size(417, 260); 76 // 77 // visualizationTabPage 78 // 79 this.visualizationTabPage.Size = new System.Drawing.Size(409, 234); 80 // 81 // valueTabPage 82 // 83 this.valueTabPage.Size = new System.Drawing.Size(409, 234); 84 // 85 // tourGroupBox 86 // 87 this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 88 this.tourGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 89 this.tourGroupBox.Location = new System.Drawing.Point(3, 3); 90 this.tourGroupBox.Size = new System.Drawing.Size(403, 228); 72 this.routeTabPage.Size = new System.Drawing.Size(409, 234); 91 73 // 92 74 // tourViewHost 93 75 // 94 this.tourViewHost.Size = new System.Drawing.Size( 391, 203);76 this.tourViewHost.Size = new System.Drawing.Size(403, 228); 95 77 // 96 // splitContainer78 // distanceView 97 79 // 80 this.distanceView.Location = new System.Drawing.Point(62, 61); 98 81 // 99 // splitContainer.Panel182 // distanceLabel 100 83 // 101 this.splitContainer.Panel1.Controls.Add(this.ScoreLabel); 102 this.splitContainer.Panel1.Controls.Add(this.qualityLabel); 103 this.splitContainer.Panel1.Controls.Add(this.qualityValueView); 104 this.splitContainer.Panel1.Controls.Add(this.scoreValueView); 105 this.splitContainer.Panel1.Margin = new System.Windows.Forms.Padding(0, 0, 5, 0); 106 this.splitContainer.Panel1MinSize = 0; 84 this.distanceLabel.Location = new System.Drawing.Point(4, 64); 107 85 // 108 // s plitContainer.Panel286 // scoreLabel 109 87 // 110 this.splitContainer.Panel2.Controls.Add(this.qualityGroupBox); 111 this.splitContainer.SplitterDistance = 63; 112 // 113 // qualityGroupBox 114 // 115 this.qualityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 116 | System.Windows.Forms.AnchorStyles.Right))); 117 this.qualityGroupBox.Location = new System.Drawing.Point(3, 3); 118 this.qualityGroupBox.Size = new System.Drawing.Size(417, 63); 119 // 120 // qualityViewHost 121 // 122 this.qualityViewHost.Size = new System.Drawing.Size(405, 38); 123 // 124 // ScoreLabel 125 // 126 this.ScoreLabel.AutoSize = true; 127 this.ScoreLabel.Location = new System.Drawing.Point(7, 38); 128 this.ScoreLabel.Name = "ScoreLabel"; 129 this.ScoreLabel.Size = new System.Drawing.Size(38, 13); 130 this.ScoreLabel.TabIndex = 1; 131 this.ScoreLabel.Text = "Score:"; 88 this.scoreLabel.AutoSize = true; 89 this.scoreLabel.Location = new System.Drawing.Point(7, 38); 90 this.scoreLabel.Name = "scoreLabel"; 91 this.scoreLabel.Size = new System.Drawing.Size(38, 13); 92 this.scoreLabel.TabIndex = 1; 93 this.scoreLabel.Text = "Score:"; 132 94 // 133 95 // qualityLabel … … 147 109 this.qualityValueView.Content = null; 148 110 this.qualityValueView.LabelVisible = false; 149 this.qualityValueView.Location = new System.Drawing.Point(6 5, 7);111 this.qualityValueView.Location = new System.Drawing.Point(62, 7); 150 112 this.qualityValueView.Name = "qualityValueView"; 151 113 this.qualityValueView.ReadOnly = false; 152 this.qualityValueView.Size = new System.Drawing.Size(35 4, 21);114 this.qualityValueView.Size = new System.Drawing.Size(357, 21); 153 115 this.qualityValueView.TabIndex = 0; 154 116 // … … 160 122 this.scoreValueView.Content = null; 161 123 this.scoreValueView.LabelVisible = false; 162 this.scoreValueView.Location = new System.Drawing.Point(6 5, 34);124 this.scoreValueView.Location = new System.Drawing.Point(62, 34); 163 125 this.scoreValueView.Name = "scoreValueView"; 164 126 this.scoreValueView.ReadOnly = false; 165 this.scoreValueView.Size = new System.Drawing.Size(35 4, 21);127 this.scoreValueView.Size = new System.Drawing.Size(357, 21); 166 128 this.scoreValueView.TabIndex = 0; 167 129 // … … 169 131 // 170 132 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 133 this.Controls.Add(this.scoreLabel); 134 this.Controls.Add(this.qualityLabel); 135 this.Controls.Add(this.qualityValueView); 136 this.Controls.Add(this.scoreValueView); 171 137 this.Name = "OrienteeringSolutionView"; 172 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 138 this.Controls.SetChildIndex(this.scoreValueView, 0); 139 this.Controls.SetChildIndex(this.qualityValueView, 0); 140 this.Controls.SetChildIndex(this.qualityLabel, 0); 141 this.Controls.SetChildIndex(this.scoreLabel, 0); 142 this.Controls.SetChildIndex(this.tabControl, 0); 143 this.Controls.SetChildIndex(this.distanceView, 0); 144 this.Controls.SetChildIndex(this.distanceLabel, 0); 173 145 this.tabControl.ResumeLayout(false); 174 146 this.visualizationTabPage.ResumeLayout(false); 175 this.valueTabPage.ResumeLayout(false); 176 this.tourGroupBox.ResumeLayout(false); 177 this.splitContainer.Panel1.ResumeLayout(false); 178 this.splitContainer.Panel1.PerformLayout(); 179 this.splitContainer.Panel2.ResumeLayout(false); 180 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 181 this.splitContainer.ResumeLayout(false); 182 this.qualityGroupBox.ResumeLayout(false); 147 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 148 this.routeTabPage.ResumeLayout(false); 183 149 this.ResumeLayout(false); 150 this.PerformLayout(); 184 151 185 152 } 186 153 187 154 #endregion 188 private System.Windows.Forms.Label ScoreLabel;155 private System.Windows.Forms.Label scoreLabel; 189 156 private System.Windows.Forms.Label qualityLabel; 190 157 private Data.Views.StringConvertibleValueView qualityValueView; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs
r17525 r17526 66 66 qualityValueView.Content = null; 67 67 scoreValueView.Content = null; 68 splitContainer.Panel1Collapsed = true;69 68 Visualizer.Data = null; 70 69 Visualizer.IsFeasible = false; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj
r17525 r17526 90 90 <ItemGroup> 91 91 <Compile Include="Creators\GreedyOrienteeringTourCreator.cs" /> 92 <Compile Include="DistanceMatrix.cs" />93 92 <Compile Include="Improvers\OrienteeringLocalImprovementOperator.cs" /> 94 93 <Compile Include="Interfaces\IOrienteeringSolutionCreator.cs" /> -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs
r17525 r17526 110 110 var data = OrienteeringProblemData; 111 111 112 var best = GetBestSolution(vectors, qualities) ;113 var score = CalculateScore(OrienteeringProblemData, best .Item1);114 var travelCosts = CalculateTravelCosts(OrienteeringProblemData, best .Item1);112 var best = GetBestSolution(vectors, qualities).Item1; 113 var score = CalculateScore(OrienteeringProblemData, best); 114 var travelCosts = CalculateTravelCosts(OrienteeringProblemData, best); 115 115 var quality = CalculateQuality(OrienteeringProblemData, score, travelCosts); 116 116 117 if ( BestKnownQuality == double.NaN || best.Item2 > BestKnownQuality) {118 BestKnownQuality = best.Item2;119 BestKnownSolutionParameter.ActualValue = data.GetSolution((IntegerVector)best. Item1.Clone(), quality, score, travelCosts);117 if (double.IsNaN(BestKnownQuality) || IsBetter(quality, BestKnownQuality)) { 118 BestKnownQuality = quality; 119 BestKnownSolutionParameter.ActualValue = data.GetSolution((IntegerVector)best.Clone(), quality, score, travelCosts); 120 120 } 121 121 122 122 var bestSoFar = BestOrienteeringSolutionParameter.ActualValue; 123 123 124 if (bestSoFar == null ) {125 bestSoFar = data.GetSolution((IntegerVector)best. Item1.Clone(), quality, score, travelCosts);124 if (bestSoFar == null || IsBetter(quality, bestSoFar.Quality.Value)) { 125 bestSoFar = data.GetSolution((IntegerVector)best.Clone(), quality, score, travelCosts); 126 126 BestOrienteeringSolutionParameter.ActualValue = bestSoFar; 127 } else {128 if (IsBetter(best.Item2, bestSoFar.Quality.Value)) {129 bestSoFar.Route = (IntegerVector)best.Item1.Clone();130 bestSoFar.Quality.Value = quality;131 bestSoFar.Score.Value = score;132 bestSoFar.TravelCosts.Value = travelCosts;133 }134 127 } 135 128 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Orienteering/3.3/OrienteeringSolution.cs
r17525 r17526 101 101 : base(original, cloner) { 102 102 this.route = cloner.Clone(original.route); 103 this.routeAsPermutation = cloner.Clone(original.routeAsPermutation); 103 104 this.opData = cloner.Clone(original.opData); 104 105 this.quality = cloner.Clone(original.quality); … … 110 111 : base() { 111 112 this.route = route; 113 this.routeAsPermutation = new Permutation(PermutationTypes.RelativeDirected, route); 112 114 this.opData = opData; 113 115 this.quality = quality; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPSolutionView.Designer.cs
r17260 r17526 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.pictureBox = new System.Windows.Forms.PictureBox();48 47 this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl(); 49 48 this.visualizationTabPage = new System.Windows.Forms.TabPage(); 50 this. valueTabPage = new System.Windows.Forms.TabPage();51 this. tourGroupBox = new System.Windows.Forms.GroupBox();49 this.pictureBox = new System.Windows.Forms.PictureBox(); 50 this.routeTabPage = new System.Windows.Forms.TabPage(); 52 51 this.tourViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 53 this.splitContainer = new System.Windows.Forms.SplitContainer(); 54 this.qualityGroupBox = new System.Windows.Forms.GroupBox(); 55 this.qualityViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 56 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 52 this.distanceView = new HeuristicLab.Data.Views.StringConvertibleValueView(); 53 this.distanceLabel = new System.Windows.Forms.Label(); 57 54 this.tabControl.SuspendLayout(); 58 55 this.visualizationTabPage.SuspendLayout(); 59 this.valueTabPage.SuspendLayout(); 60 this.tourGroupBox.SuspendLayout(); 61 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 62 this.splitContainer.Panel1.SuspendLayout(); 63 this.splitContainer.Panel2.SuspendLayout(); 64 this.splitContainer.SuspendLayout(); 65 this.qualityGroupBox.SuspendLayout(); 56 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 57 this.routeTabPage.SuspendLayout(); 66 58 this.SuspendLayout(); 67 //68 // pictureBox69 //70 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)71 | System.Windows.Forms.AnchorStyles.Left)72 | System.Windows.Forms.AnchorStyles.Right)));73 this.pictureBox.BackColor = System.Drawing.Color.White;74 this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;75 this.pictureBox.Location = new System.Drawing.Point(6, 6);76 this.pictureBox.Name = "pictureBox";77 this.pictureBox.Size = new System.Drawing.Size(403, 291);78 this.pictureBox.TabIndex = 0;79 this.pictureBox.TabStop = false;80 this.pictureBox.SizeChanged += new System.EventHandler(this.pictureBox_SizeChanged);81 59 // 82 60 // tabControl … … 87 65 | System.Windows.Forms.AnchorStyles.Right))); 88 66 this.tabControl.Controls.Add(this.visualizationTabPage); 89 this.tabControl.Controls.Add(this. valueTabPage);90 this.tabControl.Location = new System.Drawing.Point(0, 3 );67 this.tabControl.Controls.Add(this.routeTabPage); 68 this.tabControl.Location = new System.Drawing.Point(0, 30); 91 69 this.tabControl.Name = "tabControl"; 92 70 this.tabControl.SelectedIndex = 0; 93 this.tabControl.Size = new System.Drawing.Size(423, 3 29);94 this.tabControl.TabIndex = 0;71 this.tabControl.Size = new System.Drawing.Size(423, 372); 72 this.tabControl.TabIndex = 1; 95 73 // 96 74 // visualizationTabPage … … 101 79 this.visualizationTabPage.Name = "visualizationTabPage"; 102 80 this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3); 103 this.visualizationTabPage.Size = new System.Drawing.Size(415, 3 03);81 this.visualizationTabPage.Size = new System.Drawing.Size(415, 346); 104 82 this.visualizationTabPage.TabIndex = 0; 105 83 this.visualizationTabPage.Text = "Visualization"; 106 84 // 107 // valueTabPage85 // pictureBox 108 86 // 109 this. valueTabPage.BackColor = System.Drawing.SystemColors.Window;110 this. valueTabPage.Controls.Add(this.tourGroupBox);111 this. valueTabPage.Location = new System.Drawing.Point(4, 22);112 this. valueTabPage.Name = "valueTabPage";113 this. valueTabPage.Padding = new System.Windows.Forms.Padding(3);114 this. valueTabPage.Size = new System.Drawing.Size(415, 300);115 this. valueTabPage.TabIndex = 1;116 this. valueTabPage.Text = "Value";87 this.pictureBox.BackColor = System.Drawing.Color.White; 88 this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 89 this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill; 90 this.pictureBox.Location = new System.Drawing.Point(3, 3); 91 this.pictureBox.Name = "pictureBox"; 92 this.pictureBox.Size = new System.Drawing.Size(409, 340); 93 this.pictureBox.TabIndex = 0; 94 this.pictureBox.TabStop = false; 117 95 // 118 // tourGroupBox96 // routeTabPage 119 97 // 120 this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 121 | System.Windows.Forms.AnchorStyles.Left) 122 | System.Windows.Forms.AnchorStyles.Right))); 123 this.tourGroupBox.Controls.Add(this.tourViewHost); 124 this.tourGroupBox.Location = new System.Drawing.Point(6, 6); 125 this.tourGroupBox.Name = "tourGroupBox"; 126 this.tourGroupBox.Size = new System.Drawing.Size(403, 288); 127 this.tourGroupBox.TabIndex = 0; 128 this.tourGroupBox.TabStop = false; 129 this.tourGroupBox.Text = "Tour"; 98 this.routeTabPage.BackColor = System.Drawing.SystemColors.Window; 99 this.routeTabPage.Controls.Add(this.tourViewHost); 100 this.routeTabPage.Location = new System.Drawing.Point(4, 22); 101 this.routeTabPage.Name = "routeTabPage"; 102 this.routeTabPage.Padding = new System.Windows.Forms.Padding(3); 103 this.routeTabPage.Size = new System.Drawing.Size(415, 346); 104 this.routeTabPage.TabIndex = 1; 105 this.routeTabPage.Text = "Route"; 130 106 // 131 107 // tourViewHost 132 108 // 133 this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)134 | System.Windows.Forms.AnchorStyles.Left)135 | System.Windows.Forms.AnchorStyles.Right)));136 109 this.tourViewHost.Caption = "View"; 137 110 this.tourViewHost.Content = null; 111 this.tourViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 138 112 this.tourViewHost.Enabled = false; 139 this.tourViewHost.Location = new System.Drawing.Point( 6, 19);113 this.tourViewHost.Location = new System.Drawing.Point(3, 3); 140 114 this.tourViewHost.Name = "tourViewHost"; 141 115 this.tourViewHost.ReadOnly = false; 142 this.tourViewHost.Size = new System.Drawing.Size( 391, 263);143 this.tourViewHost.TabIndex = 0;116 this.tourViewHost.Size = new System.Drawing.Size(409, 340); 117 this.tourViewHost.TabIndex = 1; 144 118 this.tourViewHost.ViewsLabelVisible = true; 145 119 this.tourViewHost.ViewType = null; 146 120 // 147 // splitContainer121 // distanceView 148 122 // 149 this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 150 this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; 151 this.splitContainer.Location = new System.Drawing.Point(0, 0); 152 this.splitContainer.Name = "splitContainer"; 153 this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; 123 this.distanceView.Caption = "StringConvertibleValue View"; 124 this.distanceView.Content = null; 125 this.distanceView.LabelVisible = false; 126 this.distanceView.Location = new System.Drawing.Point(62, 3); 127 this.distanceView.Name = "distanceView"; 128 this.distanceView.ReadOnly = false; 129 this.distanceView.Size = new System.Drawing.Size(357, 21); 130 this.distanceView.TabIndex = 3; 154 131 // 155 // splitContainer.Panel1132 // distanceLabel 156 133 // 157 this.splitContainer.Panel1.Controls.Add(this.qualityGroupBox); 158 // 159 // splitContainer.Panel2 160 // 161 this.splitContainer.Panel2.Controls.Add(this.tabControl); 162 this.splitContainer.Size = new System.Drawing.Size(423, 402); 163 this.splitContainer.SplitterDistance = 66; 164 this.splitContainer.TabIndex = 0; 165 // 166 // qualityGroupBox 167 // 168 this.qualityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 169 | System.Windows.Forms.AnchorStyles.Left) 170 | System.Windows.Forms.AnchorStyles.Right))); 171 this.qualityGroupBox.Controls.Add(this.qualityViewHost); 172 this.qualityGroupBox.Location = new System.Drawing.Point(0, 0); 173 this.qualityGroupBox.Name = "qualityGroupBox"; 174 this.qualityGroupBox.Size = new System.Drawing.Size(423, 63); 175 this.qualityGroupBox.TabIndex = 0; 176 this.qualityGroupBox.TabStop = false; 177 this.qualityGroupBox.Text = "Quality"; 178 // 179 // qualityViewHost 180 // 181 this.qualityViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 182 | System.Windows.Forms.AnchorStyles.Left) 183 | System.Windows.Forms.AnchorStyles.Right))); 184 this.qualityViewHost.Caption = "View"; 185 this.qualityViewHost.Content = null; 186 this.qualityViewHost.Enabled = false; 187 this.qualityViewHost.Location = new System.Drawing.Point(6, 19); 188 this.qualityViewHost.Name = "qualityViewHost"; 189 this.qualityViewHost.ReadOnly = false; 190 this.qualityViewHost.Size = new System.Drawing.Size(411, 38); 191 this.qualityViewHost.TabIndex = 0; 192 this.qualityViewHost.ViewsLabelVisible = true; 193 this.qualityViewHost.ViewType = null; 134 this.distanceLabel.AutoSize = true; 135 this.distanceLabel.Location = new System.Drawing.Point(4, 6); 136 this.distanceLabel.Name = "distanceLabel"; 137 this.distanceLabel.Size = new System.Drawing.Size(52, 13); 138 this.distanceLabel.TabIndex = 4; 139 this.distanceLabel.Text = "Distance:"; 194 140 // 195 141 // TSPSolutionView 196 142 // 197 143 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 198 this.Controls.Add(this.splitContainer); 144 this.Controls.Add(this.distanceLabel); 145 this.Controls.Add(this.distanceView); 146 this.Controls.Add(this.tabControl); 199 147 this.Name = "TSPSolutionView"; 200 148 this.Size = new System.Drawing.Size(423, 402); 201 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();202 149 this.tabControl.ResumeLayout(false); 203 150 this.visualizationTabPage.ResumeLayout(false); 204 this.valueTabPage.ResumeLayout(false); 205 this.tourGroupBox.ResumeLayout(false); 206 this.splitContainer.Panel1.ResumeLayout(false); 207 this.splitContainer.Panel2.ResumeLayout(false); 208 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 209 this.splitContainer.ResumeLayout(false); 210 this.qualityGroupBox.ResumeLayout(false); 151 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 152 this.routeTabPage.ResumeLayout(false); 211 153 this.ResumeLayout(false); 154 this.PerformLayout(); 212 155 213 156 } … … 215 158 #endregion 216 159 160 protected MainForm.WindowsForms.DragOverTabControl tabControl; 161 protected System.Windows.Forms.TabPage visualizationTabPage; 217 162 protected System.Windows.Forms.PictureBox pictureBox; 218 protected HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl; 219 protected System.Windows.Forms.TabPage visualizationTabPage; 220 protected System.Windows.Forms.TabPage valueTabPage; 221 protected System.Windows.Forms.GroupBox tourGroupBox; 222 protected HeuristicLab.MainForm.WindowsForms.ViewHost tourViewHost; 223 protected System.Windows.Forms.SplitContainer splitContainer; 224 protected System.Windows.Forms.GroupBox qualityGroupBox; 225 protected HeuristicLab.MainForm.WindowsForms.ViewHost qualityViewHost; 226 227 163 protected System.Windows.Forms.TabPage routeTabPage; 164 protected MainForm.WindowsForms.ViewHost tourViewHost; 165 protected Data.Views.StringConvertibleValueView distanceView; 166 protected System.Windows.Forms.Label distanceLabel; 228 167 } 229 168 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPSolutionView.cs
r17335 r17526 60 60 base.OnContentChanged(); 61 61 if (Content == null) { 62 qualityViewHost.Content = null;62 distanceView.Content = null; 63 63 pictureBox.Image = null; 64 64 tourViewHost.Content = null; … … 66 66 Visualizer.Tour = null; 67 67 } else { 68 qualityViewHost.Content = Content.TourLength;68 distanceView.Content = Content.TourLength; 69 69 if (Content.TSPData is CoordinatesTSPData coordTsp) 70 70 Visualizer.Coordinates = coordTsp.Coordinates; … … 79 79 protected override void SetEnabledStateOfControls() { 80 80 base.SetEnabledStateOfControls(); 81 qualityGroupBox.Enabled = Content != null;81 distanceView.Enabled = Content != null; 82 82 pictureBox.Enabled = Content != null; 83 tourGroupBox.Enabled = Content != null;84 83 } 85 84 … … 112 111 break; 113 112 case nameof(Content.TourLength): 114 qualityViewHost.Content = Content.TourLength;113 distanceView.Content = Content.TourLength; 115 114 break; 116 115 } -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
r17359 r17526 48 48 typeof (HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution), 49 49 typeof (HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution), 50 typeof (HeuristicLab.Problems.Orienteering.DistanceMatrix),51 50 typeof (HeuristicLab.Problems.TravelingSalesman.EuclideanTSPData), 52 51 }; -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs
r17457 r17526 34 34 35 35 private static readonly ProtoBufSerializer serializer = new ProtoBufSerializer(); 36 36 /* TODO: Refactor test 37 37 [TestMethod] 38 38 [TestCategory("Samples.Create")] … … 55 55 Assert.AreEqual(0.99563390794061979, SamplesUtils.GetDoubleResult(gpr, "Training R²")); 56 56 } 57 57 58 58 private GaussianProcessRegression CreateGaussianProcessRegressionSample() { 59 59 var gpr = new GaussianProcessRegression(); … … 78 78 return gpr; 79 79 } 80 */ 80 81 } 81 82 } -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs
r17226 r17526 24 24 using HEAL.Attic; 25 25 using HeuristicLab.Algorithms.VariableNeighborhoodSearch; 26 using HeuristicLab.Data;27 26 using HeuristicLab.Encodings.IntegerVectorEncoding; 28 27 using HeuristicLab.Problems.Orienteering; 28 using HeuristicLab.Problems.TravelingSalesman; 29 29 using Microsoft.VisualStudio.TestTools.UnitTesting; 30 30 … … 60 60 #region Problem Configuration 61 61 OrienteeringProblem opProblem = new OrienteeringProblem(); 62 opProblem.BestKnownQuality = new DoubleValue(1188); 63 opProblem.BestKnownSolution = new IntegerVector(new[] { 62 opProblem.OrienteeringProblemData = new OrienteeringProblemData( 63 new EuclideanTSPData("1_p64_t070", new double[,] { 64 { 7, 0 },{ 6, 1 },{ 8, 1 },{ 5, 2 },{ 7, 2 },{ 9, 2 },{ 4, 3 },{ 6, 3 },{ 8, 3 },{ 10, 3 },{ 3, 4 },{ 5, 4 },{ 7, 4 },{ 9, 4 },{ 11, 4 },{ 2, 5 },{ 4, 5 },{ 6, 5 },{ 8, 5 },{ 10, 5 },{ 12, 5 },{ 1, 6 },{ 3, 6 },{ 5, 6 },{ 7, 6 },{ 9, 6 },{ 11, 6 },{ 13, 6 },{ 0, 7 },{ 2, 7 },{ 4, 7 },{ 6, 7 },{ 8, 7 },{ 10, 7 },{ 12, 7 },{ 14, 7 },{ 1, 8 },{ 3, 8 },{ 5, 8 },{ 7, 8 },{ 9, 8 },{ 11, 8 },{ 13, 8 },{ 2, 9 },{ 4, 9 },{ 6, 9 },{ 8, 9 },{ 10, 9 },{ 12, 9 },{ 3, 10 },{ 5, 10 },{ 7, 10 },{ 9, 10 },{ 11, 10 },{ 4, 11 },{ 6, 11 },{ 8, 11 },{ 10, 11 },{ 5, 12 },{ 7, 12 },{ 9, 12 },{ 6, 13 },{ 8, 13 },{ 7, 14 } 65 }), startingPoint: 0, terminalPoint: 63, scores: new double[] { 66 0, 6, 6, 12, 6, 12, 18, 12, 12, 18, 24, 18, 12, 18, 24, 30, 24, 18, 18, 24, 30, 36, 30, 24, 18, 24, 30, 36, 42, 36, 30, 24, 24, 30, 36, 42, 36, 30, 24, 18, 24, 30, 36, 30, 24, 18, 18, 24, 30, 24, 18, 12, 18, 24, 18, 12, 12, 18, 12, 6, 12, 6, 6, 0 67 }, maxDist: 70, pointVisitCosts: 0); 68 69 opProblem.BestKnownQuality = 1188; 70 opProblem.BestKnownSolution = opProblem.OrienteeringProblemData.GetSolution(new IntegerVector(new[] { 64 71 0, 1, 3, 6, 11, 17, 24, 18, 13, 19, 14, 20, 26, 34, 27, 35, 42, 48, 53, 57, 52, 47, 41, 33, 25, 32, 40, 46, 39, 31, 38, 50, 44, 37, 30, 23, 16, 10, 15, 22, 29, 21, 28, 36, 43, 49, 54, 58, 61, 63 65 }); 66 opProblem.Coordinates = new DoubleMatrix(new double[,] { 67 { 7, 0 },{ 6, 1 },{ 8, 1 },{ 5, 2 },{ 7, 2 },{ 9, 2 },{ 4, 3 },{ 6, 3 },{ 8, 3 },{ 10, 3 },{ 3, 4 },{ 5, 4 },{ 7, 4 },{ 9, 4 },{ 11, 4 },{ 2, 5 },{ 4, 5 },{ 6, 5 },{ 8, 5 },{ 10, 5 },{ 12, 5 },{ 1, 6 },{ 3, 6 },{ 5, 6 },{ 7, 6 },{ 9, 6 },{ 11, 6 },{ 13, 6 },{ 0, 7 },{ 2, 7 },{ 4, 7 },{ 6, 7 },{ 8, 7 },{ 10, 7 },{ 12, 7 },{ 14, 7 },{ 1, 8 },{ 3, 8 },{ 5, 8 },{ 7, 8 },{ 9, 8 },{ 11, 8 },{ 13, 8 },{ 2, 9 },{ 4, 9 },{ 6, 9 },{ 8, 9 },{ 10, 9 },{ 12, 9 },{ 3, 10 },{ 5, 10 },{ 7, 10 },{ 9, 10 },{ 11, 10 },{ 4, 11 },{ 6, 11 },{ 8, 11 },{ 10, 11 },{ 5, 12 },{ 7, 12 },{ 9, 12 },{ 6, 13 },{ 8, 13 },{ 7, 14 } 68 }); 69 opProblem.MaximumDistance = 70; 70 opProblem.PointVisitingCosts = 0; 71 opProblem.Scores = new DoubleArray(new double[] { 72 0, 6, 6, 12, 6, 12, 18, 12, 12, 18, 24, 18, 12, 18, 24, 30, 24, 18, 18, 24, 30, 36, 30, 24, 18, 24, 30, 36, 42, 36, 30, 24, 24, 30, 36, 42, 36, 30, 24, 18, 24, 30, 36, 30, 24, 18, 18, 24, 30, 24, 18, 12, 18, 24, 18, 12, 12, 18, 12, 6, 12, 6, 6, 0 73 }); 74 opProblem.StartingPoint = 0; 75 opProblem.TerminalPoint = 63; 72 }), 1188, 1188, 69.882250993908514); 76 73 77 74 opProblem.Name = "1_p64_t070"; -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessRegressionTest.cs
r17226 r17526 39 39 40 40 private Exception ex; 41 41 /* TODO: Refactor test 42 42 [TestMethod] 43 43 [TestCategory("Algorithms.DataAnalysis")] … … 71 71 TestContext.WriteLine("Runtime: {0}", alg.ExecutionTime.ToString()); 72 72 } 73 73 */ 74 74 private void cv_ExceptionOccurred(object sender, EventArgs<Exception> e) { 75 75 ex = e.Value; -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/NcaAlgorithmTest.cs
r17226 r17526 30 30 [TestClass] 31 31 public class NcaAlgorithmTest { 32 /* TODO: Refactor test 32 33 [TestMethod] 33 34 [TestCategory("Algorithms.DataAnalysis")] … … 50 51 Assert.IsTrue(quality.Value < -98); 51 52 } 53 */ 52 54 } 53 55 }
Note: See TracChangeset
for help on using the changeset viewer.