Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/11 21:42:27 (13 years ago)
Author:
abeham
Message:

#1330

  • Added QAP evaluator for translocation moves
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPMoveEvaluatorTest.cs

    r5785 r5801  
    130130    }
    131131
    132     /*[TestMethod]
     132    [TestMethod]
    133133    public void TranslocationMoveEvaluatorTest() {
    134134      DoubleMatrix distances = new DoubleMatrix(
     
    156156        double before = QAPEvaluator.Apply(assignment, weights, distances);
    157157        // translocate
     158        Permutation clone = new Cloner().Clone(assignment);
    158159        TranslocationManipulator.Apply(assignment, index1, index2, insertPoint);
    159160        double after = QAPEvaluator.Apply(assignment, weights, distances);
    160         // evaluate translocate back
    161         double move = QAPTranslocationMoveEvaluator.Apply(assignment, new TranslocationMove(index1, index2, insertPoint, assignment), weights, distances);
    162         Assert.IsTrue(move.IsAlmost(before - after));
     161        // evaluate translocate move
     162        double move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), weights, distances);
     163        Assert.IsTrue(move.IsAlmost(after - before));
    163164      }
    164     }*/
     165    }
    165166
    166167  }
Note: See TracChangeset for help on using the changeset viewer.