Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/11 15:34:30 (13 years ago)
Author:
abeham
Message:

#1330

  • Renamed the DistanceMatrix parameter to Distances
  • Renamed the SwapMove to Swap2Move and renamed operators accordingly
  • Integrated changes in HeuristicLab.Analysis.Views regarding description text box
Location:
branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPEvaluator.cs

    r5598 r5838  
    3535      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    3636    }
    37     public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
    38       get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
    39     }
    40     public ILookupParameter<DoubleMatrix> CoordinatesParameter {
    41       get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     37    public ILookupParameter<DoubleMatrix> DistancesParameter {
     38      get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; }
    4239    }
    4340    public ILookupParameter<DoubleMatrix> WeightsParameter {
     
    5350    public QAPEvaluator() {
    5451      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation that represents the current solution."));
    55       Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The distance matrix that contains the distances between the locations."));
    56       Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates in case the distance matrix should not be used."));
     52      Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The distance matrix that contains the distances between the locations."));
    5753      Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The matrix with the weights between the facilities, that is how strongly they're connected to each other."));
    5854      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value aka fitness value of the solution."));
     
    7672      Permutation assignment = PermutationParameter.ActualValue;
    7773      DoubleMatrix weights = WeightsParameter.ActualValue;
    78       DoubleMatrix distanceMatrix = DistanceMatrixParameter.ActualValue;
     74      DoubleMatrix distanceMatrix = DistancesParameter.ActualValue;
    7975
    8076      double quality = Apply(assignment, weights, distanceMatrix);
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPInversionMoveEvaluator.cs

    r5785 r5838  
    7373      if (move == null) throw new InvalidOperationException("Inversion move is not found.");
    7474      Permutation assignment = PermutationParameter.ActualValue;
    75       DoubleMatrix distances = DistanceMatrixParameter.ActualValue;
     75      DoubleMatrix distances = DistancesParameter.ActualValue;
    7676      DoubleMatrix weights = WeightsParameter.ActualValue;
    7777
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPMoveEvaluator.cs

    r5785 r5838  
    4949      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    5050    }
    51     public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
    52       get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
     51    public ILookupParameter<DoubleMatrix> DistancesParameter {
     52      get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; }
    5353    }
    5454    public ILookupParameter<DoubleMatrix> WeightsParameter {
     
    6464      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The evaluated quality of a move on a QAP solution."));
    6565      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
    66       Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the facilities."));
     66      Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The matrix which contains the distances between the facilities."));
    6767      Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The matrix with the weights between the facilities, that is how strongly they're connected to each other."));
    6868    }
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPSwapMoveEvaluator.cs

    r5785 r5838  
    2929
    3030namespace HeuristicLab.Problems.QuadraticAssignment {
    31   [Item("QAPSwapMoveEvaluator", "Evaluated a swap move on a QAP solution.")]
     31  [Item("QAPSwap2MoveEvaluator", "Evaluated a swap-2 move on a QAP solution.")]
    3232  [StorableClass]
    33   public class QAPSwapMoveEvaluator : QAPMoveEvaluator, IPermutationSwapMoveOperator {
    34     public ILookupParameter<SwapMove> SwapMoveParameter {
    35       get { return (ILookupParameter<SwapMove>)Parameters["SwapMove"]; }
     33  public class QAPSwap2MoveEvaluator : QAPMoveEvaluator, IPermutationSwap2MoveOperator {
     34    public ILookupParameter<Swap2Move> Swap2MoveParameter {
     35      get { return (ILookupParameter<Swap2Move>)Parameters["Swap2Move"]; }
    3636    }
    3737
    3838    [StorableConstructor]
    39     protected QAPSwapMoveEvaluator(bool deserializing) : base(deserializing) { }
    40     protected QAPSwapMoveEvaluator(QAPSwapMoveEvaluator original, Cloner cloner)
     39    protected QAPSwap2MoveEvaluator(bool deserializing) : base(deserializing) { }
     40    protected QAPSwap2MoveEvaluator(QAPSwap2MoveEvaluator original, Cloner cloner)
    4141      : base(original, cloner) {
    4242    }
    43     public QAPSwapMoveEvaluator() {
    44       Parameters.Add(new LookupParameter<SwapMove>("SwapMove", "The move to evaluate."));
     43    public QAPSwap2MoveEvaluator() {
     44      Parameters.Add(new LookupParameter<Swap2Move>("Swap2Move", "The move to evaluate."));
    4545    }
    4646
    4747    public override IDeepCloneable Clone(Cloner cloner) {
    48       return new QAPSwapMoveEvaluator(this, cloner);
     48      return new QAPSwap2MoveEvaluator(this, cloner);
    4949    }
    5050
    51     public static double Apply(Permutation assignment, SwapMove move, DoubleMatrix weights, DoubleMatrix distances) {
     51    public static double Apply(Permutation assignment, Swap2Move move, DoubleMatrix weights, DoubleMatrix distances) {
    5252      if (move.Index1 == move.Index2) return 0;
    5353      double moveQuality = 0;
     
    7070
    7171    public override IOperation Apply() {
    72       SwapMove move = SwapMoveParameter.ActualValue;
    73       if (move == null) throw new InvalidOperationException("Swap move is not found.");
     72      Swap2Move move = Swap2MoveParameter.ActualValue;
     73      if (move == null) throw new InvalidOperationException("Swap-2 move is not found.");
    7474      Permutation assignment = PermutationParameter.ActualValue;
    75       DoubleMatrix distances = DistanceMatrixParameter.ActualValue;
     75      DoubleMatrix distances = DistancesParameter.ActualValue;
    7676      DoubleMatrix weights = WeightsParameter.ActualValue;
    7777
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPTranslocationMoveEvaluator.cs

    r5801 r5838  
    8585      if (move == null) throw new InvalidOperationException("Translocation move is not found.");
    8686      Permutation assignment = PermutationParameter.ActualValue;
    87       DoubleMatrix distances = DistanceMatrixParameter.ActualValue;
     87      DoubleMatrix distances = DistancesParameter.ActualValue;
    8888      DoubleMatrix weights = WeightsParameter.ActualValue;
    8989
Note: See TracChangeset for help on using the changeset viewer.