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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.