Changeset 7437
- Timestamp:
- 02/01/12 00:14:00 (13 years ago)
- Location:
- branches/GeneralizedQAP
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentArchiveView.Designer.cs
r7418 r7437 56 56 chartArea1.AxisX.Title = "FlowDistanceQuality"; 57 57 chartArea1.AxisY.Title = "InstallationQuality"; 58 chartArea1.CursorX.IsUserEnabled = true; 59 chartArea1.CursorX.IsUserSelectionEnabled = true; 60 chartArea1.CursorY.IsUserEnabled = true; 61 chartArea1.CursorY.IsUserSelectionEnabled = true; 58 62 chartArea1.Name = "ChartArea1"; 59 63 this.paretoFrontChart.ChartAreas.Add(chartArea1); … … 72 76 this.paretoFrontChart.TabIndex = 0; 73 77 this.paretoFrontChart.Text = "Pareto Front"; 78 this.paretoFrontChart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.paretoFrontChart_MouseDoubleClick); 74 79 // 75 80 // messageLabel -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentArchiveView.cs
r7418 r7437 22 22 using System; 23 23 using System.ComponentModel; 24 using System.Linq; 24 25 using System.Windows.Forms; 26 using System.Windows.Forms.DataVisualization.Charting; 25 27 using HeuristicLab.Collections; 26 28 using HeuristicLab.Core.Views; … … 83 85 if (Content == null) return; 84 86 foreach (var solution in Content.Solutions) { 85 if (solution.OverbookedCapacity.Value <= 0.0) 87 if (solution.OverbookedCapacity.Value <= 0.0) { 86 88 paretoFrontChart.Series[0].Points.AddXY(solution.FlowDistanceQuality.Value, solution.InstallationQuality.Value); 89 paretoFrontChart.Series[0].Points.Last().Tag = solution; 90 } 87 91 } 88 92 } finally { … … 92 96 } 93 97 } 98 99 private void paretoFrontChart_MouseDoubleClick(object sender, MouseEventArgs e) { 100 HitTestResult h = paretoFrontChart.HitTest(e.X, e.Y, ChartElementType.DataPoint); 101 if (h.ChartElementType == ChartElementType.DataPoint) { 102 var solution = (GQAPSolution)((DataPoint)h.Object).Tag; 103 var assignment = new GQAPAssignment(solution.Assignment, solution.Quality, solution.FlowDistanceQuality, solution.InstallationQuality, solution.OverbookedCapacity, Content.EquipmentNames, Content.LocationNames, Content.Distances, Content.Weights, Content.InstallationCosts, Content.Demands, Content.Capacities, Content.TransportationCosts, Content.OverbookedCapacityPenalty); 104 105 var view = MainFormManager.MainForm.ShowContent(assignment); 106 if (view != null) { 107 view.ReadOnly = this.ReadOnly; 108 view.Locked = this.Locked; 109 } 110 } 111 } 94 112 } 95 113 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs
r7432 r7437 165 165 GQAPAssignment assignment = BestSolutionParameter.ActualValue; 166 166 if (assignment == null) { 167 assignment = new GQAPAssignment((IntegerVector)assignments[bestIndex].Clone(), (DoubleValue)qualities[bestIndex].Clone(), flowDistanceQualities[bestIndex], overbookedCapacities[bestIndex], installationQualities[bestIndex], equipmentNames, locationNames, distances, weights, installationCosts, demands, capacities, transportationCosts, overbookedCapacityPenalty);167 assignment = new GQAPAssignment((IntegerVector)assignments[bestIndex].Clone(), (DoubleValue)qualities[bestIndex].Clone(), flowDistanceQualities[bestIndex], installationQualities[bestIndex], overbookedCapacities[bestIndex], equipmentNames, locationNames, distances, weights, installationCosts, demands, capacities, transportationCosts, overbookedCapacityPenalty); 168 168 assignment.Distances = distances; 169 169 BestSolutionParameter.ActualValue = assignment; -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/GQAPSolutionArchiveAnalyzer.cs
r7423 r7437 178 178 && front[i].InstallationQuality.Value > front[j].InstallationQuality.Value) { 179 179 front.RemoveAt(i); 180 j = i + 1;180 j = i; 181 181 } 182 182 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs
r7432 r7437 160 160 this.solution = new GQAPSolution(assignment, quality, flowDistanceQuality, installationQuality, overbookedCapacity); 161 161 } 162 public GQAPAssignment(IntegerVector assignment, DoubleValue quality, DoubleValue flowDistanceQuality, DoubleValue overbookedCapacity, DoubleValue installationQuality, StringArray equipmentNames, StringArray locationNames, DoubleMatrix distances, DoubleMatrix weights, DoubleMatrix installationCosts, DoubleArray demands, DoubleArray capacities, DoubleValue transportationCosts, DoubleValue overbookedCapacityPenalty)162 public GQAPAssignment(IntegerVector assignment, DoubleValue quality, DoubleValue flowDistanceQuality, DoubleValue installationQuality, DoubleValue overbookedCapacity, StringArray equipmentNames, StringArray locationNames, DoubleMatrix distances, DoubleMatrix weights, DoubleMatrix installationCosts, DoubleArray demands, DoubleArray capacities, DoubleValue transportationCosts, DoubleValue overbookedCapacityPenalty) 163 163 : this(assignment, quality, flowDistanceQuality, installationQuality, overbookedCapacity) { 164 this.equipmentNames = equipmentNames; 165 this.locationNames = locationNames; 164 166 this.distances = distances; 165 167 this.weights = weights; -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
r7432 r7437 229 229 230 230 private void InitializeOperators() { 231 Operators.Clear(); 231 232 Operators.Add(new BestGQAPSolutionAnalyzer()); 232 233 Operators.Add(new GQAPSolutionArchiveAnalyzer()); -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj
r7432 r7437 38 38 </PropertyGroup> 39 39 <ItemGroup> 40 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86"> 41 <SpecificVersion>False</SpecificVersion> 42 <Private>False</Private> 43 </Reference> 40 44 <Reference Include="HeuristicLab.Collections-3.3"> 41 45 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath> … … 90 94 <ItemGroup> 91 95 <Compile Include="Analyzers\BestGQAPSolutionAnalyzer.cs" /> 96 <Compile Include="Analyzers\GQAPPopulationDiversityAnalyzer.cs" /> 92 97 <Compile Include="Analyzers\GQAPSolutionArchiveAnalyzer.cs" /> 93 98 <Compile Include="Evaluators\GQAPNMoveEvaluator.cs" /> … … 98 103 <Compile Include="GQAPAssignmentArchive.cs" /> 99 104 <Compile Include="GQAPSolution.cs" /> 105 <Compile Include="Interfaces\IGQAPManipulator.cs" /> 100 106 <Compile Include="Interfaces\IQualitiesAwareGQAPOperator.cs" /> 101 107 <Compile Include="Interfaces\IAssignmentsAwareGQAPOperator.cs" /> … … 130 136 <Compile Include="Moves\StochasticNMoveSingleMoveGenerator.cs" /> 131 137 <Compile Include="Operators\ApproximateLocalSearch.cs" /> 138 <Compile Include="Operators\MultiGQAPCrossover.cs" /> 132 139 <Compile Include="Operators\GQAPPathRelinking.cs" /> 133 140 <Compile Include="Operators\GQAPStochasticSolutionCreator.cs" /> … … 137 144 <Compile Include="Operators\GQAPSolutionCreator.cs" /> 138 145 <Compile Include="Operators\GreedyRandomizedSolutionCreator.cs" /> 146 <Compile Include="Operators\MultiGQAPManipulator.cs" /> 139 147 <Compile Include="Operators\NMoveShakingOperator.cs" /> 140 148 <Compile Include="Operators\QualitySimilarityMerger.cs" /> -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPManipulator.cs
r7419 r7437 31 31 [Item("GQAPManipulator", "A base class for operators that manipulate assignment vectors of the GeneralizedQuadraticAssignment problems.")] 32 32 [StorableClass] 33 public abstract class GQAPManipulator : SingleSuccessorOperator, I AssignmentAwareGQAPOperator, IManipulator, IStochasticOperator {33 public abstract class GQAPManipulator : SingleSuccessorOperator, IGQAPManipulator, IAssignmentAwareGQAPOperator, IStochasticOperator { 34 34 public override bool CanChangeName { 35 35 get { return false; }
Note: See TracChangeset
for help on using the changeset viewer.