Changeset 15558 for branches/GeneralizedQAP/UnitTests
- Timestamp:
- 12/22/17 01:32:13 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/UnitTests/ApproximateLocalSearchTest.cs
r15553 r15558 13 13 [TestMethod] 14 14 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()); 16 16 17 17 var evaluation = instance.Evaluate(assignment); 18 Assert.AreEqual( 3764492, evaluation.FlowCosts);19 Assert.AreEqual(4 6, evaluation.InstallationCosts);18 Assert.AreEqual(4091776, evaluation.FlowCosts); 19 Assert.AreEqual(42, evaluation.InstallationCosts); 20 20 Assert.AreEqual(0, evaluation.ExcessDemand); 21 21 22 22 var quality = instance.ToSingleObjective(evaluation); 23 Assert.AreEqual(1 4631771.476177376, quality, 1e-9);23 Assert.AreEqual(15903846.056964701, quality, 1e-9); 24 24 25 25 var evaluatedSolutions = 0; … … 27 27 ref evaluation, 10, 0.5, 1000, instance, 28 28 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(1 4271146.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); 32 32 } 33 33
Note: See TracChangeset
for help on using the changeset viewer.