Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/22/17 01:32:13 (7 years ago)
Author:
abeham
Message:

#1614: fixed bugs

File:
1 edited

Legend:

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

    r15553 r15558  
    1313    [TestMethod]
    1414    public void ApproximateLocalSearchApplyTest() {
    15       CollectionAssert.AreEqual(new [] { 3, 2, 2, 0, 0, 0, 2, 3, 0, 2 }, assignment.ToArray());
     15      CollectionAssert.AreEqual(new [] { 3, 2, 1, 1, 3, 0, 1, 0, 3, 0 }, assignment.ToArray());
    1616
    1717      var evaluation = instance.Evaluate(assignment);
    18       Assert.AreEqual(3764492, evaluation.FlowCosts);
    19       Assert.AreEqual(46, evaluation.InstallationCosts);
     18      Assert.AreEqual(4091776, evaluation.FlowCosts);
     19      Assert.AreEqual(42, evaluation.InstallationCosts);
    2020      Assert.AreEqual(0, evaluation.ExcessDemand);
    2121
    2222      var quality = instance.ToSingleObjective(evaluation);
    23       Assert.AreEqual(14631771.476177376, quality, 1e-9);
     23      Assert.AreEqual(15903846.056964701, quality, 1e-9);
    2424
    2525      var evaluatedSolutions = 0;
     
    2727        ref evaluation, 10, 0.5, 1000, instance,
    2828        out evaluatedSolutions);
    29       Assert.AreEqual(300, evaluatedSolutions);
    30       CollectionAssert.AreEqual(new[] { 3, 2, 2, 0, 0, 2, 2, 3, 0, 0 }, assignment.ToArray());
    31       Assert.AreEqual(14271146.913257681, quality, 1e-9);
     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);
    3232    }
    3333
Note: See TracChangeset for help on using the changeset viewer.