Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/05/10 14:48:55 (14 years ago)
Author:
swagner
Message:

Worked on best solution analysis for the TSP (#999)

Location:
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers
Files:
3 edited

Legend:

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

    r3634 r3635  
    3636  [Item("BestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")]
    3737  [StorableClass]
    38   public sealed class BestTSPSolutionAnalyzer : SingleSuccessorOperator, ISolutionAnalyzer {
    39     public LookupParameter<DoubleMatrix> CoordinatesParameter {
    40       get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     38  public sealed class BestTSPSolutionAnalyzer : SingleSuccessorOperator, IBestTSPSolutionAnalyzer, ISolutionAnalyzer {
     39    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
     40      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
    4141    }
    42     public LookupParameter<Permutation> PermutationParameter {
    43       get { return (LookupParameter<Permutation>)Parameters["Permutation"]; }
     42    public ILookupParameter<Permutation> PermutationParameter {
     43      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    4444    }
    45     public LookupParameter<DoubleValue> QualityParameter {
    46       get { return (LookupParameter<DoubleValue>)Parameters["Quality"]; }
     45    ILookupParameter IBestTSPSolutionAnalyzer.PermutationParameter {
     46      get { return PermutationParameter; }
    4747    }
    48     public LookupParameter<PathTSPTour> BestSolutionParameter {
    49       get { return (LookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
     48    public ILookupParameter<DoubleValue> QualityParameter {
     49      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
    5050    }
    51     public ValueLookupParameter<ResultCollection> ResultsParameter {
    52       get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
     51    ILookupParameter IBestTSPSolutionAnalyzer.QualityParameter {
     52      get { return QualityParameter; }
     53    }
     54    public ILookupParameter<PathTSPTour> BestSolutionParameter {
     55      get { return (ILookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
     56    }
     57    public IValueLookupParameter<ResultCollection> ResultsParameter {
     58      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
    5359    }
    5460
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/MultiPopulationBestTSPSolutionAnalyzer.cs

    r3634 r3635  
    3838  [Item("MultiPopulationBestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")]
    3939  [StorableClass]
    40   public sealed class MultiPopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, IMultiPopulationAnalyzer {
    41     public LookupParameter<DoubleMatrix> CoordinatesParameter {
    42       get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     40  public sealed class MultiPopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, IBestTSPSolutionAnalyzer, IMultiPopulationAnalyzer {
     41    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
     42      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
    4343    }
    44     public SubScopesSubScopesLookupParameter<Permutation> PermutationParameter {
    45       get { return (SubScopesSubScopesLookupParameter<Permutation>)Parameters["Permutation"]; }
     44    public ILookupParameter<ItemArray<ItemArray<Permutation>>> PermutationParameter {
     45      get { return (ILookupParameter<ItemArray<ItemArray<Permutation>>>)Parameters["Permutation"]; }
    4646    }
    47     public SubScopesSubScopesLookupParameter<DoubleValue> QualityParameter {
    48       get { return (SubScopesSubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
     47    ILookupParameter IBestTSPSolutionAnalyzer.PermutationParameter {
     48      get { return PermutationParameter; }
    4949    }
    50     public LookupParameter<PathTSPTour> BestSolutionParameter {
    51       get { return (LookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
     50    public ILookupParameter<ItemArray<ItemArray<DoubleValue>>> QualityParameter {
     51      get { return (ILookupParameter<ItemArray<ItemArray<DoubleValue>>>)Parameters["Quality"]; }
    5252    }
    53     public ValueLookupParameter<ResultCollection> ResultsParameter {
    54       get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
     53    ILookupParameter IBestTSPSolutionAnalyzer.QualityParameter {
     54      get { return QualityParameter; }
     55    }
     56    public ILookupParameter<PathTSPTour> BestSolutionParameter {
     57      get { return (ILookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
     58    }
     59    public IValueLookupParameter<ResultCollection> ResultsParameter {
     60      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
    5561    }
    5662
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/PopulationBestTSPSolutionAnalyzer.cs

    r3634 r3635  
    3636  [Item("PopulationBestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")]
    3737  [StorableClass]
    38   public sealed class PopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, IPopulationAnalyzer {
    39     public LookupParameter<DoubleMatrix> CoordinatesParameter {
    40       get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     38  public sealed class PopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, IBestTSPSolutionAnalyzer, IPopulationAnalyzer {
     39    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
     40      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
    4141    }
    42     public SubScopesLookupParameter<Permutation> PermutationParameter {
    43       get { return (SubScopesLookupParameter<Permutation>)Parameters["Permutation"]; }
     42    public ILookupParameter<ItemArray<Permutation>> PermutationParameter {
     43      get { return (ILookupParameter<ItemArray<Permutation>>)Parameters["Permutation"]; }
    4444    }
    45     public SubScopesLookupParameter<DoubleValue> QualityParameter {
    46       get { return (SubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
     45    ILookupParameter IBestTSPSolutionAnalyzer.PermutationParameter {
     46      get { return PermutationParameter; }
    4747    }
    48     public LookupParameter<PathTSPTour> BestSolutionParameter {
    49       get { return (LookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
     48    public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {
     49      get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }
    5050    }
    51     public ValueLookupParameter<ResultCollection> ResultsParameter {
    52       get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
     51    ILookupParameter IBestTSPSolutionAnalyzer.QualityParameter {
     52      get { return QualityParameter; }
     53    }
     54    public ILookupParameter<PathTSPTour> BestSolutionParameter {
     55      get { return (ILookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
     56    }
     57    public IValueLookupParameter<ResultCollection> ResultsParameter {
     58      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
    5359    }
    5460
Note: See TracChangeset for help on using the changeset viewer.