Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/29/17 23:56:43 (7 years ago)
Author:
abeham
Message:

#1614: added additional algorithms

Location:
branches/GeneralizedQAP/UnitTests
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/UnitTests/ApproximateLocalSearchTest.cs

    r15558 r15562  
    1313    [TestMethod]
    1414    public void ApproximateLocalSearchApplyTest() {
    15       CollectionAssert.AreEqual(new [] { 3, 2, 1, 1, 3, 0, 1, 0, 3, 0 }, assignment.ToArray());
     15      CollectionAssert.AreEqual(new [] { 2, 0, 1, 1, 2, 3, 0, 3, 0, 0 }, assignment.ToArray());
    1616
    1717      var evaluation = instance.Evaluate(assignment);
    18       Assert.AreEqual(4091776, evaluation.FlowCosts);
    19       Assert.AreEqual(42, evaluation.InstallationCosts);
     18      Assert.AreEqual(3985258, evaluation.FlowCosts);
     19      Assert.AreEqual(30, evaluation.InstallationCosts);
    2020      Assert.AreEqual(0, evaluation.ExcessDemand);
    2121
    2222      var quality = instance.ToSingleObjective(evaluation);
    23       Assert.AreEqual(15903846.056964701, quality, 1e-9);
     23      Assert.AreEqual(15489822.781533258, quality, 1e-9);
    2424
    2525      var evaluatedSolutions = 0;
    2626      ApproximateLocalSearch.Apply(random, assignment, ref quality,
    27         ref evaluation, 10, 0.5, 1000, instance,
     27        ref evaluation, 10, 0.5, 100, instance,
    2828        out evaluatedSolutions);
    29       Assert.AreEqual(680, evaluatedSolutions);
    30       CollectionAssert.AreEqual(new[] { 3, 1, 0, 3, 0, 0, 1, 2, 3, 0 }, assignment.ToArray());
    31       Assert.AreEqual(12440163.936988469, quality, 1e-9);
     29      Assert.AreEqual(61, evaluatedSolutions);
     30      CollectionAssert.AreEqual(new[] { 2, 0, 0, 0, 2, 1, 0, 3, 0, 0 }, assignment.ToArray());
     31      Assert.AreEqual(10167912.633734789, quality, 1e-9);
    3232    }
    3333
  • branches/GeneralizedQAP/UnitTests/UnitTests.csproj

    r15512 r15562  
    110110    <Compile Include="Properties\AssemblyInfo.cs" />
    111111    <Compile Include="ApproximateLocalSearchTest.cs" />
     112    <Compile Include="GRASPTest.cs" />
    112113  </ItemGroup>
    113114  <ItemGroup>
     
    115116      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
    116117      <Name>HeuristicLab.Optimization-3.3</Name>
     118    </ProjectReference>
     119    <ProjectReference Include="..\HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms\3.3\HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms-3.3.csproj">
     120      <Project>{577239EC-7D7F-4505-A0A4-572E34010DBA}</Project>
     121      <Name>HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms-3.3</Name>
    117122    </ProjectReference>
    118123    <ProjectReference Include="..\HeuristicLab.Problems.GeneralizedQuadraticAssignment\3.3\HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj">
Note: See TracChangeset for help on using the changeset viewer.