- Timestamp:
- 08/13/11 10:23:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs
r6659 r6660 22 22 using System; 23 23 using System.Drawing; 24 using System.Linq; 24 25 using System.Windows.Forms; 25 26 using HeuristicLab.Common.Resources; 27 using HeuristicLab.Core; 26 28 using HeuristicLab.Core.Views; 27 29 using HeuristicLab.Data; 30 using HeuristicLab.Encodings.PermutationEncoding; 28 31 using HeuristicLab.MainForm; 29 32 using HeuristicLab.MainForm.WindowsForms; … … 106 109 string instance = instancesComboBox.SelectedItem as string; 107 110 try { 108 //Content.LoadEmbeddedInstance(instance);109 111 using (QAPServiceReference.QAPClient client = new QAPServiceReference.QAPClient()) { 110 112 var data = client.GetProblemInstanceData(instance); … … 125 127 Content.Weights = weights; 126 128 Content.Distances = distances; 129 130 Content.BestKnownQualityParameter.Value = null; 131 Content.BestKnownSolution = null; 132 Content.BestKnownSolutions = new ItemSet<Permutation>(); 133 var solutions = client.GetBestSolutionsData(instance); 134 if (solutions.Any()) { 135 Content.BestKnownQualityParameter.Value = new DoubleValue(solutions.First().Quality); 136 Content.BestKnownSolution = new Permutation(PermutationTypes.Absolute, solutions.First().Assignment); 137 foreach (var solution in solutions) { 138 Content.BestKnownSolutions.Add(new Permutation(PermutationTypes.Absolute, solution.Assignment)); 139 } 140 } 127 141 } 128 142 } catch (Exception ex) {
Note: See TracChangeset
for help on using the changeset viewer.