Changeset 7878
- Timestamp:
- 05/23/12 16:28:05 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.Designer.cs
r7823 r7878 68 68 // parameterCollectionView 69 69 // 70 this.parameterCollectionView.Location = new System.Drawing.Point(0, 3); 71 this.parameterCollectionView.Size = new System.Drawing.Size(497, 269); 70 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 71 this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill; 72 this.parameterCollectionView.Location = new System.Drawing.Point(3, 3); 73 this.parameterCollectionView.Size = new System.Drawing.Size(497, 274); 72 74 // 73 75 // nameTextBox … … 78 80 // tabControl 79 81 // 80 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 81 | System.Windows.Forms.AnchorStyles.Left)82 82 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 83 | System.Windows.Forms.AnchorStyles.Left) 84 | System.Windows.Forms.AnchorStyles.Right))); 83 85 this.tabControl.Controls.Add(this.problemTabPage); 84 86 this.tabControl.Controls.Add(this.visualizationTabPage); 85 this.tabControl.Location = new System.Drawing.Point(0, 2 9);87 this.tabControl.Location = new System.Drawing.Point(0, 27); 86 88 this.tabControl.Name = "tabControl"; 87 89 this.tabControl.SelectedIndex = 0; 88 this.tabControl.Size = new System.Drawing.Size(511, 30 4);90 this.tabControl.Size = new System.Drawing.Size(511, 306); 89 91 this.tabControl.TabIndex = 8; 90 92 // … … 95 97 this.problemTabPage.Name = "problemTabPage"; 96 98 this.problemTabPage.Padding = new System.Windows.Forms.Padding(3); 97 this.problemTabPage.Size = new System.Drawing.Size(503, 2 78);99 this.problemTabPage.Size = new System.Drawing.Size(503, 280); 98 100 this.problemTabPage.TabIndex = 0; 99 101 this.problemTabPage.Text = "Problem"; … … 106 108 this.visualizationTabPage.Name = "visualizationTabPage"; 107 109 this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3); 108 this.visualizationTabPage.Size = new System.Drawing.Size(503, 2 78);110 this.visualizationTabPage.Size = new System.Drawing.Size(503, 280); 109 111 this.visualizationTabPage.TabIndex = 1; 110 112 this.visualizationTabPage.Text = "Visualization"; … … 118 120 this.qapView.Location = new System.Drawing.Point(3, 3); 119 121 this.qapView.Name = "qapView"; 120 this.qapView.Size = new System.Drawing.Size(497, 2 72);122 this.qapView.Size = new System.Drawing.Size(497, 245); 121 123 this.qapView.TabIndex = 0; 122 124 this.qapView.Weights = null; … … 128 130 this.Name = "QuadraticAssignmentProblemView"; 129 131 this.problemInstanceSplitContainer.Panel1.ResumeLayout(false); 130 this.problemInstanceSplitContainer.Panel1.PerformLayout();131 132 this.problemInstanceSplitContainer.Panel2.ResumeLayout(false); 132 133 this.problemInstanceSplitContainer.Panel2.PerformLayout(); -
trunk/sources/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs
r7641 r7878 37 37 public QuadraticAssignmentProblemView() { 38 38 InitializeComponent(); 39 Controls.Remove(parameterCollectionView);40 parameterCollectionView.Dock = DockStyle.Fill;41 problemTabPage.Controls.Add(parameterCollectionView);42 39 } 43 40 -
trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/LocalImprovement/QAPExhaustiveSwap2LocalImprovement.cs
r7259 r7878 100 100 } 101 101 102 public override IOperation Apply() { 103 int maxIterations = MaximumIterationsParameter.ActualValue.Value; 104 Permutation assignment = AssignmentParameter.ActualValue; 105 bool maximization = MaximizationParameter.ActualValue.Value; 106 DoubleMatrix weights = WeightsParameter.ActualValue; 107 DoubleMatrix distances = DistancesParameter.ActualValue; 108 109 double evaluatedSolutions = 0.0; 102 public static double Improve(Permutation assignment, double quality, DoubleMatrix weights, DoubleMatrix distances, bool maximization, int maxIterations, out double evaluatedSolutions) { 103 evaluatedSolutions = 0.0; 110 104 double evalSolPerMove = 4.0 / assignment.Length; 111 105 … … 124 118 if (bestMove == null) break; 125 119 Swap2Manipulator.Apply(assignment, bestMove.Index1, bestMove.Index2); 126 QualityParameter.ActualValue.Value+= bestQuality;120 quality += bestQuality; 127 121 } 128 EvaluatedSolutionsParameter.ActualValue.Value += (int)Math.Ceiling(evaluatedSolutions); 122 return quality; 123 } 124 125 public override IOperation Apply() { 126 int maxIterations = MaximumIterationsParameter.ActualValue.Value; 127 Permutation assignment = AssignmentParameter.ActualValue; 128 bool maximization = MaximizationParameter.ActualValue.Value; 129 DoubleMatrix weights = WeightsParameter.ActualValue; 130 DoubleMatrix distances = DistancesParameter.ActualValue; 131 double quality = QualityParameter.ActualValue.Value; 132 133 double evaluations; 134 QualityParameter.ActualValue.Value = Improve(assignment, quality, weights, distances, maximization, maxIterations, out evaluations); 135 EvaluatedSolutionsParameter.ActualValue.Value += (int)Math.Ceiling(evaluations); 129 136 return base.Apply(); 130 137 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPLIBInstancesTest.cs
r7558 r7878 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO;25 24 using System.Linq; 26 25 using System.Text; … … 176 175 var qap = new QuadraticAssignmentProblem(); 177 176 var failedInstances = new StringBuilder(); 178 string tempPath = Path.GetTempPath();179 177 180 178 var instances = provider.GetDataDescriptors(); … … 196 194 var qap = new QuadraticAssignmentProblem(); 197 195 var failedInstances = new StringBuilder(); 198 string tempPath = Path.GetTempPath();199 196 200 197 var instances = provider.GetDataDescriptors();
Note: See TracChangeset
for help on using the changeset viewer.