Last change
on this file since 5728 was
5648,
checked in by abeham, 14 years ago
|
#1330
- Unified QAP visualization in solution and problem view
- Fixed bug in gradient-descent gradient calculation when performing multidimensional scaling
- Extended QAPLIB parsers to cover some file format variations
- Added unit tests to check if all QAPLIB instances import without error
- Changed BestKnownSolution to be an OptionalValueParameter
|
File size:
815 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Text;
|
---|
3 | using HeuristicLab.Problems.QuadraticAssignment;
|
---|
4 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
5 |
|
---|
6 | namespace Tests {
|
---|
7 | [TestClass]
|
---|
8 | public class QAPLIBInstancesTest {
|
---|
9 | [TestMethod]
|
---|
10 | public void LoadAllEmbeddedInstances() {
|
---|
11 | QuadraticAssignmentProblem qap = new QuadraticAssignmentProblem();
|
---|
12 | StringBuilder failedInstances = new StringBuilder();
|
---|
13 | foreach (string instance in qap.EmbeddedInstances) {
|
---|
14 | try {
|
---|
15 | qap.LoadEmbeddedInstance(instance);
|
---|
16 | } catch (Exception ex) {
|
---|
17 | failedInstances.AppendLine(instance + ": " + ex.Message);
|
---|
18 | }
|
---|
19 | }
|
---|
20 | Assert.IsTrue(failedInstances.Length == 0, "Following instances failed to load: " + Environment.NewLine + failedInstances.ToString());
|
---|
21 | }
|
---|
22 | }
|
---|
23 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.