Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/05/16 16:09:10 (8 years ago)
Author:
abeham
Message:

#2701: fixed bugs in tsp

Location:
branches/MemPRAlgorithm/HeuristicLab.Problems.TravelingSalesman/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/MemPRAlgorithm/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs

    r14185 r14455  
    5353      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
    5454    }
    55     public LookupParameter<PathTSPTour> BestSolutionParameter {
    56       get { return (LookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
     55    public LookupParameter<PathTSPTour> BestTSPSolutionParameter {
     56      get { return (LookupParameter<PathTSPTour>)Parameters["BestTSPSolution"]; }
    5757    }
    5858    public ValueLookupParameter<ResultCollection> ResultsParameter {
     
    7878      Parameters.Add(new ScopeTreeLookupParameter<Permutation>("Permutation", "The TSP solutions given in path representation from which the best solution should be analyzed."));
    7979      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the TSP solutions which should be analyzed."));
    80       Parameters.Add(new LookupParameter<PathTSPTour>("BestSolution", "The best TSP solution."));
     80      Parameters.Add(new LookupParameter<PathTSPTour>("BestTSPSolution", "The best TSP solution."));
    8181      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best TSP solution should be stored."));
    8282      Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this TSP instance."));
     
    8787      PermutationParameter.Hidden = true;
    8888      QualityParameter.Hidden = true;
    89       BestSolutionParameter.Hidden = true;
     89      BestTSPSolutionParameter.Hidden = true;
    9090      ResultsParameter.Hidden = true;
    9191      BestKnownQualityParameter.Hidden = true;
     
    113113      }
    114114
    115       PathTSPTour tour = BestSolutionParameter.ActualValue;
     115      PathTSPTour tour = BestTSPSolutionParameter.ActualValue;
    116116      if (tour == null) {
    117117        tour = new PathTSPTour(coordinates, (Permutation)permutations[i].Clone(), new DoubleValue(qualities[i].Value));
    118         BestSolutionParameter.ActualValue = tour;
     118        BestTSPSolutionParameter.ActualValue = tour;
    119119        results.Add(new Result("Best TSP Solution", tour));
    120120      } else {
  • branches/MemPRAlgorithm/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r14454 r14455  
    372372        BestKnownQuality = data.BestKnownQuality.Value;
    373373      }
     374      Encoding.Length = data.Dimension;
     375
    374376      OnReset();
    375377    }
Note: See TracChangeset for help on using the changeset viewer.