Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/29/10 18:49:55 (15 years ago)
Author:
abeham
Message:

Renamed operators according to the underlying operation #889

Location:
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3
Files:
2 edited
8 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj

    r3209 r3232  
    8787    <Compile Include="Evaluators\TSPGeoPathEvaluator.cs" />
    8888    <Compile Include="HeuristicLabProblemsTravelingSalesmanPlugin.cs" />
    89     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptRoundedEuclideanPathMoveEvaluator.cs" />
    90     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptEuclideanPathMoveEvaluator.cs" />
    91     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptGeoPathMoveEvaluator.cs" />
    92     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptEuclideanPathMoveEvaluator.cs" />
    93     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptGeoPathMoveEvaluator.cs" />
    94     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptPathMoveEvaluator.cs" />
    95     <Compile Include="MoveEvaluators\TwoOpt\TSPTwoOptRoundedEuclideanPathMoveEvaluator.cs" />
     89    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveEuclideanPathEvaluator.cs" />
     90    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveGeoPathEvaluator.cs" />
     91    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMovePathEvaluator.cs" />
     92    <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs" />
     93    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMoveEuclideanPathEvaluator.cs" />
     94    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMoveGeoPathEvaluator.cs" />
     95    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMovePathEvaluator.cs" />
     96    <Compile Include="MoveEvaluators\TwoOpt\TSPInversionMoveRoundedEuclideanPathEvaluator.cs" />
    9697    <Compile Include="TravelingSalesmanProblem.cs" />
    9798    <Compile Include="TSPLIBTourParser.cs" />
     
    109110    <Compile Include="Interfaces\ITSPPathEvaluator.cs" />
    110111    <Compile Include="Interfaces\ITSPPathMoveEvaluator.cs" />
    111     <Compile Include="MoveEvaluators\ThreeOpt\TSPThreeOptPathMoveEvaluator.cs" />
    112112    <Compile Include="MoveEvaluators\TSPPathMoveEvaluator.cs" />
    113113    <Compile Include="MoveEvaluators\TSPMoveEvaluator.cs" />
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveEuclideanPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 3-opt moves.
     28  /// An operator to evaluate translocation or insertion moves (3-opt).
    2929  /// </summary>
    30   [Item("TSPThreeOptEuclideanPathMoveEvaluator", "Operator for evaluating a 3-opt move based on euclidean distances.")]
     30  [Item("TSPTranslocationMoveEuclideanPathEvaluator", "Operator for evaluating a translocation or insertion move (3-opt) based on euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPThreeOptEuclideanPathMoveEvaluator : TSPThreeOptPathMoveEvaluator {
     32  public class TSPTranslocationMoveEuclideanPathEvaluator : TSPTranslocationMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveGeoPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 3-opt moves.
     28  /// An operator to evaluate translocation or insertion moves (3-opt).
    2929  /// </summary>
    30   [Item("TSPThreeOptGeoPathMoveEvaluator", "Operator for evaluating a 3-opt move based on geo (world) distances.")]
     30  [Item("TSPTranslocationMoveGeoPathEvaluator", "Operator for evaluating a translocation or insertion move (3-opt) based on geo (world) distances.")]
    3131  [StorableClass]
    32   public class TSPThreeOptGeoPathMoveEvaluator : TSPThreeOptPathMoveEvaluator {
     32  public class TSPTranslocationMoveGeoPathEvaluator : TSPTranslocationMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPGeoPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs

    r3229 r3232  
    3030namespace HeuristicLab.Problems.TravelingSalesman {
    3131  /// <summary>
    32   /// An operator to evaluate 3-opt moves.
     32  /// An operator to evaluate a translocation or insertion move.
    3333  /// </summary>
    34   [Item("TSPThreeOptPathMoveEvaluator", "Evaluates a 3-opt move by summing up the length of all added edges and subtracting the length of all deleted edges.")]
     34  [Item("TSPTranslocationMovePathEvaluator", "Evaluates a translocation or insertion move (3-opt) by summing up the length of all added edges and subtracting the length of all deleted edges.")]
    3535  [StorableClass]
    36   public abstract class TSPThreeOptPathMoveEvaluator : TSPPathMoveEvaluator, IThreeOptPermutationMoveOperator {
    37     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    38       get { return (ILookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     36  public abstract class TSPTranslocationMovePathEvaluator : TSPPathMoveEvaluator, IPermutationTranslocationMoveOperator {
     37    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     38      get { return (ILookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    3939    }
    4040
    41     public TSPThreeOptPathMoveEvaluator()
     41    public TSPTranslocationMovePathEvaluator()
    4242      : base() {
    43       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The move to evaluate."));
     43      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
    4444    }
    4545
    4646    protected override double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates) {
    47       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     47      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    4848      int edge1source = permutation.GetCircular(move.Index1 - 1);
    4949      int edge1target = permutation[move.Index1];
     
    8181
    8282    protected override double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix) {
    83       ThreeOptMove move = ThreeOptMoveParameter.ActualValue;
     83      TranslocationMove move = TranslocationMoveParameter.ActualValue;
    8484      int edge1source = permutation.GetCircular(move.Index1 - 1);
    8585      int edge1target = permutation[move.Index1];
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 3-opt moves.
     28  /// An operator to evaluate translocation or insertion moves (3-opt).
    2929  /// </summary>
    30   [Item("TSPThreeOptRoundedEuclideanPathMoveEvaluator", "Operator for evaluating a 3-opt move based on rounded euclidean distances.")]
     30  [Item("TSPTranslocationMoveRoundedEuclideanPathEvaluator", "Operator for evaluating a translocation or insertion move (3-opt) based on rounded euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPThreeOptRoundedEuclideanPathMoveEvaluator : TSPThreeOptPathMoveEvaluator {
     32  public class TSPTranslocationMoveRoundedEuclideanPathEvaluator : TSPTranslocationMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPRoundedEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveEuclideanPathEvaluator.cs

    r3229 r3232  
    2828  /// An operator to evaluate 2-opt moves.
    2929  /// </summary>
    30   [Item("TSPTwoOptEuclideanPathMoveEvaluator", "Operator for evaluating a 2-opt move based on euclidean distances.")]
     30  [Item("TSPInversionMoveEuclideanPathEvaluator", "Operator for evaluating an inversion move (2-opt) based on euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPTwoOptEuclideanPathMoveEvaluator : TSPTwoOptPathMoveEvaluator {
     32  public class TSPInversionMoveEuclideanPathEvaluator : TSPInversionMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveGeoPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 2-opt moves.
     28  /// An operator to evaluate inversion moves (2-opt).
    2929  /// </summary>
    30   [Item("TSPTwoOptGeoPathMoveEvaluator", "Operator for evaluating a 2-opt move based on geo (world) distances.")]
     30  [Item("TSPInversionMoveGeoPathEvaluator", "Operator for evaluating an inversion move (2-opt) based on geo (world) distances.")]
    3131  [StorableClass]
    32   public class TSPTwoOptGeoPathMoveEvaluator : TSPTwoOptPathMoveEvaluator {
     32  public class TSPInversionMoveGeoPathEvaluator : TSPInversionMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPGeoPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs

    r3229 r3232  
    3030namespace HeuristicLab.Problems.TravelingSalesman {
    3131  /// <summary>
    32   /// An operator to evaluate 2-opt moves.
     32  /// An operator to evaluate inversion moves (2-opt).
    3333  /// </summary>
    34   [Item("TSPTwoOptPathMoveEvaluator", "Evaluates a 2-opt move by summing up the length of all added edges and subtracting the length of all deleted edges.")]
     34  [Item("TSPInversionMovePathEvaluator", "Evaluates an inversion move (2-opt) by summing up the length of all added edges and subtracting the length of all deleted edges.")]
    3535  [StorableClass]
    36   public abstract class TSPTwoOptPathMoveEvaluator : TSPPathMoveEvaluator, ITwoOptPermutationMoveOperator {
    37     public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
    38       get { return (ILookupParameter<TwoOptMove>)Parameters["TwoOptMove"]; }
     36  public abstract class TSPInversionMovePathEvaluator : TSPPathMoveEvaluator, IPermutationInversionMoveOperator {
     37    public ILookupParameter<InversionMove> InversionMoveParameter {
     38      get { return (ILookupParameter<InversionMove>)Parameters["InversionMove"]; }
    3939    }
    4040
    41     public TSPTwoOptPathMoveEvaluator()
     41    public TSPInversionMovePathEvaluator()
    4242      : base() {
    43       Parameters.Add(new LookupParameter<TwoOptMove>("TwoOptMove", "The move to evaluate."));
     43      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move to evaluate."));
    4444    }
    4545
    4646    protected override double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates) {
    47       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     47      InversionMove move = InversionMoveParameter.ActualValue;
    4848      int edge1source = permutation.GetCircular(move.Index1 - 1);
    4949      int edge1target = permutation[move.Index1];
     
    6666
    6767    protected override double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix) {
    68       TwoOptMove move = TwoOptMoveParameter.ActualValue;
     68      InversionMove move = InversionMoveParameter.ActualValue;
    6969      int edge1source = permutation.GetCircular(move.Index1 - 1);
    7070      int edge1target = permutation[move.Index1];
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveRoundedEuclideanPathEvaluator.cs

    r3229 r3232  
    2626namespace HeuristicLab.Problems.TravelingSalesman {
    2727  /// <summary>
    28   /// An operator to evaluate 2-opt moves.
     28  /// An operator to evaluate inversion moves (2-opt).
    2929  /// </summary>
    30   [Item("TSPTwoOptRoundedEuclideanPathMoveEvaluator", "Operator for evaluating a 2-opt move based on rounded euclidean distances.")]
     30  [Item("TSPInversionMoveRoundedEuclideanPathEvaluator", "Operator for evaluating an inversion move (2-opt) based on rounded euclidean distances.")]
    3131  [StorableClass]
    32   public class TSPTwoOptRoundedEuclideanPathMoveEvaluator : TSPTwoOptPathMoveEvaluator {
     32  public class TSPInversionMoveRoundedEuclideanPathEvaluator : TSPInversionMovePathEvaluator {
    3333    public override Type EvaluatorType {
    3434      get { return typeof(TSPRoundedEuclideanPathEvaluator); }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r3231 r3232  
    265265      OnVisualizerChanged();
    266266    }
    267     private void MoveGenerator_TwoOptMoveParameter_ActualNameChanged(object sender, EventArgs e) {
    268       string name = ((ILookupParameter<TwoOptMove>)sender).ActualName;
    269       foreach (ITwoOptPermutationMoveOperator op in Operators.OfType<ITwoOptPermutationMoveOperator>()) {
    270         op.TwoOptMoveParameter.ActualName = name;
    271       }
    272     }
    273     private void MoveGenerator_ThreeOptMoveParameter_ActualNameChanged(object sender, EventArgs e) {
    274       string name = ((ILookupParameter<ThreeOptMove>)sender).ActualName;
    275       foreach (IThreeOptPermutationMoveOperator op in Operators.OfType<IThreeOptPermutationMoveOperator>()) {
    276         op.ThreeOptMoveParameter.ActualName = name;
     267    private void MoveGenerator_InversionMoveParameter_ActualNameChanged(object sender, EventArgs e) {
     268      string name = ((ILookupParameter<InversionMove>)sender).ActualName;
     269      foreach (IPermutationInversionMoveOperator op in Operators.OfType<IPermutationInversionMoveOperator>()) {
     270        op.InversionMoveParameter.ActualName = name;
     271      }
     272    }
     273    private void MoveGenerator_TranslocationMoveParameter_ActualNameChanged(object sender, EventArgs e) {
     274      string name = ((ILookupParameter<TranslocationMove>)sender).ActualName;
     275      foreach (IPermutationTranslocationMoveOperator op in Operators.OfType<IPermutationTranslocationMoveOperator>()) {
     276        op.TranslocationMoveParameter.ActualName = name;
    277277      }
    278278    }
     
    301301    }
    302302    private void InitializeMoveGenerators() {
    303       foreach (ITwoOptPermutationMoveOperator op in Operators.OfType<ITwoOptPermutationMoveOperator>()) {
     303      foreach (IPermutationInversionMoveOperator op in Operators.OfType<IPermutationInversionMoveOperator>()) {
    304304        if (op is IMoveGenerator) {
    305           op.TwoOptMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_TwoOptMoveParameter_ActualNameChanged);
     305          op.InversionMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_InversionMoveParameter_ActualNameChanged);
    306306        }
    307307      }
    308       foreach (IThreeOptPermutationMoveOperator op in Operators.OfType<IThreeOptPermutationMoveOperator>()) {
     308      foreach (IPermutationTranslocationMoveOperator op in Operators.OfType<IPermutationTranslocationMoveOperator>()) {
    309309        if (op is IMoveGenerator) {
    310           op.ThreeOptMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_ThreeOptMoveParameter_ActualNameChanged);
     310          op.TranslocationMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_TranslocationMoveParameter_ActualNameChanged);
    311311        }
    312312      }
Note: See TracChangeset for help on using the changeset viewer.