Changeset 7438
- Timestamp:
- 02/01/12 13:28:54 (13 years ago)
- Location:
- branches/GeneralizedQAP
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/GRASPWithPathRelinking.cs
r7420 r7438 215 215 param.Depth = 1; 216 216 Analyzer.Operators.Add(a); 217 Analyzer.Operators.SetItemCheckedState(a, a.EnabledByDefault); 217 218 } 218 219 InitializeFromInstallation(LocalImprovementParameter, x => x.ProblemType.IsAssignableFrom(Problem.GetType())); -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentArchiveView.Designer.cs
r7437 r7438 56 56 chartArea1.AxisX.Title = "FlowDistanceQuality"; 57 57 chartArea1.AxisY.Title = "InstallationQuality"; 58 chartArea1.CursorX.IsUserEnabled = true;59 58 chartArea1.CursorX.IsUserSelectionEnabled = true; 60 chartArea1.CursorY.IsUserEnabled = true;61 59 chartArea1.CursorY.IsUserSelectionEnabled = true; 62 60 chartArea1.Name = "ChartArea1"; -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.Designer.cs
r7415 r7438 50 50 this.assignmentGroupBox = new System.Windows.Forms.GroupBox(); 51 51 this.characteristicsGroupBox = new System.Windows.Forms.GroupBox(); 52 this.label7 = new System.Windows.Forms.Label(); 53 this.overbookedCapacityLabel = new System.Windows.Forms.Label(); 54 this.label5 = new System.Windows.Forms.Label(); 55 this.installationQualityLabel = new System.Windows.Forms.Label(); 56 this.label3 = new System.Windows.Forms.Label(); 52 57 this.flowDistanceQualityLabel = new System.Windows.Forms.Label(); 53 this.label3 = new System.Windows.Forms.Label();54 this.installationQualityLabel = new System.Windows.Forms.Label();55 this.label5 = new System.Windows.Forms.Label();56 this.overbookedCapacityLabel = new System.Windows.Forms.Label();57 this.label7 = new System.Windows.Forms.Label();58 58 this.assignmentGroupBox.SuspendLayout(); 59 59 this.characteristicsGroupBox.SuspendLayout(); … … 70 70 this.assignmentTreeView.Size = new System.Drawing.Size(228, 331); 71 71 this.assignmentTreeView.TabIndex = 3; 72 this.assignmentTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.assignmentTreeView_AfterSelect); 73 this.assignmentTreeView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.assignmentTreeView_MouseUp); 72 74 // 73 75 // label1 … … 123 125 this.characteristicsGroupBox.Text = "Characteristics"; 124 126 // 127 // label7 128 // 129 this.label7.AutoSize = true; 130 this.label7.Location = new System.Drawing.Point(6, 76); 131 this.label7.Margin = new System.Windows.Forms.Padding(3); 132 this.label7.Name = "label7"; 133 this.label7.Size = new System.Drawing.Size(71, 13); 134 this.label7.TabIndex = 0; 135 this.label7.Text = "Overbooking:"; 136 // 137 // overbookedCapacityLabel 138 // 139 this.overbookedCapacityLabel.AutoSize = true; 140 this.overbookedCapacityLabel.Location = new System.Drawing.Point(91, 76); 141 this.overbookedCapacityLabel.Margin = new System.Windows.Forms.Padding(3); 142 this.overbookedCapacityLabel.Name = "overbookedCapacityLabel"; 143 this.overbookedCapacityLabel.Size = new System.Drawing.Size(10, 13); 144 this.overbookedCapacityLabel.TabIndex = 4; 145 this.overbookedCapacityLabel.Text = "-"; 146 // 147 // label5 148 // 149 this.label5.AutoSize = true; 150 this.label5.Location = new System.Drawing.Point(6, 57); 151 this.label5.Margin = new System.Windows.Forms.Padding(3); 152 this.label5.Name = "label5"; 153 this.label5.Size = new System.Drawing.Size(60, 13); 154 this.label5.TabIndex = 0; 155 this.label5.Text = "Installation:"; 156 // 157 // installationQualityLabel 158 // 159 this.installationQualityLabel.AutoSize = true; 160 this.installationQualityLabel.Location = new System.Drawing.Point(91, 57); 161 this.installationQualityLabel.Margin = new System.Windows.Forms.Padding(3); 162 this.installationQualityLabel.Name = "installationQualityLabel"; 163 this.installationQualityLabel.Size = new System.Drawing.Size(10, 13); 164 this.installationQualityLabel.TabIndex = 4; 165 this.installationQualityLabel.Text = "-"; 166 // 167 // label3 168 // 169 this.label3.AutoSize = true; 170 this.label3.Location = new System.Drawing.Point(6, 38); 171 this.label3.Margin = new System.Windows.Forms.Padding(3); 172 this.label3.Name = "label3"; 173 this.label3.Size = new System.Drawing.Size(79, 13); 174 this.label3.TabIndex = 0; 175 this.label3.Text = "Flow/Distance:"; 176 // 125 177 // flowDistanceQualityLabel 126 178 // … … 132 184 this.flowDistanceQualityLabel.TabIndex = 4; 133 185 this.flowDistanceQualityLabel.Text = "-"; 134 //135 // label3136 //137 this.label3.AutoSize = true;138 this.label3.Location = new System.Drawing.Point(6, 38);139 this.label3.Margin = new System.Windows.Forms.Padding(3);140 this.label3.Name = "label3";141 this.label3.Size = new System.Drawing.Size(79, 13);142 this.label3.TabIndex = 0;143 this.label3.Text = "Flow/Distance:";144 //145 // installationQualityLabel146 //147 this.installationQualityLabel.AutoSize = true;148 this.installationQualityLabel.Location = new System.Drawing.Point(91, 57);149 this.installationQualityLabel.Margin = new System.Windows.Forms.Padding(3);150 this.installationQualityLabel.Name = "installationQualityLabel";151 this.installationQualityLabel.Size = new System.Drawing.Size(10, 13);152 this.installationQualityLabel.TabIndex = 4;153 this.installationQualityLabel.Text = "-";154 //155 // label5156 //157 this.label5.AutoSize = true;158 this.label5.Location = new System.Drawing.Point(6, 57);159 this.label5.Margin = new System.Windows.Forms.Padding(3);160 this.label5.Name = "label5";161 this.label5.Size = new System.Drawing.Size(60, 13);162 this.label5.TabIndex = 0;163 this.label5.Text = "Installation:";164 //165 // overbookedCapacityLabel166 //167 this.overbookedCapacityLabel.AutoSize = true;168 this.overbookedCapacityLabel.Location = new System.Drawing.Point(91, 76);169 this.overbookedCapacityLabel.Margin = new System.Windows.Forms.Padding(3);170 this.overbookedCapacityLabel.Name = "overbookedCapacityLabel";171 this.overbookedCapacityLabel.Size = new System.Drawing.Size(10, 13);172 this.overbookedCapacityLabel.TabIndex = 4;173 this.overbookedCapacityLabel.Text = "-";174 //175 // label7176 //177 this.label7.AutoSize = true;178 this.label7.Location = new System.Drawing.Point(6, 76);179 this.label7.Margin = new System.Windows.Forms.Padding(3);180 this.label7.Name = "label7";181 this.label7.Size = new System.Drawing.Size(71, 13);182 this.label7.TabIndex = 0;183 this.label7.Text = "Overbooking:";184 186 // 185 187 // GQAPAssignmentView -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.cs
r7418 r7438 23 23 using System.Collections.Generic; 24 24 using System.ComponentModel; 25 using System.Drawing; 25 26 using System.Linq; 26 27 using System.Windows.Forms; … … 34 35 [Content(typeof(GQAPAssignment), IsDefaultView = true)] 35 36 public partial class GQAPAssignmentView : ItemView { 37 private static readonly double BrightnessLevel = 0.5; 38 36 39 public new GQAPAssignment Content { 37 40 get { return (GQAPAssignment)base.Content; } … … 69 72 } 70 73 71 #region Event Handlers74 #region Content Event Handlers 72 75 private void Content_PropertyChanged(object sender, PropertyChangedEventArgs e) { 73 76 switch (e.PropertyName) { … … 89 92 #endregion 90 93 94 #region Event Handlers 95 private void assignmentTreeView_AfterSelect(object sender, TreeViewEventArgs e) { 96 if (Content != null) { 97 assignmentTreeView.BeginUpdate(); 98 try { 99 if (assignmentTreeView.SelectedNode == null) { 100 ColorByInstallationCosts(); 101 } else { 102 var equipmentNode = (assignmentTreeView.SelectedNode as EquipmentNode); 103 if (equipmentNode != null) { 104 ColorByWeight(equipmentNode); 105 } 106 var locationNode = (assignmentTreeView.SelectedNode as LocationNode); 107 if (locationNode != null) { 108 ColorByWeight(locationNode); 109 } 110 } 111 } finally { assignmentTreeView.EndUpdate(); } 112 } 113 } 114 115 private void assignmentTreeView_MouseUp(object sender, MouseEventArgs e) { 116 var hit = assignmentTreeView.HitTest(e.X, e.Y); 117 if (hit.Node == null || hit.Location == TreeViewHitTestLocations.None || hit.Location == TreeViewHitTestLocations.RightOfLabel) { 118 assignmentTreeView.SelectedNode = null; 119 ColorByInstallationCosts(); 120 } 121 } 122 #endregion 123 124 #region Helpers 91 125 private void UpdateQuality() { 92 126 if (InvokeRequired) Invoke((Action)UpdateQuality); … … 145 179 if (Content.LocationNames != null && Content.LocationNames.Length > assignment[i]) 146 180 locationName = Content.LocationNames[assignment[i]]; 147 locationNodes.Add(assignment[i], new TreeNode(locationName));181 locationNodes.Add(assignment[i], new LocationNode(assignment[i], locationName)); 148 182 } 149 183 string equipmentName = i.ToString(); 150 184 if (Content.EquipmentNames != null && Content.EquipmentNames.Length > i) 151 185 equipmentName = Content.EquipmentNames[i]; 152 locationNodes[assignment[i]].Nodes.Add( equipmentName);186 locationNodes[assignment[i]].Nodes.Add(new EquipmentNode(i, equipmentName)); 153 187 } 154 188 … … 159 193 node.Expand(); 160 194 } 195 ColorByInstallationCosts(); 161 196 } finally { assignmentTreeView.EndUpdate(); } 162 197 } 163 198 } 164 199 } 200 201 private void ColorByInstallationCosts() { 202 var installationCosts = new Dictionary<EquipmentNode, double>(); 203 foreach (var node in GetAllSubNodes(assignmentTreeView.Nodes).OfType<EquipmentNode>()) { 204 int location = Content.Solution.Assignment[node.Equipment]; 205 installationCosts[node] = Content.InstallationCosts[node.Equipment, location]; 206 } 207 double max = installationCosts.Values.Max(); 208 foreach (var kvp in installationCosts) { 209 if (max == 0) { 210 kvp.Key.BackColor = assignmentTreeView.BackColor; 211 kvp.Key.ForeColor = assignmentTreeView.ForeColor; 212 } 213 int colorComponent = (int)(255 * Math.Pow((max - kvp.Value) / max, 2)); 214 kvp.Key.BackColor = Color.FromArgb(255, colorComponent, colorComponent); 215 if (kvp.Key.BackColor.GetBrightness() < BrightnessLevel) kvp.Key.ForeColor = Color.White; 216 else kvp.Key.ForeColor = Color.Black; 217 } 218 } 219 220 private void ColorByWeight(EquipmentNode selectedNode) { 221 int equipment = selectedNode.Equipment; 222 double rowSum = 0, colSum = 0; 223 for (int i = 0; i < Content.Weights.Columns; i++) 224 if (i != equipment) rowSum += Content.Weights[equipment, i]; 225 for (int i = 0; i < Content.Weights.Rows; i++) 226 if (i != equipment) colSum += Content.Weights[i, equipment]; 227 228 var otherEquipments = GetAllSubNodes(assignmentTreeView.Nodes) 229 .OfType<EquipmentNode>() 230 .Where(x => x != selectedNode); 231 232 selectedNode.BackColor = assignmentTreeView.BackColor; 233 selectedNode.ForeColor = assignmentTreeView.ForeColor; 234 foreach (var other in otherEquipments) { 235 if (rowSum == 0 && colSum == 0) { 236 other.BackColor = assignmentTreeView.BackColor; 237 other.ForeColor = assignmentTreeView.ForeColor; 238 } else { 239 double rowInvProportion = rowSum == 0 ? 1.0 : (rowSum - Content.Weights[equipment, other.Equipment]) / rowSum; 240 double colInvProportion = colSum == 0 ? 1.0 : (colSum - Content.Weights[other.Equipment, equipment]) / colSum; 241 int colorComponent = (int)(255 * Math.Pow(Math.Min(rowInvProportion, colInvProportion), 2)); 242 other.BackColor = Color.FromArgb(colorComponent, 255, colorComponent); 243 if (other.BackColor.GetBrightness() < BrightnessLevel) other.ForeColor = Color.White; 244 else other.ForeColor = Color.Black; 245 } 246 } 247 } 248 249 private void ColorByWeight(LocationNode selectedNode) { 250 var equipments = new HashSet<int>(Content.Solution.Assignment.Select((v, i) => new { Index = i, Value = v }) 251 .Where(x => x.Value == selectedNode.Location).Select(x => x.Index)); 252 var rowSums = new Dictionary<int, double>(equipments.Count); 253 var colSums = new Dictionary<int, double>(equipments.Count); 254 foreach (var e in equipments) { 255 rowSums[e] = 0; 256 colSums[e] = 0; 257 for (int i = 0; i < Content.Weights.Columns; i++) { 258 if (!equipments.Contains(i)) rowSums[e] += Content.Weights[e, i]; 259 if (!equipments.Contains(i)) colSums[e] += Content.Weights[i, e]; 260 } 261 } 262 var equipmentNodes = GetAllSubNodes(assignmentTreeView.Nodes) 263 .OfType<EquipmentNode>(); 264 265 var relevantEquipments = new HashSet<int>(equipments.Where(x => rowSums[x] > 0 || colSums[x] > 0)); 266 foreach (var other in equipmentNodes) { 267 if (!relevantEquipments.Any() || equipments.Contains(other.Equipment)) { 268 other.BackColor = assignmentTreeView.BackColor; 269 other.ForeColor = assignmentTreeView.ForeColor; 270 } else { 271 double rowInvProportion = relevantEquipments.Min(x => rowSums[x] == 0 ? 1.0 : (rowSums[x] - Content.Weights[x, other.Equipment]) / rowSums[x]); 272 double colInvProportion = relevantEquipments.Min(x => colSums[x] == 0 ? 1.0 : (colSums[x] - Content.Weights[other.Equipment, x]) / colSums[x]); 273 int colorComponent = (int)(255 * Math.Pow(Math.Min(rowInvProportion, colInvProportion), 2)); 274 other.BackColor = Color.FromArgb(colorComponent, 255, colorComponent); 275 if (other.BackColor.GetBrightness() < BrightnessLevel) other.ForeColor = Color.White; 276 else other.ForeColor = Color.Black; 277 } 278 } 279 } 280 281 private IEnumerable<TreeNode> GetAllSubNodes(TreeNodeCollection nodes) { 282 foreach (TreeNode node in nodes) { 283 yield return node; 284 foreach (TreeNode subNode in GetAllSubNodes(node.Nodes)) 285 yield return subNode; 286 } 287 } 288 #endregion 289 290 #region Helper Classes 291 private class LocationNode : TreeNode { 292 public int Location { get; set; } 293 294 public LocationNode() : base() { } 295 public LocationNode(int location, string name) 296 : base(name) { 297 Location = location; 298 } 299 } 300 301 private class EquipmentNode : TreeNode { 302 public int Equipment { get; set; } 303 304 public EquipmentNode() : base() { } 305 public EquipmentNode(int equipment, string name) 306 : base(name) { 307 Equipment = equipment; 308 } 309 } 310 #endregion 165 311 } 166 312 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs
r7437 r7438 41 41 IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator, ITransportationCostsAwareGQAPOperator, 42 42 IOverbookedCapacityPenaltyAwareGQAPOperator, IEquipmentNamesAwareGQAPOperator, ILocationNamesAwareGQAPOperator, 43 IBestKnownQualityAwareGQAPOperator, IBestKnownSolutionAwareGQAPOperator, IAnalyzer { 43 IBestKnownQualityAwareGQAPOperator, IBestKnownSolutionAwareGQAPOperator, IBestKnownSolutionsAwareGQAPOperator, 44 IAnalyzer { 44 45 45 46 public bool EnabledByDefault { … … 47 48 } 48 49 50 #region Parameter Properties 49 51 public IScopeTreeLookupParameter<IntegerVector> AssignmentParameter { 50 52 get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; } … … 98 100 get { return (ILookupParameter<IntegerVector>)Parameters["BestKnownSolution"]; } 99 101 } 102 public ILookupParameter<GQAPAssignmentArchive> BestKnownSolutionsParameter { 103 get { return (ILookupParameter<GQAPAssignmentArchive>)Parameters["BestKnownSolutions"]; } 104 } 100 105 public ILookupParameter<GQAPAssignment> BestSolutionParameter { 101 106 get { return (ILookupParameter<GQAPAssignment>)Parameters["BestSolution"]; } … … 104 109 get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; } 105 110 } 111 #endregion 106 112 107 113 [StorableConstructor] … … 130 136 Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", GeneralizedQuadraticAssignmentProblem.BestKnownQualityDescription)); 131 137 Parameters.Add(new LookupParameter<IntegerVector>("BestKnownSolution", GeneralizedQuadraticAssignmentProblem.BestKnownSolutionDescription)); 138 Parameters.Add(new LookupParameter<GQAPAssignmentArchive>("BestKnownSolutions", GeneralizedQuadraticAssignmentProblem.BestKnownSolutionsDescription)); 132 139 Parameters.Add(new LookupParameter<GQAPAssignment>("BestSolution", "The best GQAP solution found so far.")); 133 140 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best GQAP solution should be stored.")); … … 152 159 var maximization = MaximizationParameter.ActualValue.Value; 153 160 var bestKnownQuality = BestKnownQualityParameter.ActualValue; 161 var bestKnownSolutions = BestKnownSolutionsParameter.ActualValue; 154 162 155 163 int bestIndex; … … 186 194 } 187 195 196 GQAPAssignmentArchive archive = BestKnownSolutionsParameter.ActualValue; 197 if (archive == null) { 198 archive = new GQAPAssignmentArchive(equipmentNames, locationNames, distances, weights, installationCosts, demands, capacities, transportationCosts, overbookedCapacityPenalty); 199 BestKnownSolutionsParameter.ActualValue = archive; 200 } else { 201 var solutions = Enumerable.Range(0, assignments.Length) 202 .Select(i => new GQAPSolution(assignments[i], qualities[i], flowDistanceQualities[i], installationQualities[i], overbookedCapacities[i])) 203 .Concat(archive.Solutions); 204 archive.Solutions = GQAPSolutionArchiveUpdater.GetFeasibleParetoFront(solutions); 205 } 206 188 207 return base.Apply(); 189 208 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/GQAPPopulationDiversityAnalyzer.cs
r7437 r7438 38 38 } 39 39 public new ILookupParameter<BoolValue> MaximizationParameter { 40 get { return MaximizationParameter; }40 get { return base.MaximizationParameter; } 41 41 } 42 42 public new IScopeTreeLookupParameter<DoubleValue> QualityParameter { 43 get { return QualityParameter; }43 get { return base.QualityParameter; } 44 44 } 45 45 public IScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter { -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/GQAPSolutionArchiveAnalyzer.cs
r7437 r7438 20 20 #endregion 21 21 22 using System.Linq; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 163 164 } 164 165 165 ItemList<GQAPSolution> front = new ItemList<GQAPSolution>(archive.Solutions); 166 for (int i = 0; i < assignments.Length; i++) { 167 if (overbookedCapacities[i].Value <= 0.0) 168 front.Add(new GQAPSolution(assignments[i], qualities[i], flowDistanceQualities[i], installationQualities[i], overbookedCapacities[i])); 169 } 170 171 for (int i = 0; i < front.Count - 1; i++) { 172 for (int j = i + 1; j < front.Count; j++) { 173 if (front[i].FlowDistanceQuality.Value < front[j].FlowDistanceQuality.Value 174 && front[i].InstallationQuality.Value < front[j].InstallationQuality.Value) { 175 front.RemoveAt(j); 176 j--; 177 } else if (front[i].FlowDistanceQuality.Value > front[j].FlowDistanceQuality.Value 178 && front[i].InstallationQuality.Value > front[j].InstallationQuality.Value) { 179 front.RemoveAt(i); 180 j = i; 181 } 182 } 183 } 184 185 archive.Solutions = front; 166 var solutions = Enumerable.Range(0, assignments.Length) 167 .Select(i => new GQAPSolution(assignments[i], qualities[i], flowDistanceQualities[i], installationQualities[i], overbookedCapacities[i])) 168 .Concat(archive.Solutions); 169 archive.Solutions = GQAPSolutionArchiveUpdater.GetFeasibleParetoFront(solutions); 186 170 187 171 return base.Apply(); -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
r7437 r7438 55 55 public static readonly string BestKnownQualityDescription = "The best known quality (if available)."; 56 56 public static readonly string BestKnownSolutionDescription = "The best known solution (if available)."; 57 public static readonly string BestKnownSolutionsDescription = "Contains an archive of best-known solutions regarding flow-distance quality and installation quality."; 57 58 public static readonly string EquipmentNamesDescription = "Optional: A list of names that describes the equipments."; 58 59 public static readonly string LocationNamesDescription = "Optional: A list of names that describes the locations."; … … 83 84 public OptionalValueParameter<IItem> BestKnownSolutionParameter { 84 85 get { return (OptionalValueParameter<IItem>)Parameters["BestKnownSolution"]; } 86 } 87 public OptionalValueParameter<GQAPAssignmentArchive> BestKnownSolutionsParameter { 88 get { return (OptionalValueParameter<GQAPAssignmentArchive>)Parameters["BestKnownSolutions"]; } 85 89 } 86 90 public OptionalValueParameter<StringArray> EquipmentNamesParameter { … … 146 150 public GeneralizedQuadraticAssignmentProblem() 147 151 : base(new GQAPEvaluator(), new RandomSolutionCreator()) { 148 Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", WeightsDescription, new DoubleMatrix() ));149 Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", DistancesDescription, new DoubleMatrix() ));150 Parameters.Add(new ValueParameter<DoubleMatrix>("InstallationCosts", InstallationCostsDescription, new DoubleMatrix() ));152 Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", WeightsDescription, new DoubleMatrix(), false)); 153 Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", DistancesDescription, new DoubleMatrix(), false)); 154 Parameters.Add(new ValueParameter<DoubleMatrix>("InstallationCosts", InstallationCostsDescription, new DoubleMatrix(), false)); 151 155 Parameters.Add(new FixedValueParameter<DoubleValue>("TransportationCosts", TransportationCostsDescription, new DoubleValue(1))); 152 156 Parameters.Add(new FixedValueParameter<DoubleValue>("OverbookedCapacityPenalty", OverbookedCapacityPenaltyDescription, new DoubleValue(1000))); 153 Parameters.Add(new ValueParameter<DoubleArray>("Demands", DemandsDescription, new DoubleArray())); 154 Parameters.Add(new ValueParameter<DoubleArray>("Capacities", CapacitiesDescription, new DoubleArray())); 155 Parameters.Add(new OptionalValueParameter<IItem>("BestKnownSolution", BestKnownSolutionDescription, null)); 157 Parameters.Add(new ValueParameter<DoubleArray>("Demands", DemandsDescription, new DoubleArray(), false)); 158 Parameters.Add(new ValueParameter<DoubleArray>("Capacities", CapacitiesDescription, new DoubleArray(), false)); 159 Parameters.Add(new OptionalValueParameter<IItem>("BestKnownSolution", BestKnownSolutionDescription, null, false)); 160 Parameters.Add(new OptionalValueParameter<GQAPAssignmentArchive>("BestKnownSolutions", BestKnownSolutionsDescription, null, false)); 156 161 Parameters.Add(new OptionalValueParameter<StringArray>("EquipmentNames", EquipmentNamesDescription, null, false)); 157 162 Parameters.Add(new OptionalValueParameter<StringArray>("LocationNames", LocationNamesDescription, null, false)); 163 164 BestKnownQualityParameter.Value = null; 158 165 159 166 WeightsParameter.ReactOnValueToStringChangedAndValueItemImageChanged = false; … … 230 237 private void InitializeOperators() { 231 238 Operators.Clear(); 232 Operators.Add(new BestGQAPSolutionAnalyzer());233 Operators.Add(new GQAPSolutionArchiveAnalyzer());234 239 Operators.AddRange(ApplicationManager.Manager.GetInstances<IGQAPOperator>()); 235 240 Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>()); … … 254 259 foreach (var op in operators.OfType<IBestKnownSolutionAwareGQAPOperator>()) { 255 260 op.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name; 261 } 262 foreach (var op in operators.OfType<IBestKnownSolutionsAwareGQAPOperator>()) { 263 op.BestKnownSolutionsParameter.ActualName = BestKnownSolutionsParameter.Name; 256 264 } 257 265 foreach (var op in operators.OfType<ICapacitiesAwareGQAPOperator>()) { -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj
r7437 r7438 94 94 <ItemGroup> 95 95 <Compile Include="Analyzers\BestGQAPSolutionAnalyzer.cs" /> 96 <Compile Include="Analyzers\GQAPSolutionArchiveUpdater.cs" /> 96 97 <Compile Include="Analyzers\GQAPPopulationDiversityAnalyzer.cs" /> 97 98 <Compile Include="Analyzers\GQAPSolutionArchiveAnalyzer.cs" /> … … 103 104 <Compile Include="GQAPAssignmentArchive.cs" /> 104 105 <Compile Include="GQAPSolution.cs" /> 106 <Compile Include="Interfaces\IBestKnownSolutionsAwareGQAPOperator.cs" /> 105 107 <Compile Include="Interfaces\IGQAPManipulator.cs" /> 106 108 <Compile Include="Interfaces\IQualitiesAwareGQAPOperator.cs" />
Note: See TracChangeset
for help on using the changeset viewer.