- Timestamp:
- 09/01/10 11:13:46 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting.Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting.Views
-
Property
svn:mergeinfo
set to
/branches/VRP/HeuristicLab.Problems.VehicleRouting.Views merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.cs
r4185 r4352 27 27 using HeuristicLab.MainForm; 28 28 using HeuristicLab.Problems.VehicleRouting.Encodings; 29 using HeuristicLab.Parameters; 30 using System.Linq; 29 31 30 32 namespace HeuristicLab.Problems.VehicleRouting.Views { … … 67 69 } else { 68 70 GenerateImage(); 69 tourViewHost.Content = Content.Solution;71 UpdateTourView(); 70 72 } 71 73 } … … 80 82 pictureBox.Enabled = Content != null; 81 83 tourGroupBox.Enabled = Content != null; 84 } 85 86 private void UpdateTourView() { 87 tourGridView.Rows.Clear(); 88 tourGridView.ColumnCount = Content.Coordinates.Rows - 1; 89 90 if (Content != null && Content.Solution != null) { 91 foreach (Tour tour in Content.Solution.GetTours(new ValueLookupParameter<DoubleMatrix>("DistanceMatrix", Content.DistanceMatrix))) { 92 int row = tourGridView.Rows.Add(); 93 int cell = 0; 94 foreach (int city in tour.Cities) { 95 tourGridView.Rows[row].Cells[cell].Value = city; 96 cell++; 97 } 98 } 99 } 82 100 } 83 101 … … 119 137 if (Content.Solution != null) { 120 138 int currentTour = 0; 121 foreach (Tour tour in Content.Solution. Tours) {139 foreach (Tour tour in Content.Solution.GetTours(new ValueLookupParameter<DoubleMatrix>("DistanceMatrix", distanceMatrix))) { 122 140 double t = 0.0; 123 141 Point[] tourPoints = new Point[tour.Cities.Count + 2]; … … 202 220 else { 203 221 GenerateImage(); 204 tourViewHost.Content = Content.Solution;222 UpdateTourView(); 205 223 } 206 224 }
Note: See TracChangeset
for help on using the changeset viewer.