Changeset 3232 for trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs
- Timestamp:
- 03/29/10 18:49:55 (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs
r3229 r3232 30 30 namespace HeuristicLab.Problems.TravelingSalesman { 31 31 /// <summary> 32 /// An operator to evaluate 3-opt moves.32 /// An operator to evaluate a translocation or insertion move. 33 33 /// </summary> 34 [Item("TSPT hreeOptPathMoveEvaluator", "Evaluates a 3-opt moveby 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.")] 35 35 [StorableClass] 36 public abstract class TSPT hreeOptPathMoveEvaluator : TSPPathMoveEvaluator, IThreeOptPermutationMoveOperator {37 public ILookupParameter<T hreeOptMove> ThreeOptMoveParameter {38 get { return (ILookupParameter<T hreeOptMove>)Parameters["ThreeOptMove"]; }36 public abstract class TSPTranslocationMovePathEvaluator : TSPPathMoveEvaluator, IPermutationTranslocationMoveOperator { 37 public ILookupParameter<TranslocationMove> TranslocationMoveParameter { 38 get { return (ILookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; } 39 39 } 40 40 41 public TSPT hreeOptPathMoveEvaluator()41 public TSPTranslocationMovePathEvaluator() 42 42 : base() { 43 Parameters.Add(new LookupParameter<T hreeOptMove>("ThreeOptMove", "The move to evaluate."));43 Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate.")); 44 44 } 45 45 46 46 protected override double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates) { 47 T hreeOptMove move = ThreeOptMoveParameter.ActualValue;47 TranslocationMove move = TranslocationMoveParameter.ActualValue; 48 48 int edge1source = permutation.GetCircular(move.Index1 - 1); 49 49 int edge1target = permutation[move.Index1]; … … 81 81 82 82 protected override double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix) { 83 T hreeOptMove move = ThreeOptMoveParameter.ActualValue;83 TranslocationMove move = TranslocationMoveParameter.ActualValue; 84 84 int edge1source = permutation.GetCircular(move.Index1 - 1); 85 85 int edge1target = permutation[move.Index1];
Note: See TracChangeset
for help on using the changeset viewer.