Changeset 8331 for branches/ScatterSearch (trunk integration)/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPLIBInstancesTest.cs
- Timestamp:
- 07/26/12 09:51:13 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Tests
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Tests merged: 8088,8092,8121,8123,8132,8154,8164,8195,8222,8309,8323
- Property svn:mergeinfo changed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPLIBInstancesTest.cs
r8086 r8331 168 168 { "wil100", 273038 } 169 169 }; 170 private static Dictionary<string, double> lowerBounds = new Dictionary<string, double>() { 171 { "bur26a", 5315200 }, 172 { "bur26f", 3706888 }, 173 { "chr25a", 2765 }, 174 { "els19", 11971949 }, 175 { "esc32a", 35 }, 176 { "esc32e", 0 }, 177 { "had20", 6166 }, 178 { "kra32", 67390 }, 179 { "lipa50a", 62020 }, 180 { "lipa50b", 1210244 }, 181 { "nug30", 4539 }, 182 { "scr20", 86766 }, 183 { "sko42", 11311 }, 184 { "tai35a", 1951207 }, 185 { "tai35b", 30866283 }, 186 { "tai100a", 15824355 } 187 }; 170 188 #endregion 171 189 … … 204 222 failedInstances.AppendLine(instance.Name + ": " + qap.BestKnownQuality.Value.ToString() + " vs " + qaplibInstances[instance.Name]); 205 223 } 206 Assert.IsTrue(failedInstances.Length == 0, "Following instances/solutions have suspicious quality: " + Environment.NewLine + failedInstances.ToString()); 224 Assert.IsTrue(failedInstances.Length == 0, "Following instances/solutions have suspicious best quality: " + Environment.NewLine + failedInstances.ToString()); 225 } 226 227 [TestMethod] 228 public void TestQAPLIBLowerBounds() { 229 var provider = new QAPLIBInstanceProvider(); 230 var qap = new QuadraticAssignmentProblem(); 231 var failedInstances = new StringBuilder(); 232 233 var instances = provider.GetDataDescriptors(); 234 Assert.IsTrue(instances.Any(), "No instances could be found."); 235 236 foreach (var instance in instances) { 237 if (lowerBounds.ContainsKey(instance.Name)) { 238 qap.Load(provider.LoadData(instance)); 239 if (qap.LowerBound.Value != lowerBounds[instance.Name]) 240 failedInstances.AppendLine(instance.Name + ": The Gilmore-Lawler lower bound is not valid."); 241 } 242 } 243 Assert.IsTrue(failedInstances.Length == 0, "Following instances failed for the GLB calculation: " + Environment.NewLine + failedInstances.ToString()); 207 244 } 208 245 }
Note: See TracChangeset
for help on using the changeset viewer.