Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3692 for trunk/sources


Ignore:
Timestamp:
05/07/10 02:43:05 (15 years ago)
Author:
abeham
Message:

#924

  • cloned variables in BestTSPSolutionAnalyzer instead of referencing them
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs

    r3663 r3692  
    7272      PathTSPTour tour = BestSolutionParameter.ActualValue;
    7373      if (tour == null) {
    74         tour = new PathTSPTour(coordinates, permutations[i], qualities[i]);
     74        tour = new PathTSPTour(coordinates, (Permutation)permutations[i].Clone(), new DoubleValue(qualities[i].Value));
    7575        BestSolutionParameter.ActualValue = tour;
    7676        results.Add(new Result("Best TSP Solution", tour));
     
    7878        if (tour.Quality.Value > qualities[i].Value) {
    7979          tour.Coordinates = coordinates;
    80           tour.Permutation = permutations[i];
    81           tour.Quality = qualities[i];
     80          tour.Permutation = (Permutation)permutations[i].Clone();
     81          tour.Quality.Value = qualities[i].Value;
    8282          results["Best TSP Solution"].Value = tour;
    8383        }
Note: See TracChangeset for help on using the changeset viewer.