Changeset 11327 for branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.cs
- Timestamp:
- 09/02/14 13:09:59 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringProblemView.cs
r11325 r11327 62 62 orienteeringSolutionView.Content = null; 63 63 } else { 64 orienteeringSolutionView.Content = new OrienteeringSolution( 65 Content.BestKnownSolution, Content.Coordinates, Content.StartingPointParameter.Value, Content.TerminalPointParameter.Value, Content.Scores, Content.BestKnownQuality, penalty: null); 64 orienteeringSolutionView.Content = new OrienteeringSolution(Content.BestKnownSolution, 65 Content.Coordinates, Content.StartingPointParameter.Value, Content.TerminalPointParameter.Value, Content.Scores); 66 if (Content.BestKnownSolution != null) { 67 EvaluateBestSolution(); 68 } 66 69 } 67 70 } … … 89 92 private void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) { 90 93 orienteeringSolutionView.Content.IntegerVector = Content.BestKnownSolution; 94 if (Content.BestKnownSolution != null) 95 EvaluateBestSolution(); 96 else { 97 var solution = orienteeringSolutionView.Content; 98 solution.Penalty = null; 99 solution.Distance = null; 100 } 101 } 102 103 private void EvaluateBestSolution() { 104 var evaluation = Content.Evaluator.Evaluate(Content.BestKnownSolution, Content.Scores, Content.DistanceMatrix, 105 Content.MaximumDistance, Content.PointVisitingCosts); 106 orienteeringSolutionView.Content.Quality = evaluation.Quality; 107 orienteeringSolutionView.Content.Penalty = evaluation.Penalty; 108 orienteeringSolutionView.Content.Distance = evaluation.Distance; 91 109 } 92 110 }
Note: See TracChangeset
for help on using the changeset viewer.