Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5801


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

#1330

  • Added QAP evaluator for translocation moves
Location:
branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj

    r5785 r5801  
    140140    <Compile Include="Evaluators\QAPInversionMoveEvaluator.cs" />
    141141    <Compile Include="Evaluators\QAPMoveEvaluator.cs" />
     142    <Compile Include="Evaluators\QAPTranslocationMoveEvaluator.cs">
     143      <SubType>Code</SubType>
     144    </Compile>
    142145    <Compile Include="Interfaces\IQAPEvaluator.cs" />
    143146    <Compile Include="Interfaces\IQAPMoveEvaluator.cs" />
  • 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.