Changeset 8206 for branches/GP-MoveOperators/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3
- Timestamp:
- 07/03/12 16:46:35 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:mergeinfo changed
/trunk/sources merged: 8084,8088-8090,8092-8100,8102-8113,8115,8117-8132,8134-8146,8148-8156,8158-8160,8163-8170,8173-8176,8178-8190,8192-8205
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.Tests
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Tests merged: 8088,8092,8121,8123,8132,8154,8164,8195
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPLIBInstancesTest.cs
r8085 r8206 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.